DSPlayer.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 
00004 #include <uuids.h>
00005 #include <dshow.h>
00006 
00007 //
00008 #include <d3d9.h>
00009 #include <vmr9.h>
00010 
00011 
00012 #include <string>
00013 
00014 #include "ICMMLCallbacks.h"
00015 #include "ICMMLAppControl.h"
00016 #include "libCMMLTags/libCMMLTags.h"
00017 #include "IMediaEventNotification.h"
00018 
00019 
00020 
00021 
00022 
00023 #include <fstream>
00024 #include <string>
00025 
00026 
00027 
00028 using namespace std;
00029 
00030 
00031 class DSPlayer
00032 {
00033 public:
00034 
00035         DSPlayer(void);
00036         ~DSPlayer(void);
00037         
00038 
00039                 bool loadFile(wstring inFileName);
00040                 bool loadFile(wstring inFileName, HWND inWindow, int inLeft, int inTop, int inWidth, int inHeight);
00041                 bool play();
00042                 bool pause();
00043                 bool stop();
00044                 __int64 seek(__int64 inTime);
00045                 __int64 seekStart();
00046                 __int64 queryPosition();
00047 
00048                 bool isLoaded();
00049                 __int64 fileSize();
00050                 __int64 fileDuration();
00051         
00052 
00053                 bool setMediaEventCallback(IMediaEventNotification* inMediaEventCallback);
00054                 IMediaEventNotification* getMediaEventCallback();
00055 
00056                 //bool setCMMLCallbacks(IDNCMMLCallbacks* inCMMLCallbacks);
00057                 bool checkEvents();
00058 
00059                 void releaseInterfaces();
00060         protected:
00061                 //static wstring toWStr(std::string inString);
00062                 IGraphBuilder* mGraphBuilder;
00063                 IMediaControl* mMediaControl;
00064                 IMediaSeeking* mMediaSeeking;
00065                 IMediaEvent* mMediaEvent;
00066                 ICMMLAppControl* mCMMLAppControl;
00067                 ICMMLCallbacks* mCMMLCallback;
00068                 IMediaEventNotification* mMediaEventNotify;
00069 
00070                 HANDLE mEventHandle;
00071 
00072                 bool mIsLoaded;
00073                 bool isFileAnnodex(wstring inFilename);
00074 
00075                 wstring toWStr(string inString);
00076 
00077                 GUID Y_IID_ICMMLAppControl;
00078                 fstream debugLog;
00079 };
00080 
00081 

Generated on Tue Feb 15 14:54:23 2005 for oggdsf by  doxygen 1.3.9