00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #if !defined(AFX_FSPARTMEDIAPLAYER_H__384930FA_5C16_47F9_8B3B_95612C5F0C9A__INCLUDED_) 00007 #define AFX_FSPARTMEDIAPLAYER_H__384930FA_5C16_47F9_8B3B_95612C5F0C9A__INCLUDED_ 00008 00009 #if _MSC_VER > 1000 00010 #pragma once 00011 #endif 00012 00013 #include <windows.h> 00014 #include <dshow.h> 00015 #include <limits.h> 00016 #include "fsFileReader.h" 00017 00018 #define WM_VIDEONOTIFY (WM_USER + 100) 00019 00020 enum fsPartMediaPlayerState 00021 { 00022 VFPS_CLOSED, 00023 VFPS_RUNNING, 00024 VFPS_PAUSED, 00025 VFPS_STOPPED 00026 }; 00027 00028 class fsPartMediaPlayer 00029 { 00030 public: 00031 00032 HRESULT Set_Volume (long lVolume); 00033 00034 HRESULT HandleGraphEvent(); 00035 00036 IMediaSeeking* Get_MediaSeeking (); 00037 00038 fsPartMediaPlayerState Get_State(); 00039 00040 HRESULT NotifyOwnerMessage (HWND hWnd, UINT msg, WPARAM wp, LPARAM lp); 00041 00042 void AutoSize(); 00043 00044 HRESULT Close(); 00045 00046 void Initialize (HWND hVideoOutWindow); 00047 00048 HRESULT Stop(); 00049 HRESULT Pause(); 00050 HRESULT Run(); 00051 00052 00053 HRESULT Open (HANDLE hFile, UINT64 uMaxAvail = _UI64_MAX); 00054 00055 00056 HRESULT Open2 (LPCSTR pszFile); 00057 00058 fsPartMediaPlayer(); 00059 virtual ~fsPartMediaPlayer(); 00060 00061 protected: 00062 HRESULT m_hr; 00063 fsFileStream m_stream; 00064 fsFileReader m_reader; 00065 fsPartMediaPlayerState m_state; 00066 HWND m_hOutWnd; 00067 IGraphBuilder* m_pGB; 00068 IMediaControl* m_pMC; 00069 IMediaEventEx* m_pME; 00070 IMediaSeeking* m_pMS; 00071 IVideoWindow* m_pVW; 00072 IBasicAudio* m_pBA; 00073 double m_fVideoRatio; 00074 }; 00075 00076 #endif
1.5.6