待写。。。
这篇文章 可以分析下 stream_component_open() 函数。这个函数主要是为audio 解码并调用SDL播放作了些准备工作,但是里面涉及到 avcodec_open2()、audio_open()、decoder_init()、decoder_start()。
audio_open()中有 sdl_audio_callback(),sdl_audio_callback()中有audio_decode_frame();而decoder_start()中有 audio_thread(),audio_thread()中有decoder_decode_frame()。 具体audio_decode_frame()与 decoder_decode_frame()分别是作什么用的,二者又有什么关系???在本文中进行讲述,待写。。。