VideoBuffer.h
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:2k
源码类别:
VC书籍
开发平台:
Visual C++
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #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