iOS ijkplayer stream_open 函数详解
来源:互联网 发布:windows update打不开 编辑:程序博客网 时间:2024/05/29 17:27
创建存放video/audio解码前数据的videoq/audioq创建存放video/audio解码后数据的pictq/sampq/* start video display */ if (frame_queue_init(&is->pictq, &is->videoq, ffp->pictq_size, 1) < 0) goto fail; if (frame_queue_init(&is->subpq, &is->subtitleq, SUBPICTURE_QUEUE_SIZE, 0) < 0) goto fail; if (frame_queue_init(&is->sampq, &is->audioq, SAMPLE_QUEUE_SIZE, 1) < 0) goto fail;FrameQueue video/audio解码后数据的pictq/sampqPacketQueue *pktq video/audio解码前数据的videoq/audioqstatic int frame_queue_init(FrameQueue *f, PacketQueue *pktq, int max_size, int keep_last)static VideoState *stream_open(FFPlayer *ffp, const char *filename, AVInputFormat *iformat){ assert(!ffp->is); VideoState *is; is = av_mallocz(sizeof(VideoState)); if (!is) return NULL; is->filename = av_strdup(filename); if (!is->filename) goto fail; is->iformat = iformat; is->ytop = 0; is->xleft = 0;#if defined(__ANDROID__) if (ffp->soundtouch_enable) { is->handle = ijk_soundtouch_create(); }#endif /* start video display */ if (frame_queue_init(&is->pictq, &is->videoq, ffp->pictq_size, 1) < 0) goto fail; if (frame_queue_init(&is->subpq, &is->subtitleq, SUBPICTURE_QUEUE_SIZE, 0) < 0) goto fail; if (frame_queue_init(&is->sampq, &is->audioq, SAMPLE_QUEUE_SIZE, 1) < 0) goto fail; if (packet_queue_init(&is->videoq) < 0 || packet_queue_init(&is->audioq) < 0 || packet_queue_init(&is->subtitleq) < 0) goto fail; if (!(is->continue_read_thread = SDL_CreateCond())) { av_log(NULL, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError()); goto fail; } if (!(is->video_accurate_seek_cond = SDL_CreateCond())) { av_log(NULL, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError()); ffp->enable_accurate_seek = 0; } if (!(is->audio_accurate_seek_cond = SDL_CreateCond())) { av_log(NULL, AV_LOG_FATAL, "SDL_CreateCond(): %s\n", SDL_GetError()); ffp->enable_accurate_seek = 0; } init_clock(&is->vidclk, &is->videoq.serial); init_clock(&is->audclk, &is->audioq.serial); init_clock(&is->extclk, &is->extclk.serial); is->audio_clock_serial = -1; is->audio_volume = SDL_MIX_MAXVOLUME; is->muted = 0; is->av_sync_type = ffp->av_sync_type; is->play_mutex = SDL_CreateMutex(); is->accurate_seek_mutex = SDL_CreateMutex(); ffp->is = is; is->pause_req = !ffp->start_on_prepared; is->video_refresh_tid = SDL_CreateThreadEx(&is->_video_refresh_tid, video_refresh_thread, ffp, "ff_vout"); if (!is->video_refresh_tid) { av_freep(&ffp->is); return NULL; } is->read_tid = SDL_CreateThreadEx(&is->_read_tid, read_thread, ffp, "ff_read"); if (!is->read_tid) { av_log(NULL, AV_LOG_FATAL, "SDL_CreateThread(): %s\n", SDL_GetError());fail: is->abort_request = true; if (is->video_refresh_tid) SDL_WaitThread(is->video_refresh_tid, NULL); stream_close(ffp); return NULL; } return is;}
阅读全文
0 0
- iOS ijkplayer stream_open 函数详解
- iOS ijkplayer prepareToPlay 函数详解
- iOS ijkplayer 播放器 消息循环 详解
- iOS ijkplayer 数据缓存过程 详解
- ijkplayer iOS 音视频解码 详解
- IOS使用ijkPlayer
- IOS使用ijkPlayer
- iOS 直播 IJKPlayer
- iOS集成IJKPlayer
- IOS使用ijkPlayer
- IOS使用ijkPlayer
- ijkplayer iOS初始化
- ios端集成ijkplayer
- ios端ijkplayer编译
- IOS IJKPlayer播放RTSP
- ios集成ijkplayer框架
- IOS集成ijkplayer
- ijkplayer详解使用教程
- Linux基础-6(Samba服务)
- 如何在CAD中将矢量地图与卫星影像完美叠加
- 项目性能监控javamelody和数据库监控druid
- Kotlin -- 委托
- linux超级基础系列—什么是shell? bash和shell有什么关系?
- iOS ijkplayer stream_open 函数详解
- XCode启动时候卡住无法打开项目的解决方法
- 同步,异步与多线程的关系
- sd卡的了解(一)
- nginx 限制并发连接数 limit_zone one
- iOS ijkplayer 数据缓存过程 详解
- 我的前端开发之路---谨以记录工作中那些踩过的坑,持续更新中~~
- 第五部分 模块
- Java 泛型详解