Demuxing and decoding example. More...
#include <libavutil/imgutils.h>
#include <libavutil/samplefmt.h>
#include <libavutil/timestamp.h>
#include <libavformat/avformat.h>
Go to the source code of this file.
Demuxing and decoding example.
Show how to use the libavformat and libavcodec API to demux and decode audio and video data.
Definition in file demuxing_decoding.c.
Definition at line 64 of file demuxing_decoding.c.
Referenced by main().
Definition at line 150 of file demuxing_decoding.c.
Referenced by main().
Definition at line 190 of file demuxing_decoding.c.
Referenced by main().
Definition at line 219 of file demuxing_decoding.c.
Definition at line 37 of file demuxing_decoding.c.
Referenced by close_input_file(), main(), open_input_file(), probe_file(), seek_test(), video_decode(), and video_decode_example().
Definition at line 38 of file demuxing_decoding.c.
Definition at line 38 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 39 of file demuxing_decoding.c.
Referenced by abgrToA_c(), add_rect_clamped_c(), aic_decode_header(), alias_pix_read_probe(), alloc_buffers(), alloc_lines(), alloc_picture(), anaglyph(), anaglyph_ic(), apply_loop_filter(), av_parse_video_size(), avfilter_graph_dump_to_buf(), avfilter_transform(), avg_tpel_pixels_mc01_c(), avg_tpel_pixels_mc02_c(), avg_tpel_pixels_mc10_c(), avg_tpel_pixels_mc11_c(), avg_tpel_pixels_mc12_c(), avg_tpel_pixels_mc20_c(), avg_tpel_pixels_mc21_c(), avg_tpel_pixels_mc22_c(), bayer_to_rgb24_wrapper(), bayer_to_yv12_wrapper(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bink_decode_plane(), bitplane_decoding(), bktr_init(), blend_normal_16bit(), blend_normal_8bit(), bmp_decode_frame(), bswap16UV_c(), bswap16Y_c(), build_abs_diff_mask(), calc_combed_score(), calc_diffs(), calculate_display_rect(), calculate_visual_weight(), cdxl_read_packet(), check_codec_match(), chrRangeFromJpeg16_c(), chrRangeFromJpeg_c(), chrRangeToJpeg16_c(), chrRangeToJpeg_c(), codec_reinit(), codecctl_int(), compare_fields(), config_input(), config_output(), copy_block(), copy_CTB(), copy_frame(), count_usage(), dc1394_read_common(), decode_13(), decode_bdlt(), decode_block(), decode_clnpass(), decode_colskip(), decode_dds1(), decode_entropy_coded_image(), decode_entropy_image(), decode_fctl_chunk(), decode_frame(), decode_frame_header(), decode_frame_headers(), decode_header(), decode_i2_frame(), decode_i_frame(), decode_mvc1(), decode_p_frame(), decode_packet(), decode_ppc(), decode_refpass(), decode_region(), decode_region_masked(), decode_rowskip(), decode_seq_header(), decode_sigpass(), decode_slice(), decode_subband_internal(), decode_vol_header(), decode_wdlt(), deflate(), deinterleave(), deinterleaveBytes_c(), deshake_transform_c(), device_init(), dilation(), dirac_hpel_filter(), draw_n_color(), dump_enc_cfg(), dump_paramchange(), duplicate_right_border_pixels(), dx2_decode_slice_410(), dx2_decode_slice_420(), dx2_decode_slice_444(), dx2_decode_slice_5x5(), dx2_decode_slice_rgb(), dxtory_decode_v1_444(), dxtory_decode_v1_rgb(), encode_15_7_sl(), encode_cblk(), encode_clnpass(), encode_frame(), encode_picture_ls(), encode_refpass(), encode_sigpass(), encode_slice(), erosion(), evalfunc_0(), evalfunc_1(), execute_code(), extract_from_packed(), fade(), ff_copy_rectangle(), ff_draw_rectangle(), ff_flac_parse_picture(), ff_flv_decode_picture_header(), ff_gmc_c(), ff_gradfun_blur_line_c(), ff_gradfun_filter_line_c(), ff_h263_decode_frame(), ff_h263_decode_picture_header(), ff_h264_decode_seq_parameter_set(), ff_hevc_put_qpel_bi_neon_wrapper(), ff_hevc_put_qpel_neon_wrapper(), ff_hevc_put_qpel_uni_neon_wrapper(), ff_jpegls_decode_picture(), ff_mjpeg_decode_sof(), ff_opencl_apply_unsharp(), ff_print_debug_info2(), ff_rtjpeg_decode_init(), ff_snow_vertical_compose97i(), ff_vc1_mc_4mv_luma(), ff_vda_create_decoder(), ff_vda_default_init(), ff_vdpau_common_init(), ff_video_frame_pool_init(), fill_yuv_image(), filter(), filter_3x3(), filter_5x5(), filter_frame(), filter_slice(), filter_slice_chroma(), gbr16ptopacked16(), gbr24ptopacked24(), gbr24ptopacked32(), gbr24pToUV_half_c(), gif_image_write_image(), gif_read_header(), gif_read_image(), hermite_interpolation(), hqa_decode_frame(), hqx_filter(), idcin_read_header(), inflate(), init_dimensions(), init_sizes(), inter_predict(), interleaveBytes_c(), interleaveBytes_TMPL(), INTERPOLATE_METHOD(), jpeg_parse_packet(), kempf_decode_tile(), kempf_restore_buf(), lag_decode_arith_plane(), lag_pred_line_yuy2(), left_predict(), libopenjpeg_copy_unpacked16(), libopenjpeg_copy_unpacked8(), libopenjpeg_decode_frame(), ljpeg_encode_bgr(), ljpeg_encode_frame(), loco_decode_plane(), lowpass_line_c(), luma_abs_diff(), lumRangeFromJpeg16_c(), lumRangeFromJpeg_c(), lumRangeToJpeg16_c(), lumRangeToJpeg_c(), main(), mangle_rgb_planes(), mca(), median_predict(), mimic_decode_frame(), monoblack2Y_c(), monowhite2Y_c(), mov_create_dvd_sub_decoder_specific_info(), mov_read_tkhd(), mov_write_tapt_tag(), mpeg1_decode_sequence(), mpeg1_encode_sequence_header(), msnwc_tcp_probe(), msrle_decode_8_16_24_32(), msrle_decode_pal4(), mss4_decode_frame(), mvc_decode_init(), noise(), nuv_header(), nvXXtoUV_c(), old_codec37(), old_codec47(), op(), opengl_resize(), optimum_block_width(), output_mpd(), p010BEToUV_c(), p010BEToY_c(), p010LEToUV_c(), p010LEToY_c(), packed16togbra16(), packedtogbr24p(), paint_mouse_pointer(), palToA_c(), palToUV_c(), palToY_c(), parse_object_segment(), pic_arrays_init(), planar_rgb16_to_uv(), planar_rgb16_to_y(), planar_rgb_to_a(), planar_rgb_to_uv(), planar_rgb_to_y(), png_get_interlaced_row(), png_put_interlaced_row(), postProcess_TMPL(), pp_postprocess(), process_command(), process_ipmovie_chunk(), process_line0(), process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), process_slice_yuv444p(), put_hevc_epel_bi_h(), put_hevc_epel_bi_hv(), put_hevc_epel_bi_v(), put_hevc_epel_bi_w_h(), put_hevc_epel_bi_w_hv(), put_hevc_epel_bi_w_v(), put_hevc_epel_h(), put_hevc_epel_hv(), put_hevc_epel_uni_h(), put_hevc_epel_uni_hv(), put_hevc_epel_uni_v(), put_hevc_epel_uni_w_h(), put_hevc_epel_uni_w_hv(), put_hevc_epel_uni_w_v(), put_hevc_epel_v(), put_hevc_pel_bi_pixels(), put_hevc_pel_bi_w_pixels(), put_hevc_pel_pixels(), put_hevc_pel_uni_w_pixels(), put_hevc_qpel_bi_h(), put_hevc_qpel_bi_hv(), put_hevc_qpel_bi_v(), put_hevc_qpel_bi_w_h(), put_hevc_qpel_bi_w_hv(), put_hevc_qpel_bi_w_v(), put_hevc_qpel_h(), put_hevc_qpel_hv(), put_hevc_qpel_uni_h(), put_hevc_qpel_uni_hv(), put_hevc_qpel_uni_v(), put_hevc_qpel_uni_w_h(), put_hevc_qpel_uni_w_hv(), put_hevc_qpel_uni_w_v(), put_hevc_qpel_v(), put_line(), put_pcm(), put_signed_rect_clamped_8bit_c(), put_tpel_pixels_mc01_c(), put_tpel_pixels_mc02_c(), put_tpel_pixels_mc10_c(), put_tpel_pixels_mc11_c(), put_tpel_pixels_mc12_c(), put_tpel_pixels_mc20_c(), put_tpel_pixels_mc21_c(), put_tpel_pixels_mc22_c(), qpeg_decode_inter(), qtrle_encode_line(), read4x4block(), read_ayuv64le_A_c(), read_ayuv64le_UV_c(), read_ayuv64le_Y_c(), read_header(), read_sm_data(), read_ya16be_alpha_c(), read_ya16be_gray_c(), read_ya16le_alpha_c(), read_ya16le_gray_c(), restore_tqb_pixels(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_c_template(), rgb24_copy(), rgb24_interpolate(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb48funcs(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb64funcs(), rgb64ToUV_c_template(), rgb64ToUV_half_c_template(), rgb64ToY_c_template(), rgba64beToA_c(), rgba64leToA_c(), rgbaToA_c(), rpza_decode_stream(), rv34_mc(), sao_band_filter(), sao_edge_filter(), sao_edge_restore_0(), sao_edge_restore_1(), sao_filter_CTB(), selective_color(), set_processing_window(), shrink88(), siff_parse_vbv1(), smc_decode_stream(), smush_read_header(), snow_interleave_line_header(), spatial_compose53i_dy_buffered(), spatial_compose_daub97i_dy_TMPL(), spatial_compose_dd137i_dy_TMPL(), spatial_compose_dd97i_dy_TMPL(), spatial_compose_dirac53i_dy_TMPL(), spatial_compose_fidelity_TMPL(), spatial_compose_haari_dy_TMPL(), ssim_4x4xn(), ssim_end4(), ssim_endn(), ssim_plane(), stereo_processing(), store_slice16_c(), store_slice2_c(), store_slice_c(), super2xsai(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), svq1_decode_frame(), svq1_decode_frame_header(), svq1_encode_plane(), swf_read_packet(), swf_write_header(), tdsc_blit(), theora_header(), tiff_unpack_strip(), to_meta_with_crop(), utvideo_encode_frame(), uyvyToUV_c(), uyvyToY_c(), uyvytoyuv420_TMPL(), uyvytoyuv422_TMPL(), vb_decode_framedata(), vble_restore_plane(), vdpau_get_buffer(), verify_md5(), vertical_compose53iH0(), vertical_compose53iL0(), vertical_compose53iL0_TMPL(), vertical_compose97iH0(), vertical_compose97iH1(), vertical_compose97iL0(), vertical_compose97iL1(), vertical_compose_daub97iH0_TMPL(), vertical_compose_daub97iH1_TMPL(), vertical_compose_daub97iL0_TMPL(), vertical_compose_daub97iL1_TMPL(), vertical_compose_dd137iL0_TMPL(), vertical_compose_dd97iH0_TMPL(), vertical_compose_dirac53iH0_TMPL(), vertical_compose_fidelityiH0_TMPL(), vertical_compose_fidelityiL0_TMPL(), vertical_compose_haar_TMPL(), vertical_decompose53iH0(), vertical_decompose53iL0(), vertical_decompose97iH0(), vertical_decompose97iH1(), vertical_decompose97iL0(), vertical_decompose97iL1(), decklink_input_callback::VideoInputFrameArrived(), vmd_read_header(), vp7_decode_frame_header(), vp7_fade_frame(), vp8_decode_frame_header(), write_huff_codes(), xan_wc3_copy_pixel_run(), xan_wc3_decode_frame(), xan_wc3_output_pixel_run(), xbm_decode_frame(), xsub_encode(), yuv422ptouyvy_TMPL(), yuv422ptoyuy2_TMPL(), yuv4_generate_header(), yuv4_read_header(), yuv4_write_packet(), yuvPlanartouyvy_TMPL(), yuvPlanartoyuy2_TMPL(), yuy2ToUV_c(), yuy2ToY_c(), yuy2toyv12_TMPL(), yuyvtoyuv420_TMPL(), yuyvtoyuv422_TMPL(), yv12_copy(), yv12_interpolate(), yv12touyvy_TMPL(), yv12toyuy2_TMPL(), yvy2ToUV_c(), and zero12v_decode_frame().
Definition at line 39 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 40 of file demuxing_decoding.c.
Referenced by alloc_picture(), av_get_pix_fmt(), av_get_pix_fmt_name(), av_get_pix_fmt_string(), av_pix_fmt_desc_get(), avi_write_header(), dc1394_read_common(), decode_packet(), dshow_cycle_formats(), fbdev_read_header(), fbdev_write_header(), ff_img_read_header(), ff_parse_pixel_format(), ff_vda_default_init(), ffserver_parse_config_stream(), get_pix_fmt_internal(), init(), list_formats(), load_mask(), main(), mpegvideo_extract_headers(), opengl_draw(), opengl_fill_color_map(), qsv_transcode_init(), query_formats(), rawvideo_read_header(), sdl_write_header(), set_sps(), show_pix_fmts(), swf_read_packet(), sws_isSupportedEndiannessConversion(), sws_isSupportedInput(), sws_isSupportedOutput(), v4l2_read_header(), xwd_encode_frame(), and yuv4_read_header().
Definition at line 41 of file demuxing_decoding.c.
Referenced by event_loop(), seek_test(), video_decode(), video_decode_example(), and yop_read_header().
Definition at line 41 of file demuxing_decoding.c.
Referenced by event_loop(), main(), and yop_read_header().
Definition at line 42 of file demuxing_decoding.c.
Referenced by main(), and open_codec_context().
Definition at line 43 of file demuxing_decoding.c.
Referenced by main().
Definition at line 44 of file demuxing_decoding.c.
Referenced by main().
Definition at line 45 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 46 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 48 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 49 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 50 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 52 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 52 of file demuxing_decoding.c.
Referenced by decode_packet(), and main().
Definition at line 53 of file demuxing_decoding.c.
Referenced by a64multi_encode_frame(), ac3_decode_frame(), add_frame(), add_timecode_metadata(), add_to_queue(), adpcm_decode_frame(), adx_decode_frame(), alac_decode_frame(), alloc_audio_frame(), alloc_frame(), amrnb_decode_frame(), amrwb_decode_frame(), ape_decode_frame(), aqt_probe(), aqt_read_header(), atrac1_decode_frame(), atrac3_decode_frame(), atrac3p_decode_frame(), audio_encode_example(), aura_decode_frame(), av_frame_alloc(), avisynth_read_packet_video(), bfi_decode_frame(), bmv_aud_decode_frame(), cdg_decode_frame(), celt_decode_coarse_energy(), celt_decode_fine_energy(), cfhd_decode(), channel_decorrelation(), cinaudio_decode_frame(), cmv_decode_frame(), cng_decode_frame(), compand_drain(), compand_nodelay(), cook_decode_frame(), copy_samples(), cpia_decode_frame(), cyuv_decode_frame(), dcadec_decode_frame(), dds_decode(), decklink_write_video_packet(), decode_bdlt(), decode_bmv_frame(), decode_dds1(), decode_dsw1(), decode_entropy_coded_image(), decode_frame(), decode_tag(), decode_tsw1(), decode_wdlt(), decompress_texture_thread(), dfa_decode_frame(), dirac_decode_frame_internal(), dnxhd_decode_frame(), do_chromakey_slice(), do_colorkey_slice(), downscale(), dpcm_decode_frame(), dss_sp_decode_frame(), dv_write_packet(), dvvideo_decode_frame(), dvvideo_encode_frame(), eightsvx_decode_frame(), encode_frame(), encode_residual_ch(), escape124_decode_frame(), evrc_decode_frame(), fdk_aac_decode_frame(), ff_celt_decode_frame(), ff_celt_flush(), ff_decklink_read_packet(), ff_default_get_audio_buffer(), ff_filter_frame_framed(), ff_framesync_get_frame(), ff_h264_fill_mbaff_ref_list(), ff_hevc_bump_frame(), ff_hevc_frame_rps(), ff_hevc_output_frame(), ff_init_buffer_info(), ff_ivi_decode_frame(), ff_load_image(), ff_mjpeg_decode_frame(), ff_twinvq_decode_frame(), ff_video_frame_pool_get(), ffmmal_decode(), fill_picture_parameters(), fill_vaapi_ReferenceFrames(), filter_frame(), filter_frame_left(), filter_frame_right(), filter_slice_alpha(), filter_slice_chroma(), filter_slice_luma(), filter_slice_rgb(), flac_decode_frame(), framesync_inject_frame(), g722_decode_frame(), g723_1_decode_frame(), generate_missing_ref(), get_audio_frame(), get_free_frame(), get_pts(), get_surface(), get_video_buffer(), gsm_decode_frame(), hnm_decode_frame(), idcin_decode_frame(), ilbc_decode_frame(), imc_decode_frame(), init_frame(), init_slice_rpl(), ipvideo_decode_frame(), ipvideo_decode_opcodes(), jpeg2000_decode_frame(), lag_decode_frame(), lavfi_read_packet(), libcelt_dec_decode(), libgsm_decode_frame(), libopenjpeg_decode_frame(), libopus_decode(), libschroedinger_decode_frame(), libspeex_decode_frame(), mace_decode_frame(), main(), microdvd_read_header(), movie_push_frame(), mpc7_decode_frame(), mpc8_decode_frame(), mss2_decode_frame(), mv_read_packet(), mv_read_seek(), mxf_write_system_item(), oggvorbis_decode_frame(), on2avc_decode_frame(), opus_decode_packet(), output_frame_end(), pad_last_frame(), paf_audio_decode(), paf_video_decode(), parse_postfilter(), pcm_bluray_decode_frame(), pcm_decode_frame(), pcm_dvd_decode_frame(), pix_decode_frame(), push_frame(), push_single_pic(), qcelp_decode_frame(), qdm2_decode_frame(), qsv_decode_frame(), ra144_decode_frame(), ra288_decode_frame(), raw_decode(), read_interval_packets(), request_frame(), rl2_decode_frame(), roq_encode_frame(), rscc_decode_frame(), s302m_decode_frame(), decklink_output_callback::ScheduledFrameCompleted(), screenpresso_decode_frame(), shorten_decode_frame(), silk_decode_frame(), sipr_decode_frame(), smka_decode_frame(), source_request_frame(), sub2video_get_blank_frame(), sub2video_push_ref(), sub2video_update(), swf_read_packet(), tak_decode_frame(), tdsc_decode_frame(), tgq_decode_frame(), tgv_decode_frame(), tmv_decode_frame(), truespeech_decode_frame(), try_decode_frame(), try_decode_video_frame(), try_push_frame(), tta_decode_frame(), uninit(), unpack_frame(), v4l2_read_packet(), vc1_probe(), vda_h264_end_frame(), vda_old_h264_end_frame(), vdpau_hevc_start_frame(), video_decode_example(), video_encode_example(), vmd_read_packet(), vmdaudio_decode_frame(), vmdvideo_decode_frame(), vorbis_decode_frame(), vp8_find_free_buffer(), vqa_decode_frame(), wavesynth_decode(), wavpack_decode_frame(), wma_decode_superframe(), worker(), wrapped_avframe_release_buffer(), write_audio_frame(), write_frame_header(), write_packet(), write_video_frame(), ws_snd_decode_frame(), xan_decode_frame(), xface_decode_frame(), yop_decode_frame(), and yuv4_write_packet().
Definition at line 54 of file demuxing_decoding.c.
Referenced by add_to_pktbuf(), ape_tag_read_field(), asf_deinterleave(), asf_read_header(), asf_read_picture(), asf_read_pts(), asf_read_timestamp(), audio_encode_example(), audio_write_frame(), av_apply_bitstream_filters(), av_dup_packet(), av_packet_alloc(), av_packet_merge_side_data(), av_write_trailer(), av_write_uncoded_frame_internal(), avformat_find_stream_info(), avpacket_queue_flush(), avpacket_queue_put(), avpriv_mpegts_parse_packet(), compute_crc_of_packets(), decoder_decode_frame(), do_audio_out(), do_subtitle_out(), do_video_out(), encode_callback(), encode_frame(), estimate_timings_from_pts(), extract_mpeg4_header(), ff_init_buffer_info(), ff_interleave_add_packet(), ff_ivi_decode_frame(), ff_load_image(), ff_qsv_decode_reset(), ff_qsv_enc_close(), ff_write_chained(), ffmmal_decode(), filter(), filter_frame(), filter_packet(), find_missing_packets(), find_video_stream_info(), flac_read_timestamp(), flush_encoders(), flush_packet(), free_pkt_fifo(), gen_buffer_time(), gen_bytes_read(), gen_check_bw(), gen_connect(), gen_create_stream(), gen_delete_stream(), gen_fcpublish_stream(), gen_fcsubscribe_stream(), gen_fcunpublish_stream(), gen_get_stream_length(), gen_pause(), gen_play(), gen_pong(), gen_publish(), gen_release_stream(), gen_seek(), gen_server_bw(), gen_swf_verification(), gxf_compare_field_nb(), http_prepare_data(), ipmovie_read_header(), mace_decode_frame(), main(), matroska_parse_frame(), matroska_parse_rm_audio(), matroska_parse_webvtt(), mov_read_covr(), movie_push_frame(), mpc_read_seek(), mpegts_get_dts(), mpegts_read_packet(), mux_frames(), nsv_read_chunk(), opus_decode_packet(), packet_queue_flush(), packet_queue_put_nullpacket(), packet_queue_put_private(), parse_file(), process_callback(), process_input(), process_input_packet(), pulse_write_frame(), qsv_packet_push_front(), queue_frames(), read_connect(), read_interval_packets(), read_thread(), reset_packet_state(), seek_frame_generic(), signal_init_ts(), str_read_packet(), supply_new_packets(), try_decode_frame(), video_decode(), video_decode_example(), video_encode_example(), decklink_input_callback::VideoInputFrameArrived(), vp8_lossy_decode_frame(), wavpack_encode_frame(), webm_clusters_start_with_keyframe(), worker(), write_audio_frame(), and write_video_frame().
Definition at line 55 of file demuxing_decoding.c.
Referenced by decode_packet().
Definition at line 56 of file demuxing_decoding.c.
Referenced by decode_packet(), and fourxm_read_packet().
Definition at line 62 of file demuxing_decoding.c.
Referenced by decode_packet(), main(), and open_codec_context().