Ijkplayer Reading notes 01

Source: Internet
Author: User

Ijkplayer Reading notes

1. This chapter resolves the Ijkplayer Playback library initialization section, directly affixed to the process pseudo-code as follows:

ijkmediaplayer_native_setup{ijkmp_android_create (message_loop) {mp->ffplayer->vout = SDL_VoutAndroid_Create Forandroidsurface (); {Sdl_voutandroid_createforanativewindow (); {vout->create_overlay = Vout_create_overlay;           {sdl_voutamediacodec_createoverlay; or sdl_voutffmpeg_createoverlay; }} vout->display_overlay = Voud_display_overlay;           {Sdl_voutoverlayamediacodec_releaseframe (overlay, NULL, true);        Or sdl_android_nativewindow_display_l (Native_window, overlay); }} mp->ffplayer->aout = Sdl_aoutandroid_createforaudiotrack (); {Aout->open_audio = Aout_open_audio;                  {aout_open_audio_n{Sdl_createthreadex (&opaque->_audio_tid, aout_thread); { aout_thread_n{while (!opaque->abort_request) {audio_cblk (UserData, buf Fer, copy_size); {Sdl_audio_callback (VOID *opaque, Uint8 *stream, int len) {while (len > 0) {AUD Io_size = Audio_decode_frame (FFP); {af = frame_queue_peek_readable (&IS->SAMPQ) is                                 ->audio_buf = af->frame->data[0];                               } memcpy (Stream, (uint8_t *) Is->audio_buf + is->audio_buf_index, len1);               }                           }                        }                     }                  } }}}} Mp->ffplayer->pipeline = Ffpipeline_create_from_android (Mp->ffplayer) ;         {Pipeline->func_destroy = Func_destroy;         Pipeline->func_open_video_decoder = Func_open_video_decoder; {if (opaque->mediacodec_enabled) node = Ffpipenode_create_video_decoder_from_android_medi Acodec (FFP);   {                func_run_sync{Sdl_createthreadex (enqueue_thread_func) {Whil E (!q->abort_request) {feed_input_buffer{ffp_packet_queue _get_or_buffering Sdl_amediacodec_dequeueinputbuffer Input_b Uffer_ptr = Sdl_amediacodec_getinputbuffer memcpy (input_buffer_ptr, D->pkt_temp.data, CO                               Py_size);                      Sdl_amediacodec_queueinputbuffer}}}              while{Drain_output_buffer}}}                 if (!node) node = Ffpipenode_create_video_decoder_from_ffplay (FFP);                    {func_run_sync{ffp_video_thread (OPAQUE->FFP); {        for (;;)                                {Get_video_frame (FFP, frame);          Queue_picture}}}} Pipeline->func_open_video_output = Func_open_video_output;             {Ffpipenode_create_video_output_from_android_mediacodec (FFP); Node->func_run_sync = Func_run_sync;             {Ffp_video_refresh_thread (OPAQUE->FFP);   }}} ffpipeline_set_vout (Mp->ffplayer->pipeline, mp->ffplayer->vout); } Jni_set_media_player}


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ijkplayer Reading notes 01

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.