CPI_Stream.c
资源名称:VC++视频传输.rar [点击查看]
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:1k
源码类别:
VC书籍
开发平台:
Visual C++
- #include "stdafx.h"
- #include "globals.h"
- #include "CPI_Stream.h"
- CPs_InStream* CP_CreateInStream_LocalFile(const char* pcFlexiURL, HWND hWndOwner);
- CPs_InStream* CP_CreateInStream_Internet(const char* pcFlexiURL, HWND hWndOwner);
- //
- CPs_InStream* CP_CreateInStream(const char* pcFlexiURL, HWND hWndOwner)
- {
- CPs_InStream* pNewStream = NULL;
- int iURLLen = strlen(pcFlexiURL);
- if(iURLLen > 5)
- {
- char cHeader[6];
- memcpy(cHeader, pcFlexiURL, 5);
- cHeader[5] = ' ';
- if(stricmp(cHeader, "http:") == 0)
- {
- pNewStream = CP_CreateInStream_Internet(pcFlexiURL, hWndOwner);
- if(pNewStream)
- return pNewStream;
- }
- }
- pNewStream = CP_CreateInStream_LocalFile(pcFlexiURL, hWndOwner);
- if(pNewStream)
- return pNewStream;
- return NULL;
- }