FFmpeg
|
#include <string.h>
#include <sys/types.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/hwcontext_mediacodec.h"
#include "libavutil/mem.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
#include "libavutil/time.h"
#include "libavutil/timestamp.h"
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "decode.h"
#include "mediacodec.h"
#include "mediacodec_surface.h"
#include "mediacodec_sw_buffer.h"
#include "mediacodec_wrapper.h"
#include "mediacodecdec_common.h"
Go to the source code of this file.
Macros | |
#define | INPUT_DEQUEUE_TIMEOUT_US 8000 |
OMX.k3.video.decoder.avc, OMX.NVIDIA. More... | |
#define | OUTPUT_DEQUEUE_TIMEOUT_US 8000 |
#define | OUTPUT_DEQUEUE_BLOCK_TIMEOUT_US 1000000 |
#define | AMEDIAFORMAT_GET_INT32(name, key, mandatory) |
Variables | |
struct { | |
int pcm_format | |
enum AVSampleFormat sample_format | |
} | sample_formats [] |
struct { | |
int mask | |
uint64_t layout | |
} | channel_masks [] |
struct { | |
int color_format | |
enum AVPixelFormat pix_fmt | |
} | color_formats [] |
#define INPUT_DEQUEUE_TIMEOUT_US 8000 |
OMX.k3.video.decoder.avc, OMX.NVIDIA.
Gstreamer references: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/androidmedia/
Gstreamer copyright notice:
Copyright (C) 2012, Collabora Ltd. Author: Sebastian Dröge sebas tian .droe ge@c ollab ora. co.uk
Copyright (C) 2012, Rafaël Carré <funman@videolanorg>
Copyright (C) 2015, Sebastian Dröge sebas tian @cent ricu lar.c om
Copyright (C) 2014-2015, Collabora Ltd. Author: Matthieu Bouron matth ieu. bouro n@gc ollab ora. com
Copyright (C) 2015, Edward Hervey Author: Edward Hervey bilbo ed@g mail. com
Copyright (C) 2015, Matthew Waters matth ew@c entri cula r.com
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation version 2.1 of the License.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 86 of file mediacodecdec_common.c.
#define OUTPUT_DEQUEUE_TIMEOUT_US 8000 |
Definition at line 87 of file mediacodecdec_common.c.
#define OUTPUT_DEQUEUE_BLOCK_TIMEOUT_US 1000000 |
Definition at line 88 of file mediacodecdec_common.c.
Definition at line 531 of file mediacodecdec_common.c.
anonymous enum |
Enumerator | |
---|---|
ENCODING_PCM_16BIT | |
ENCODING_PCM_8BIT | |
ENCODING_PCM_FLOAT | |
ENCODING_PCM_24BIT_PACKED | |
ENCODING_PCM_32BIT |
Definition at line 90 of file mediacodecdec_common.c.
anonymous enum |
Definition at line 130 of file mediacodecdec_common.c.
anonymous enum |
Definition at line 191 of file mediacodecdec_common.c.
|
static |
Definition at line 112 of file mediacodecdec_common.c.
Referenced by mediacodec_dec_parse_audio_format().
|
static |
Definition at line 178 of file mediacodecdec_common.c.
Referenced by mediacodec_dec_parse_audio_format().
|
static |
Definition at line 220 of file mediacodecdec_common.c.
Referenced by mediacodec_dec_parse_video_format().
|
static |
Definition at line 247 of file mediacodecdec_common.c.
Referenced by mediacodec_wrap_hw_buffer().
|
static |
Definition at line 252 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_close(), and mediacodec_buffer_release().
|
static |
Definition at line 278 of file mediacodecdec_common.c.
Referenced by mediacodec_wrap_hw_buffer().
|
static |
Definition at line 296 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_receive().
|
static |
Definition at line 371 of file mediacodecdec_common.c.
Referenced by mediacodec_wrap_sw_buffer().
|
static |
Definition at line 437 of file mediacodecdec_common.c.
Referenced by mediacodec_wrap_sw_buffer().
|
static |
Definition at line 515 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_receive().
|
static |
Definition at line 542 of file mediacodecdec_common.c.
Referenced by mediacodec_dec_parse_format().
|
static |
Definition at line 652 of file mediacodecdec_common.c.
Referenced by mediacodec_dec_parse_format().
|
static |
Definition at line 699 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_init(), and ff_mediacodec_dec_receive().
|
static |
Definition at line 709 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_flush().
|
static |
Definition at line 732 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_init().
|
static |
Definition at line 799 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_init().
int ff_mediacodec_dec_init | ( | AVCodecContext * | avctx, |
MediaCodecDecContext * | s, | ||
const char * | mime, | ||
FFAMediaFormat * | format | ||
) |
Definition at line 818 of file mediacodecdec_common.c.
Referenced by mediacodec_decode_init().
int ff_mediacodec_dec_send | ( | AVCodecContext * | avctx, |
MediaCodecDecContext * | s, | ||
AVPacket * | pkt, | ||
bool | wait | ||
) |
Definition at line 883 of file mediacodecdec_common.c.
Referenced by mediacodec_receive_frame().
int ff_mediacodec_dec_receive | ( | AVCodecContext * | avctx, |
MediaCodecDecContext * | s, | ||
AVFrame * | frame, | ||
bool | wait | ||
) |
Definition at line 977 of file mediacodecdec_common.c.
Referenced by mediacodec_receive_frame().
int ff_mediacodec_dec_flush | ( | AVCodecContext * | avctx, |
MediaCodecDecContext * | s | ||
) |
Definition at line 1102 of file mediacodecdec_common.c.
Referenced by mediacodec_decode_flush(), and mediacodec_receive_frame().
int ff_mediacodec_dec_close | ( | AVCodecContext * | avctx, |
MediaCodecDecContext * | s | ||
) |
Definition at line 1120 of file mediacodecdec_common.c.
Referenced by ff_mediacodec_dec_init(), and mediacodec_decode_close().
int ff_mediacodec_dec_is_flushing | ( | AVCodecContext * | avctx, |
MediaCodecDecContext * | s | ||
) |
Definition at line 1139 of file mediacodecdec_common.c.
Referenced by mediacodec_receive_frame().
int pcm_format |
Definition at line 100 of file mediacodecdec_common.c.
Referenced by mcdec_map_pcm_format().
enum AVSampleFormat sample_format |
Definition at line 101 of file mediacodecdec_common.c.
Referenced by ipcm_decoder_config().
const { ... } sample_formats[] |
Referenced by init_audio(), mcdec_map_pcm_format(), and read_header().
int mask |
Definition at line 154 of file mediacodecdec_common.c.
Referenced by ac3_bit_alloc_calc_bap_c(), ac3_decode_frame(), add_hfyu_median_pred_int16_c(), add_int16_c(), add_left_pred_int16_c(), affine_merge_candidate(), affine_merge_const1(), affine_merge_const2(), affine_merge_const3(), affine_merge_const4(), affine_merge_const5(), affine_merge_const6(), apply_filter(), argo_brp_read_header(), av_channel_layout_describe_bprint(), av_channel_layout_from_mask(), av_channel_layout_from_string(), av_channel_layout_index_from_channel(), av_channel_layout_retype(), av_channel_layout_subset(), av_opt_set_defaults2(), av_read_image_line2(), av_write_image_line2(), avc_chroma_hv_2x2_msa(), avc_chroma_hv_2x4_msa(), avc_chroma_hv_4x2_msa(), avc_chroma_hv_4x4_msa(), avc_chroma_hv_4x8_msa(), avc_chroma_hv_8x4_msa(), avc_chroma_hv_8x8_msa(), avc_chroma_hv_and_aver_dst_2x2_msa(), avc_chroma_hv_and_aver_dst_2x4_msa(), avc_chroma_hv_and_aver_dst_4x2_msa(), avc_chroma_hv_and_aver_dst_4x4_msa(), avc_chroma_hv_and_aver_dst_4x8_msa(), avc_chroma_hv_and_aver_dst_8x4_msa(), avc_chroma_hv_and_aver_dst_8x8_msa(), avc_chroma_hz_2x2_msa(), avc_chroma_hz_2x4_msa(), avc_chroma_hz_4x2_msa(), avc_chroma_hz_4x4_msa(), avc_chroma_hz_4x8_msa(), avc_chroma_hz_8x4_msa(), avc_chroma_hz_8x8_msa(), avc_chroma_hz_and_aver_dst_2x2_msa(), avc_chroma_hz_and_aver_dst_2x4_msa(), avc_chroma_hz_and_aver_dst_4x2_msa(), avc_chroma_hz_and_aver_dst_4x4_msa(), avc_chroma_hz_and_aver_dst_4x8_msa(), avc_chroma_hz_and_aver_dst_8x4_msa(), avc_chroma_hz_and_aver_dst_8x8_msa(), avc_chroma_hz_nonmult_msa(), binkb_read_bundle(), bit_depth(), blend_line_hv(), blend_line_hv16(), blend_pixel(), blend_pixel16(), blur_image(), blur_pixel(), build_xlaw_table(), check_add_int16(), check_add_left_pred_16(), check_add_res(), check_loop_filter(), check_loop_filter_intra(), checkasm_check_vf_bwdif(), cinepak_decode_codebook(), cinepak_decode_vectors(), cmp_direct_inline(), codebook_bits_offset(), common_hv_2ht_2vt_4x4_msa(), common_hv_2ht_2vt_4x8_msa(), common_hv_2ht_2vt_8x4_msa(), common_hv_2ht_2vt_8x8mult_msa(), common_hv_2ht_2vt_and_aver_dst_4x4_msa(), common_hv_2ht_2vt_and_aver_dst_4x8_msa(), common_hv_2ht_2vt_and_aver_dst_8x4_msa(), common_hv_2ht_2vt_and_aver_dst_8x8mult_msa(), common_hz_2t_4x4_msa(), common_hz_2t_4x8_msa(), common_hz_2t_8x4_msa(), common_hz_2t_8x8mult_msa(), common_hz_2t_and_aver_dst_4x4_msa(), common_hz_2t_and_aver_dst_4x8_msa(), common_hz_2t_and_aver_dst_8x4_msa(), common_hz_2t_and_aver_dst_8x8mult_msa(), compare_add_res(), compare_mv_ref_idx(), compare_pf_ref_idx(), compress_alpha(), compress_color(), compute_bit_depth(), config_output(), copy_color_mask(), copy_src_mask(), cu_get_max_y(), decode_0(), decode_13(), decode_bmv_frame(), decode_cblk(), decode_channel_code_tab(), decode_clnpass(), decode_dds1(), decode_dsw1(), decode_init(), decode_inter(), decode_long_vertical_delta2(), decode_mvc1(), decode_mvc2(), decode_mvdv(), decode_region_masked(), decode_residual(), decode_residual_block(), decode_scaling_list(), decode_scaling_matrices(), decode_sigpass(), decode_tsw1(), decodeplane32(), diff_int16_c(), draw_htext(), draw_htext16(), draw_ihtext(), draw_ihtext16(), draw_rectangle(), draw_vtext(), draw_vtext16(), drawtext(), encode_alpha_plane(), encode_alpha_slice_data(), encode_clnpass(), encode_plane_bitstream(), encode_refpass(), encode_sigpass(), epic_jb_decode_tile(), escape124_decode_frame(), estimate_alpha_plane(), ff_ac3_bit_alloc_calc_mask(), ff_acelp_fc_pulse_per_track(), ff_avg_bilin_16h_msa(), ff_avg_bilin_16hv_msa(), ff_avg_bilin_32h_msa(), ff_avg_bilin_64h_msa(), ff_blend_mask(), ff_dca_count_chs_for_mask(), ff_decode_10_pulses_35bits(), ff_draw_pc_font(), ff_er_add_slice(), ff_h264_check_intra4x4_pred_mode(), ff_hls_senc_parse_audio_setup_info(), ff_jpeg2000_decode_htj2k(), ff_loop_filter_h_44_16_lsx(), ff_loop_filter_h_44_16_msa(), ff_loop_filter_h_48_16_lsx(), ff_loop_filter_h_48_16_msa(), ff_loop_filter_h_4_8_lsx(), ff_loop_filter_h_4_8_msa(), ff_loop_filter_h_84_16_lsx(), ff_loop_filter_h_84_16_msa(), ff_loop_filter_h_88_16_lsx(), ff_loop_filter_h_88_16_msa(), ff_loop_filter_h_8_8_lsx(), ff_loop_filter_h_8_8_msa(), ff_loop_filter_v_16_8_lsx(), ff_loop_filter_v_16_8_msa(), ff_loop_filter_v_44_16_lsx(), ff_loop_filter_v_44_16_msa(), ff_loop_filter_v_48_16_lsx(), ff_loop_filter_v_48_16_msa(), ff_loop_filter_v_4_8_lsx(), ff_loop_filter_v_4_8_msa(), ff_loop_filter_v_84_16_lsx(), ff_loop_filter_v_84_16_msa(), ff_loop_filter_v_88_16_lsx(), ff_loop_filter_v_88_16_msa(), ff_loop_filter_v_8_8_lsx(), ff_loop_filter_v_8_8_msa(), ff_lsb2full(), ff_mlp_rematrix_channel(), ff_opus_rc_enc_end(), ff_put_bilin_16h_msa(), ff_put_bilin_16hv_msa(), ff_put_bilin_32h_msa(), ff_put_bilin_64h_msa(), ff_put_no_rnd_pixels_l2_msa(), ff_put_vp8_bilinear16_h_msa(), ff_put_vp8_bilinear16_hv_msa(), ff_sbc_crc8(), ff_vk_extensions_to_mask(), ff_vp3_h_loop_filter_msa(), ff_vp3_idct_dc_add_msa(), ff_vp3_v_loop_filter_msa(), ff_vp8_h_loop_filter16_inner_lsx(), ff_vp8_h_loop_filter16_inner_msa(), ff_vp8_h_loop_filter16_lsx(), ff_vp8_h_loop_filter16_msa(), ff_vp8_h_loop_filter8uv_inner_msa(), ff_vp8_h_loop_filter8uv_lsx(), ff_vp8_h_loop_filter8uv_msa(), ff_vp8_h_loop_filter_simple_msa(), ff_vp8_idct_add_msa(), ff_vp8_idct_dc_add_msa(), ff_vp8_v_loop_filter16_inner_lsx(), ff_vp8_v_loop_filter16_inner_msa(), ff_vp8_v_loop_filter16_lsx(), ff_vp8_v_loop_filter16_msa(), ff_vp8_v_loop_filter8uv_inner_msa(), ff_vp8_v_loop_filter8uv_lsx(), ff_vp8_v_loop_filter8uv_msa(), ff_vp8_v_loop_filter_simple_msa(), ff_vvc_luma_mv_merge_gpm(), ff_vvc_store_mv(), ff_vvc_store_sb_mvs(), file_check(), fill_ltable(), fill_tile4(), fill_tileX(), filter_channel(), filter_frame(), filter_plane_cols(), filter_plane_rows(), filter_slice(), find_ref_idx(), flac_read_header(), FUNC(), get_cabac_bypass_sign(), get_len(), get_mb_score(), h263_dct_unquantize_msa(), hevc_sao_band_filter_4width_msa(), horiz_mc_qpel_16width_msa(), horiz_mc_qpel_aver_src0_16width_msa(), horiz_mc_qpel_aver_src1_16width_msa(), horiz_mc_qpel_avg_dst_16width_msa(), horiz_mc_qpel_avg_dst_aver_src0_16width_msa(), horiz_mc_qpel_avg_dst_aver_src1_16width_msa(), horiz_mc_qpel_no_rnd_16width_msa(), horiz_mc_qpel_no_rnd_aver_src0_16width_msa(), horiz_mc_qpel_no_rnd_aver_src1_16width_msa(), hv_mc_qpel_aver_horiz_16x16_msa(), hv_mc_qpel_aver_horiz_src0_16x16_msa(), hv_mc_qpel_aver_horiz_src1_16x16_msa(), hv_mc_qpel_no_rnd_horiz_16x16_msa(), hv_mc_qpel_no_rnd_horiz_src0_16x16_msa(), hv_mc_qpel_no_rnd_horiz_src1_16x16_msa(), idct_column_false_mmi(), idct_column_true_mmi(), idct_msa(), idct_row_mmi(), idraw_htext(), idraw_htext16(), idraw_vtext(), idraw_vtext16(), init(), init_cavlc_level_tab(), init_luts(), intra_predict_vert_dc_8x8_msa(), jpeg2000_bitbuf_get_bits_lsb(), jpeg2000_bitbuf_get_bits_lsb_forward(), jpeg2000_bitbuf_peek_bits_lsb(), jpg_decode_data(), linemask_matches(), ljpeg_decode_rgb_scan(), ljpeg_decode_yuv_scan(), LLVMFuzzerTestOneInput(), load_mask(), main(), mask_edges(), masked_description(), match_colors(), mcdec_map_channel_mask(), mlp_channel_layout_subset(), mlp_filter_channel(), mov_read_dac3(), mov_read_dec3(), mp3_write_xing(), mpc8_decode_frame(), mpc8_get_mask(), mpeg2_dct_unquantize_inter_msa(), mpegts_check_bitstream(), mss2_blit_wmv9_masked_c(), mss2_blit_wmv9_template(), mss2_gray_fill_masked_c(), mszh_decomp(), mv_compression(), mv_merge_pairwise_candidate(), mvf_to_mi(), mvp_add_difference(), mvp_history_candidates(), parse_coding_header(), parse_waveformatex(), parse_xxch_frame(), pchip_edge_case(), picmemset(), planar_rgb_to_uv_lasx(), planar_rgb_to_y_lasx(), png_get_interlaced_row(), png_put_interlaced_row(), pp_get_mode_by_name_and_quality(), pred_get_refs(), pred_mv(), pred_spatial_direct_motion(), print_stats(), process_float(), process_frame(), put_swf_line_edge(), put_swf_rect(), randomize_buffers(), randomize_loopfilter_buffers(), read_residue(), refine_colors(), render_default_font(), rgb2yuv_fsb(), rv34_decode_cbp(), rv34_pred_mv_b(), sad_hv_bilinear_filter_8width_msa(), select_region(), set_bit(), set_channel_info(), set_metadata(), set_sr_golomb_flac(), setup_window(), store_slice16_c(), sub_hfyu_median_pred_int16_c(), subsampling_bounds(), try_describe_ambisonic(), twiddle(), ulti_pattern(), unpack_alpha(), vertClassify_altivec(), vlc_decode_u_suffix(), vp56_mc(), vp6_filter(), vp8_h_loop_filter8_mmi(), vp8_v_loop_filter8_mmi(), vp9_hz_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_8w(), vvc_deblock_bs_chroma(), vvc_deblock_bs_luma(), write_element(), x8_get_ac_rlf(), xan_unpack_luma(), and yuv2planeX_8_lasx().
uint64_t layout |
Definition at line 155 of file mediacodecdec_common.c.
const { ... } channel_masks[] |
Referenced by mcdec_map_channel_mask().
int color_format |
Definition at line 205 of file mediacodecdec_common.c.
Referenced by mcdec_map_color_format().
enum AVPixelFormat pix_fmt |
Definition at line 206 of file mediacodecdec_common.c.
Referenced by mediacodec_dec_get_video_codec().
const { ... } color_formats[] |
Referenced by mcdec_map_color_format().