本文整理汇总了C++中Media::get_info方法的典型用法代码示例。如果您正苦于以下问题:C++ Media::get_info方法的具体用法?C++ Media::get_info怎么用?C++ Media::get_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Media
的用法示例。
在下文中一共展示了Media::get_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char **argv)
{
SDL_Event *event = av_mallocz(sizeof(SDL_Event));
Content *content = av_mallocz(sizeof(Content));
Media *video = av_mallocz(sizeof(Media));
Media *audio = av_mallocz(sizeof(Media));
State *state = av_mallocz(sizeof(State));
SDL_Thread *video_decode_tid1;
SDL_Thread *video_decode_tid2;
SDL_Thread *read_pkt_tid;
SDL_Thread *refresh_tid;
// InitPool(2);
state->content = content;
state->video = video;
state->audio = audio;
init_video(video);
if(argc < 2) {
LOGE("Usage : play <content>");
exit(1);
}
av_register_all();
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
LOGE("fail to initialize SDL");
exit(1);
}
av_strlcpy(content->name, argv[1], sizeof(content->name));
LOGE("addr : %x", video->frame_buf);
get_content_info(content);
LOGI("finding streams");
find_av_streams(content, video, audio);
LOGI("finding decoder");
find_decoder(video);
video->get_info(video);
LOGI("creating reading thread...");
read_pkt_tid = SDL_CreateThread(queue_av_pkt, "read", state);
LOGI("initing screen");
init_screen(video);
// LOGI("alloc frame");
alloc_frame(video);
LOGI("alloc all the frame");
// alloc_all_frame(video);
LOGI("creating decode thread1...");
video_decode_tid1 = SDL_CreateThread(decode_video, "decode1", video);
refresh(state, 50);
event_handle(event);
return 0;
}