資源簡介
ffmpeg獲取RTSP視頻流信息
代碼片段和文件信息
#include?“FFPlayVeido.h“
?
FFPlayVedio::FFPlayVedio(HWND?hwd)
{
????char?sdl_var[64];
????sprintf(sdl_var?“SDL_WINDOWID=%d“?hwd);?//主窗口句柄???
????putenv(sdl_var);
????//初始化
????av_register_all();
????avformat_network_init();
?
????if?(SDL_Init(SDL_INIT_VIDEO?|?SDL_INIT_AUDIO?|?SDL_INIT_TIMER))?{
????????printf(“Could?not?initialize?SDL?-?%s\n“?SDL_GetError());
????????return;
????}
}
FFPlayVedio::~FFPlayVedio()
{
?
}
?
void?FFPlayVedio::OnInit(HWND?hwd)
{
?
}
void?FFPlayVedio::GetVedioPlay(?char?*name)
{
?
????AVFormatContext?*pFormatCtx;
????int?????????????i?videoindex;
????AVCodecContext??*pCodecCtx;
????AVCodec?????????*pCodec;
????char?filepath[]?=?“rtsp://admin:123456@192.168.1.252:554/mpeg4cif“;
?
????pFormatCtx?=?avformat_alloc_context();
?
??
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5464??2015-09-23?14:10??CPlay.cpp
-----------?---------??----------?-----??----
?????????????????5464????????????????????1
- 上一篇:C++ 解碼h264
- 下一篇:directx驅動攝像頭
評論
共有 條評論