Etterna 0.74.4
Loading...
Searching...
No Matches
MovieTexture_DShow.h
1/* MovieTexture_DShow - DirectShow movie renderer. */
2
3#ifndef RAGE_MOVIE_TEXTURE_DSHOW_H
4#define RAGE_MOVIE_TEXTURE_DSHOW_H
5
6#include "MovieTexture.h"
7
8/* Don't know why we need this for the headers ... */
9typedef char TCHAR, *PTCHAR;
10
11/* Prevent these from using Dbg stuff, which we don't link in. */
12#ifdef DEBUG
13#undef DEBUG
14#undef _DEBUG
15#define GIVE_BACK_DEBUG
16#endif
17
18#include <atlbase.h>
19
20#ifdef GIVE_BACK_DEBUG
21#undef GIVE_BACK_DEBUG
22#define _DEBUG
23#define DEBUG
24#endif
25
26#include "baseclasses/streams.h"
27
28#include "RageUtil/Graphics/RageDisplay.h"
29#include "RageUtil/Graphics/RageTexture.h"
30#include "RageUtil/Misc/RageThreads.h"
31
33{
34 public:
36 virtual ~MovieTexture_DShow();
37 std::string Init();
38
39 /* only called by RageTextureManager::InvalidateTextures */
40 void Invalidate() { m_uTexHandle = 0; }
41 void Update(float fDeltaTime);
42
43 virtual void Reload();
44
45 virtual void Play();
46 virtual void Pause();
47 virtual void SetPosition(float fSeconds);
48 virtual void SetPlaybackRate(float fRate);
49
50 void SetLooping(bool bLooping = true) { m_bLoop = bLooping; }
51
52 void NewData(const char* pBuffer);
53
54 private:
55 const char* buffer;
56 RageSemaphore buffer_lock, buffer_finished;
57
58 std::string Create();
59
60 void CreateTexture();
61 void SkipUpdates();
62 void StopSkippingUpdates();
63 void CheckFrame();
64 std::string GetActiveFilterList();
65
66 unsigned GetTexHandle() const { return m_uTexHandle; }
67 unsigned m_uTexHandle;
68
69 CComPtr<IGraphBuilder> m_pGB; // GraphBuilder
70 bool m_bLoop;
71 bool m_bPlaying;
72};
73
75{
76 public:
77 virtual RageMovieTexture* Create(RageTextureID ID, std::string& sError);
78};
79
80#endif
Definition MovieTexture_DShow.h:33
Definition MovieTexture_DShow.h:75
Definition MovieTexture.h:37
Definition MovieTexture.h:12
Definition RageThreads.h:334
Definition RageTextureID.h:12