InputInternet.h
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:2k
源码类别:
VC书籍
开发平台:
Visual C++
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef INPUT_INTERNET_H
- #define INPUT_INTERNET_H
- #include "MediaClasses.h"
- #include <wininet.h>
- #include <fcntl.h>
- #include <stdio.h>
- #include <io.h>
- #include <crtdbg.h>
- #define BUFFERING_SIZE 1024000
- class MediaInputInternet : public MediaItemInput {
- public:
- FILE *file;
- FILE *dnld;
- HINTERNET hInternet;
- HINTERNET http;
- HANDLE httpThread;
- HANDLE bufferingMutex;
- DWORD httpId;
- DWORD running;
- DWORD buffering;
- DWORD downloaded;
- DWORD size;
- DWORD lastReadPos;
- MediaInputInternet();
- ~MediaInputInternet();
- 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 Open(char *url, media_input_mode_t mode);
- long GetSize();
- long GetBufferSize();
- long GetBufferPosition();
- long GetBufferingSize();
- unsigned int Read(MediaBuffer *mb, unsigned int size);
- unsigned int Seek(int size, media_input_seek_t method);
- BOOL EndOfFile();
- unsigned int GetLine(MediaBuffer *mb);
- MP_RESULT Close();
- };
- #endif