Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

MovieTexture_DShow.h

Go to the documentation of this file.
00001 #ifndef RAGEMOVIETEXTURE_DSHOW_H 00002 #define RAGEMOVIETEXTURE_DSHOW_H 00003 00004 #include "MovieTexture.h" 00005 00006 /* Don't know why we need this for the headers ... */ 00007 typedef char TCHAR, *PTCHAR; 00008 00009 /* Prevent these from using Dbg stuff, which we don't link in. */ 00010 #ifdef DEBUG 00011 #undef DEBUG 00012 #undef _DEBUG 00013 #define GIVE_BACK_DEBUG 00014 #endif 00015 00016 #include <atlbase.h> 00017 00018 #ifdef GIVE_BACK_DEBUG 00019 #undef GIVE_BACK_DEBUG 00020 #define _DEBUG 00021 #define DEBUG 00022 #endif 00023 00024 #include "baseclasses/streams.h" 00025 00026 #include "RageDisplay.h" 00027 #include "RageTexture.h" 00028 #include "RageThreads.h" 00029 00030 //----------------------------------------------------------------------------- 00031 // RageMovieTexture Class Declarations 00032 //----------------------------------------------------------------------------- 00033 class MovieTexture_DShow : public RageMovieTexture 00034 { 00035 public: 00036 MovieTexture_DShow( RageTextureID ID ); 00037 virtual ~MovieTexture_DShow(); 00038 CString Init(); 00039 00040 /* only called by RageTextureManager::InvalidateTextures */ 00041 void Invalidate() { m_uTexHandle = 0; } 00042 void Update(float fDeltaTime); 00043 00044 virtual void Reload(); 00045 00046 virtual void Play(); 00047 virtual void Pause(); 00048 virtual void SetPosition( float fSeconds ); 00049 virtual void SetPlaybackRate( float fRate ); 00050 00051 void SetLooping(bool looping=true) { m_bLoop = looping; } 00052 00053 void NewData(const char *buffer); 00054 00055 private: 00056 const char *buffer; 00057 RageSemaphore buffer_lock, buffer_finished; 00058 00059 CString Create(); 00060 00061 void CreateTexture(); 00062 void SkipUpdates(); 00063 void StopSkippingUpdates(); 00064 void CheckFrame(); 00065 CString GetActiveFilterList(); 00066 00067 unsigned GetTexHandle() const { return m_uTexHandle; } 00068 unsigned m_uTexHandle; 00069 00070 CComPtr<IGraphBuilder> m_pGB; // GraphBuilder 00071 bool m_bLoop; 00072 bool m_bPlaying; 00073 }; 00074 00075 #endif 00076 00077 /* 00078 * (c) 2001-2004 Chris Danford, Glenn Maynard 00079 * All rights reserved. 00080 * 00081 * Permission is hereby granted, free of charge, to any person obtaining a 00082 * copy of this software and associated documentation files (the 00083 * "Software"), to deal in the Software without restriction, including 00084 * without limitation the rights to use, copy, modify, merge, publish, 00085 * distribute, and/or sell copies of the Software, and to permit persons to 00086 * whom the Software is furnished to do so, provided that the above 00087 * copyright notice(s) and this permission notice appear in all copies of 00088 * the Software and that both the above copyright notice(s) and this 00089 * permission notice appear in supporting documentation. 00090 * 00091 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00092 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00093 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00094 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00095 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00096 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00097 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00098 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00099 * PERFORMANCE OF THIS SOFTWARE. 00100 */

Generated on Thu Jan 27 20:57:24 2005 for StepMania by doxygen 1.3.7