aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Input/in_wmvdrm/WMDRMModule.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/Input/in_wmvdrm/WMDRMModule.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/Plugins/Input/in_wmvdrm/WMDRMModule.h')
-rw-r--r--Src/Plugins/Input/in_wmvdrm/WMDRMModule.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/Src/Plugins/Input/in_wmvdrm/WMDRMModule.h b/Src/Plugins/Input/in_wmvdrm/WMDRMModule.h
new file mode 100644
index 00000000..52812930
--- /dev/null
+++ b/Src/Plugins/Input/in_wmvdrm/WMDRMModule.h
@@ -0,0 +1,100 @@
+#ifndef NULLSOFT_WMDRMMODULEH
+#define NULLSOFT_WMDRMMODULEH
+
+#include "Remaining.h"
+#include <wmsdk.h>
+// layers
+#include "AudioLayer.h"
+#include "VideoLayer.h"
+#include "ClockLayer.h"
+#include "WaitLayer.h"
+#include "BufferLayer.h"
+#include "SeekLayer.h"
+#include "GainLayer.h"
+
+#include "WMHandler.h"
+#include "WMCallback.h"
+#include "WMInformation.h"
+
+class WMDRM : public WMHandler
+{
+public:
+ WMDRM();
+ ~WMDRM();
+ void Config(HWND hwndParent);
+ void Init();
+ void Quit();
+ void GetFileInfo(const wchar_t *file, wchar_t *title, int *length_in_ms);
+ int InfoBox(const wchar_t *file, HWND hwndParent);
+ int IsOurFile(const wchar_t *fn);
+ int Play(const wchar_t *fn);
+ void Pause();
+ void UnPause();
+ int IsPaused();
+ void Stop();
+ int GetLength();
+ int GetOutputTime();
+ void SetOutputTime(int time_in_ms);
+ void SetVolume(int volume);
+ void SetPan(int pan);
+ int GetVolume() { return volume; }
+ int GetPan() { return pan; }
+ void EQSet(int on, char data[10], int preamp);
+ void BuildBuffers();
+ void OutputAudioSamples(void *data, long samples, DWORD&);
+ void OutputAudioSamples(void *data, long samples);
+ void QuantizedViz(void *data, long sizeBytes, DWORD);
+ long GetPosition();
+ void EndOfFile();
+ bool OpenVideo(int fourcc, int width, int height, bool flipped);
+ void ReOpen();
+ void NewSourceFlags();
+// const char *GetFile() { return fn.c_str();}
+ bool playing;
+ int startAtMilliseconds;
+ void InitWM();
+protected:
+ //WMHandler
+ void AudioDataReceived(void *_data, unsigned long sizeBytes, DWORD timestamp);
+ void Opened();
+ void NewMetadata();
+ void Closed();
+ void Started();
+ void Error();
+ void OpenFailed();
+ void Stopped();
+ void Kill();
+
+ BufferLayer *buffer;
+ ClockLayer *clock;
+#ifndef NO_DRM
+ DRMLayer *drm;
+#endif
+ AudioLayer *audio;
+ VideoLayer *video;
+ WaitLayer *wait;
+ SeekLayer *seek;
+ GainLayer *gain;
+ WMCallback callback;
+ IWMReader *reader;
+ IWMReaderAdvanced *reader1;
+ IWMReaderAdvanced2 *reader2;
+ IWMReaderNetworkConfig *network;
+ WMInformation *info;
+ Remaining remaining;
+ unsigned char *dspBuffer, *vizBuffer;
+ int volume, pan;
+ bool flushed, paused;
+
+ HANDLE killswitch;
+
+ bool opened;
+ bool drmProtected;
+ void Connecting();
+ void Locating();
+ void AssignOutput();
+ void AccessDenied();
+
+
+};
+#endif \ No newline at end of file