InputInternet.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:2k
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #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