diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/Input/in_wmvdrm/VideoLayer.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Plugins/Input/in_wmvdrm/VideoLayer.h')
-rw-r--r-- | Src/Plugins/Input/in_wmvdrm/VideoLayer.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Src/Plugins/Input/in_wmvdrm/VideoLayer.h b/Src/Plugins/Input/in_wmvdrm/VideoLayer.h new file mode 100644 index 00000000..1f95ccdc --- /dev/null +++ b/Src/Plugins/Input/in_wmvdrm/VideoLayer.h @@ -0,0 +1,62 @@ +#ifndef NULLSOFT_VIDEOLAYERH +#define NULLSOFT_VIDEOLAYERH + +#include "WMHandler.h" +#include "OutputStream.h" +#include <wmsdk.h> +#include "VideoDataConverter.h" +#include "Config.h" +#include "VideoThread.h" + +#define VIDEO_ACCEPTABLE_JITTER (config_video_jitter*10000) +#define VIDEO_ACCEPTABLE_JITTER_MS (config_video_jitter) + +class VideoLayer : public WMHandler +{ +public: + VideoLayer(IWMReader *_reader); + ~VideoLayer(); + bool IsOpen(); + void Kill(); +private: + // WMHandler + void VideoFrameDrop(DWORD lateness); + void SampleReceived(QWORD &timeStamp, QWORD &duration, unsigned long &outputNum, unsigned long &flags, INSSBuffer *&sample); + void Opened(); + void AudioBufferMilliseconds(long ms); + void Closed(); + + void Started(); + void Stopped(); + void HasVideo(bool &video); + // utility methods + bool AttemptOpenVideo(VideoOutputStream *attempt); + bool OpenVideo(); + + // other people's data + IWMReader *reader; + + // our data + IWMReaderAdvanced2 *reader2; + IWMHeaderInfo *header; + int videoOutputNum; + DWORD offset; + long nextRest; + VideoDataConverter *converter; + VideoOutputStream *videoStream; + + bool videoOpened; + QWORD catchupTime; + double aspect; + int fourcc; + bool flip; + int videoWidth, videoHeight; + HANDLE killSwitch; + DWORD earlyDelivery; + bool drmProtected; + bool video_output_opened; + VideoThread videoThread; + +}; + +#endif |