VideoRendererRGB.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:2k
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef VIDEORENDERER_RGB_H
- #define VIDEORENDERER_RGB_H
- /*
- * 基类
- */
- #include "MediaClasses.h"
- #include "Resizer.h"
- /*
- * 包括直接显示
- *
- */
- #include <ddraw.h>
- /*
- * 叠加视频缓冲器类
- */
- class MediaVideoRendererRGB : public MediaItemVideoRenderer {
- private:
- MediaItemSubtitler *subtitler;
- LPDIRECTDRAW7 lpdd;
- LPDIRECTDRAWSURFACE7 lpddsPrimary;
- LPDIRECTDRAWCLIPPER lpddClipper;
- LPDIRECTDRAWSURFACE7 lpddsBack;
- LPDIRECTDRAWSURFACE7 lpddsImage;
- unsigned int width;
- unsigned int height;
- unsigned int bpp;
- media_video_mode_t videoMode;
- unsigned int fullscreenWidth;
- unsigned int fullscreenHeight;
- BOOL fullscreenFlip;
- unsigned int fullscreenVideoHeight;
- HWND hwndPlayback;
- public:
- MediaVideoRendererRGB();
- ~MediaVideoRendererRGB();
- /*
- * 媒体项方法
- */
- media_type_t GetType();
- char *GetName();
- MP_RESULT Connect(MediaItem *item);
- MP_RESULT ReleaseConnections();
- DWORD GetCaps();
- MP_RESULT Configure(HINSTANCE hInstance, HWND hwnd);
- /*
- * 视频补偿方法
- */
- MP_RESULT Init(HWND hwnd, unsigned int width, unsigned int height);
- MP_RESULT InitFullscreen(HWND hwnd, unsigned int width, unsigned int height);
- media_video_mode_t GetVideoMode();
- MP_RESULT Stop();
- RECT *GetFullscreenRects();
- MP_RESULT Draw(MediaBuffer *buffer, RECT *rect, int frameNumber, int invertFlag);
- MP_RESULT DrawFullscreen(MediaBuffer *buffer, int frameNumber, int invertFlag, int desktopMode);
- MP_RESULT Close();
- };
- #endif