VideoBuffer.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:2k
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef VIDEO_BUFFER_H
- #define VIDEO_BUFFER_H
- #include "MediaClasses.h"
- /*
- * 定义
- */
- #define VIDEO_BUFFER_SIZE 5
- #define VIDEO_BUFFER_END_NOT_REACHED 32768
- /*
- * Video Buffer Class
- *
- * ——只执行一次
- *
- */
- class MediaVideoBuffer : public MediaItemVideoBuffer {
- public:
- MediaBuffer *buffer[VIDEO_BUFFER_SIZE];
- MediaItemVideoDecoder *decoder;
- DWORD bufferedFrames;
- HANDLE bufferingMutex;
- HANDLE bufferingThread;
- DWORD bufferingThreadId;
- unsigned int stride;
- BOOL suspended;
- DWORD endReachedAt;
- BOOL enabled;
- MediaVideoBuffer();
- ~MediaVideoBuffer();
- /*
- * 媒体项方法
- */
- 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 StartBuffering(unsigned int stride);
- MP_RESULT StopBuffering();
- MediaBuffer *GetOneFrame();
- MediaBuffer *GetLastFrame();
- MP_RESULT DropOneFrame();
- };
- #endif