FFmpeg
Data Structures | Macros | Functions | Variables
spdifenc.c File Reference
#include <inttypes.h>
#include "avformat.h"
#include "avio_internal.h"
#include "mux.h"
#include "spdif.h"
#include "libavcodec/ac3defs.h"
#include "libavcodec/adts_parser.h"
#include "libavcodec/dca.h"
#include "libavcodec/dca_syncwords.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  IEC61937Context
 

Macros

#define SPDIF_FLAG_BIGENDIAN   0x01
 
#define MAT_PKT_OFFSET   61440
 
#define MAT_FRAME_SIZE   61424
 
#define MAT_CODE(position, data)   { .pos = position, .code = data, .len = sizeof(data) }
 

Functions

static int spdif_header_ac3 (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_eac3 (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_dts4_subtype (int period)
 
static int spdif_header_dts4 (AVFormatContext *s, AVPacket *pkt, int core_size, int sample_rate, int blocks)
 
static int spdif_header_dts (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_mpeg (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_aac (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_truehd (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_write_header (AVFormatContext *s)
 
static void spdif_deinit (AVFormatContext *s)
 
static av_always_inline void spdif_put_16 (IEC61937Context *ctx, AVIOContext *pb, unsigned int val)
 
static int spdif_write_packet (struct AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass spdif_class
 
static enum IEC61937DataType mpeg_data_type [2][3]
 
static const uint8_t mat_start_code [20]
 
static const uint8_t mat_middle_code [12]
 
static const uint8_t mat_end_code [16]
 
struct {
   unsigned int   pos
 
   unsigned int   len
 
   const uint8_t *   code
 
mat_codes []
 
const FFOutputFormat ff_spdif_muxer
 

Detailed Description

IEC-61937 encapsulation of various formats, used by S/PDIF

Author
Bartlomiej Wolowiec
Anssi Hannula
Carl Eugen Hoyos

Definition in file spdifenc.c.

Macro Definition Documentation

◆ SPDIF_FLAG_BIGENDIAN

#define SPDIF_FLAG_BIGENDIAN   0x01

Definition at line 89 of file spdifenc.c.

◆ MAT_PKT_OFFSET

#define MAT_PKT_OFFSET   61440

Definition at line 397 of file spdifenc.c.

◆ MAT_FRAME_SIZE

#define MAT_FRAME_SIZE   61424

Definition at line 398 of file spdifenc.c.

◆ MAT_CODE

#define MAT_CODE (   position,
  data 
)    { .pos = position, .code = data, .len = sizeof(data) }

Definition at line 411 of file spdifenc.c.

Function Documentation

◆ spdif_header_ac3()

static int spdif_header_ac3 ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 112 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_eac3()

static int spdif_header_eac3 ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 122 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_dts4_subtype()

static int spdif_dts4_subtype ( int  period)
static

Definition at line 163 of file spdifenc.c.

Referenced by spdif_header_dts4().

◆ spdif_header_dts4()

static int spdif_header_dts4 ( AVFormatContext s,
AVPacket pkt,
int  core_size,
int  sample_rate,
int  blocks 
)
static

Definition at line 176 of file spdifenc.c.

Referenced by spdif_header_dts().

◆ spdif_header_dts()

static int spdif_header_dts ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 253 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_mpeg()

static int spdif_header_mpeg ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 336 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_aac()

static int spdif_header_aac ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 359 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_truehd()

static int spdif_header_truehd ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 423 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_write_header()

static int spdif_write_header ( AVFormatContext s)
static

Definition at line 570 of file spdifenc.c.

◆ spdif_deinit()

static void spdif_deinit ( AVFormatContext s)
static

Definition at line 609 of file spdifenc.c.

◆ spdif_put_16()

static av_always_inline void spdif_put_16 ( IEC61937Context ctx,
AVIOContext pb,
unsigned int  val 
)
static

Definition at line 617 of file spdifenc.c.

Referenced by spdif_write_packet().

◆ spdif_write_packet()

static int spdif_write_packet ( struct AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 626 of file spdifenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "spdif_flags", "IEC 61937 encapsulation flags", 0x42, AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, .unit = "spdif_flags" },
{ "be", "output in big-endian format (for use as s16be)", 0, AV_OPT_TYPE_CONST, {.i64 = SPDIF_FLAG_BIGENDIAN}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, .unit = "spdif_flags" },
{ "dtshd_rate", "mux complete DTS frames in HD mode at the specified IEC958 rate (in Hz, default 0=disabled)", 0x42, AV_OPT_TYPE_INT, {.i64 = 0}, 0, 768000, AV_OPT_FLAG_ENCODING_PARAM },
{ "dtshd_fallback_time", "min secs to strip HD for after an overflow (-1: till the end, default 60)", 0x42, AV_OPT_TYPE_INT, {.i64 = 60}, -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}

Definition at line 97 of file spdifenc.c.

◆ spdif_class

const AVClass spdif_class
static
Initial value:
= {
.class_name = "spdif",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 105 of file spdifenc.c.

◆ mpeg_data_type

enum IEC61937DataType mpeg_data_type[2][3]
static

◆ mat_start_code

const uint8_t mat_start_code[20]
static
Initial value:
= {
0x07, 0x9E, 0x00, 0x03, 0x84, 0x01, 0x01, 0x01, 0x80, 0x00, 0x56, 0xA5, 0x3B, 0xF4, 0x81, 0x83,
0x49, 0x80, 0x77, 0xE0,
}

Definition at line 400 of file spdifenc.c.

◆ mat_middle_code

const uint8_t mat_middle_code[12]
static
Initial value:
= {
0xC3, 0xC1, 0x42, 0x49, 0x3B, 0xFA, 0x82, 0x83, 0x49, 0x80, 0x77, 0xE0,
}

Definition at line 404 of file spdifenc.c.

◆ mat_end_code

const uint8_t mat_end_code[16]
static
Initial value:
= {
0xC3, 0xC2, 0xC0, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x11,
}

Definition at line 407 of file spdifenc.c.

◆ pos

unsigned int pos

Definition at line 414 of file spdifenc.c.

Referenced by aa_read_packet(), aal_read_packet(), ac4_read_packet(), add_coefficients(), add_entry(), add_index_entry(), add_tonal_components(), add_wave(), add_wave0(), aix_read_packet(), alf_filter_cc(), alf_get_subblock(), amv_end_tag(), apac_read_header(), ape_read_seek(), aptx_decode_frame(), aptx_encode_frame(), aqt_read_header(), asf_build_simple_index(), asf_deinterleave(), asf_read_pts(), asf_read_seek(), asf_read_timestamp(), ass_read_header(), assign_channels(), assign_pair(), ast_read_packet(), async_seek(), at1_imdct_block(), at1_unpack_dequant(), audio_frame_obu(), av_add_index_entry(), av_chroma_location_enum_to_pos(), av_chroma_location_pos_to_enum(), av_parser_parse2(), avi_load_index(), avi_read_header(), avi_read_idx1(), avi_read_seek(), avi_sync(), avi_write_ix(), avio_seek(), avio_seek_time(), binka_read_packet(), block_contrast(), block_matching_multi(), bluray_seek(), build_huff_tree(), build_vlc(), cache_seek(), cbs_av1_assemble_fragment(), cbs_av1_ref_tile_data(), cbs_av1_split_fragment(), cbs_h2645_write_slice_data(), cbs_h264_read_nal_unit(), cbs_h265_read_nal_unit(), cbs_h266_read_nal_unit(), cbs_jpeg_read_unit(), cbs_mpeg2_read_unit(), cbs_mpeg2_write_slice(), cbs_vp8_read_unit(), cbs_vp9_assemble_fragment(), cbs_vp9_read_unit(), cbs_vp9_split_fragment(), cclm_get_select_pos(), cclm_select_chroma(), cclm_select_luma(), cclm_select_luma_444(), cclm_select_samples(), cfhd_encode_frame(), check(), check_stream_max_drift(), cine_read_header(), cipher_init56(), clean_index(), clear_index_entries(), close_file(), codec37_mv(), compute_quant_matrix(), concat_seek(), copy_scaling_list(), count_channels(), count_paired_channels(), crypto_seek(), dat_read_packet(), deband_16_c(), deband_16_coupling_c(), deband_8_c(), deband_8_coupling_c(), deblock_get_left_strength(), deblock_get_top_strength(), deblock_is_boundary(), deblock_set_left_strength(), deblock_set_strength(), deblock_set_top_strength(), decode_1p_track(), decode_3_pulses_10bits(), decode_ac_coeffs(), decode_band(), decode_block(), decode_channel_wordlen(), decode_dct(), decode_dlta(), decode_dvd_subtitles(), decode_fixed_vector(), decode_frame(), decode_kfrm(), decode_mad1(), decode_mad1_24(), decode_mb_i(), decode_mous(), decode_move(), decode_mpos(), decode_qu_spectra(), decode_rle(), decode_rle16(), decode_rle_bpp2(), decode_rle_bpp4(), decode_runlen(), decode_scaling_list(), decode_short_horizontal_delta(), decode_slice(), decode_type1(), decode_type2(), decode_vol_header(), decompress(), dequant(), describe_payload(), do_blend(), do_block_matching_multi(), do_block_ssd(), do_block_ssd16(), do_search_boundary(), dsf_read_packet(), dss_723_1_read_packet(), dss_sp_read_packet(), dts_probe(), dv_decode_ac(), dvdsub_parse_extradata(), dxv_compress_dxt1(), dxv_decompress_dxt1(), dxv_decompress_dxt5(), dxv_decompress_opcodes(), dyn_buf_write(), ebml_read_master(), ebml_read_num(), encode_packet(), end_ebml_master(), end_header(), envelope_instant(), envelope_instant16(), envelope_peak(), envelope_peak16(), epic_decode_run_length(), epic_predict_from_NW_NE(), evaluate_timeline_at_frame(), event_loop(), evolve(), fade(), fastaudio_decode(), ff_add_index_entry(), ff_atrac_gain_compensation(), ff_attributes_dump(), ff_dca_downmix_to_stereo_fixed(), ff_dca_downmix_to_stereo_float(), ff_dsd2pcm_translate(), ff_dshow_enummediatypes_Clone(), ff_dshow_enummediatypes_Reset(), ff_dshow_enumpins_Clone(), ff_dshow_enumpins_Reset(), ff_dxva2_hevc_fill_scaling_lists(), ff_els_decode_unsigned(), ff_end_tag(), ff_find_last_ts(), ff_format_shift_data(), ff_gen_search(), ff_h263_resync(), ff_h264_handle_frag_packet(), ff_hevc_hls_residual_coding(), ff_hevc_sao_edge_filter_neon_8_wrapper(), ff_hls_write_file_entry(), ff_hls_write_init_file(), ff_jpegxl_collect_codestream_header(), ff_mkdir_p(), ff_mms_read_header(), ff_mov_cenc_write_sinf_tag(), ff_nut_add_sp(), ff_opencl_filter_load_program_from_file(), ff_opus_rc_enc_laplace(), ff_pcm_read_seek(), ff_rle_count_pixels(), ff_rtp_send_h263_rfc2190(), ff_seek_frame_binary(), ff_snappy_peek_uncompressed_length(), ff_vfscanf(), ff_vorbis_floor1_render_list(), ff_wma_init(), ffio_limit(), ffurl_seek(), ffurl_seek2(), ffurl_size(), file_seek(), fill_map(), fill_pixels(), fill_scaling_lists(), film_read_seek(), filter_frame(), find_any_startcode(), find_index_range(), find_motion(), find_sample_match(), find_sidx(), find_startcode(), find_timestamp_in_playlist(), fits_read_packet(), fixup_color_mask(), flac_read_header(), flac_seek(), flv_append_keyframe_info(), flv_read_packet(), flv_write_codec_header(), frame_merge_filter(), fsb_read_packet(), fsize(), ftp_restart(), ftp_seek(), g722_encode_trellis(), gainc_loc_mode0(), generate_noise(), get_attachment(), get_consumed_bytes(), get_line(), get_local_pos(), get_pts(), get_tree_codes(), get_virtual_boundary(), gif_read_header(), graticule16_column(), graticule16_row(), graticule_column(), graticule_row(), guess_ni_flag(), gxf_read_timestamp(), gxf_seek(), gxf_write_eos_packet(), gxf_write_flt_packet(), gxf_write_map_packet(), gxf_write_material_data_section(), gxf_write_packet(), gxf_write_track_description(), gxf_write_track_description_section(), gxf_write_umf_media_description(), gxf_write_umf_packet(), gxf_write_umf_track_description(), handle_packet(), handle_rstn(), hevc_parse_sdp_line(), hls_append_segment(), hls_slice_header(), hq_decode_block(), ht_delete(), ht_lookup_and_upsert(), http_read_stream_all(), huffman_decode(), iamf_write_trailer(), iff_read_packet(), imc_decode_level_coefficients_raw(), init_filter(), init_gblur_pipeline(), init_vulkan(), insert_first(), insert_horizontal_pass(), insert_vertical_pass(), insert_weights_pass(), interp_point(), intlist_read(), ipfs_seek(), is_virtual_boundary(), ivi_create_huff_from_desc(), ivi_decode_coded_blocks(), ivr_read_header(), ivr_read_packet(), jacosub_read_header(), jpeg2000_decode_ctx_vlc(), jpeg2000_decode_ht_cleanup_segment(), jpeg2000_decode_sig_emb(), jpeg2000_import_bit(), jpg_decode_block(), klv_read_packet(), laf_read_packet(), lerp16(), lerp8(), libsmbc_seek(), libssh_seek(), lrc_read_header(), lsf_dequantization(), lsp_interpolate(), lvf_read_packet(), lz4_decompress(), magy_encode_frame(), main(), map_prm_ch_to_spkr(), mark_all_blocks(), mcc_read_header(), microdvd_read_header(), mmsh_seek(), mods_read_header(), mods_read_packet(), mov_cenc_write_saio_tag(), mov_cenc_write_saiz_tag(), mov_cenc_write_schi_tag(), mov_cenc_write_senc_tag(), mov_find_next_sample(), mov_flush_fragment(), mov_read_packet(), mov_write_3gp_udta_tag(), mov_write_audio_tag(), mov_write_aux_tag(), mov_write_av1c_tag(), mov_write_avcc_tag(), mov_write_btrt_tag(), mov_write_ccst_tag(), mov_write_chan_tag(), mov_write_chnl_tag(), mov_write_chpl_tag(), mov_write_colr_tag(), mov_write_covr(), mov_write_dfla_tag(), mov_write_dinf_tag(), mov_write_dmlp_tag(), mov_write_dops_tag(), mov_write_emsg_tag(), mov_write_esds_tag(), mov_write_evcc_tag(), mov_write_eyes_tag(), mov_write_ftyp_tag(), mov_write_gmhd_tag(), mov_write_gpmd_tag(), mov_write_hdlr_tag(), mov_write_hvcc_tag(), mov_write_iloc_tag(), mov_write_ilst_tag(), mov_write_iods_tag(), mov_write_ipco_tag(), mov_write_ipma_tag(), mov_write_iprp_tag(), mov_write_isml_manifest(), mov_write_ispe_tag(), mov_write_lhvc_tag(), mov_write_loci_tag(), mov_write_mdia_tag(), mov_write_mdta_ilst_tag(), mov_write_mdta_keys_tag(), mov_write_meta_tag(), mov_write_minf_tag(), mov_write_moof_tag_internal(), mov_write_moov_tag(), mov_write_ms_tag(), mov_write_mvex_tag(), mov_write_pcmc_tag(), mov_write_pitm_tag(), mov_write_pixi_tag(), mov_write_prft_tag(), mov_write_pssh_tag(), mov_write_rtp_tag(), mov_write_SA3D_tag(), mov_write_sdtp_tag(), mov_write_sidx_tag(), mov_write_source_reference_tag(), mov_write_stbl_tag(), mov_write_stco_tag(), mov_write_string_tag(), mov_write_stsc_tag(), mov_write_stsd_tag(), mov_write_stss_tag(), mov_write_stsz_tag(), mov_write_subtitle_tag(), mov_write_tapt_tag(), mov_write_tcmi_tag(), mov_write_tfdt_tag(), mov_write_tfhd_tag(), mov_write_tfra_tag(), mov_write_tfrf_tags(), mov_write_tfxd_tag(), mov_write_tmcd_tag(), mov_write_track_kind(), mov_write_track_metadata(), mov_write_traf_tag(), mov_write_trak_tag(), mov_write_trun_tag(), mov_write_uuidusmt_tag(), mov_write_vexu_tag(), mov_write_video_tag(), mov_write_vpcc_tag(), mov_write_vvcc_tag(), mov_write_wave_tag(), mov_write_wfex_tag(), mp3_parse_info_tag(), mp3_read_packet(), mp3_sync(), mpc8_get_chunk_header(), mpc8_handle_chunk(), mpc8_parse_seektable(), mpc8_read_header(), mpc8_read_packet(), mpc_read_header(), mpc_read_packet(), mpegps_read_dts(), mpegts_get_dts(), mpegts_get_pcr(), mpegts_push_data(), mpegts_raw_read_packet(), mpegts_read_header(), mpegts_resync(), mpjpeg_read_header(), mpl2_read_header(), mpsub_read_header(), msrle_decode_8_16_24_32(), mss4_decode_dct(), multiview_setup(), mv_read_header(), mv_read_packet(), mxf_read_packet(), mxf_update_klv_size(), mxf_write_aes3_desc(), mxf_write_avc_subdesc(), mxf_write_cdci_common(), mxf_write_cdci_desc(), mxf_write_ffv1_desc(), mxf_write_ffv1_subdesc(), mxf_write_generic_desc(), mxf_write_generic_sound_common(), mxf_write_generic_sound_desc(), mxf_write_h264_desc(), mxf_write_index_table_segment(), mxf_write_jpeg2000_subdesc(), mxf_write_mpegvideo_desc(), mxf_write_partition(), mxf_write_random_index_pack(), mxf_write_s436m_anc_desc(), mxf_write_wav_common(), mxf_write_wav_desc(), ni_prepare_read(), nprobe(), nsp_read_header(), nut_read_header(), nut_read_packet(), nut_read_timestamp(), nuv_packet(), nuv_read_dts(), old_codec1(), overlay_cuda_blend(), packet_decode(), paint_mouse_pointer(), parse_atoms(), parse_file(), pdv_read_header(), pdv_read_packet(), pdv_read_seek(), pjs_read_header(), plot_channel_log(), pmp_header(), pred_angular_h(), pred_angular_v(), print_track_chunks(), process_sample(), pulse_read_packet(), put_header(), put_id3v2_tags(), put_swf_end_tag(), pva_read_timestamp(), qoa_read_packet(), qt_rtp_parse_packet(), queue_picture(), queue_sample(), r3d_read_reda(), r3d_read_redv(), radix_sort_pass(), rdt_parse_packet(), read_ans_symbol(), read_bits(), read_dialogue(), read_header(), read_huff_channels(), read_image_grid(), read_image_iovl(), read_index(), read_line(), read_moof_duration(), read_odml_index(), read_packet(), read_pakt_chunk(), read_seek(), read_tfra(), read_trun_duration(), realtext_read_header(), recover_mag_sgn(), resync(), rka_read_seek(), rl2_read_packet(), rle_uncompress(), rm_assemble_video_frame(), rm_read_dts(), rm_read_index(), rm_read_packet(), rm_sync(), rprobe(), rsd_read_packet(), rv40_loop_filter(), s337m_probe(), sami_read_header(), sao_copy_hor(), sao_edge_filter(), sao_filter_CTB(), sap_read_header(), sap_write_header(), scaling_list_data(), scan_buffer(), scc_read_header(), sdr2_read_packet(), sds_read_packet(), seek(), seek_back(), seek_chapter(), seek_frame_byte(), seq_decode_op3(), ser_read_packet(), set_bit(), set_param(), set_spdif(), simbiosis_imx_read_packet(), skip_reserved(), skip_tag(), sls_flags_filename_process(), smacker_read_header(), smacker_read_packet(), smacker_read_seek(), smjpeg_read_packet(), spdif_header_truehd(), srt_read_header(), stl_read_header(), stream_seek(), subfile_seek(), subviewer1_read_header(), subviewer_read_header(), sup_read_packet(), swf_read_packet(), switch_buffer(), swri_noise_shaping_TMPL(), threedostr_read_packet(), tiff_decode_tag(), tm2_read_stream(), tmv_read_seek(), tscc2_decode_frame(), tta_read_header(), tta_read_seek(), twiddle(), unpack_10bit(), update_co64_offsets(), update_odml_entry(), update_packet_size(), update_size(), update_stco_offsets(), upgrade_stco_atom(), usm_read_packet(), vdpau_hevc_start_frame(), vectorscope16(), vectorscope8(), vlc_decode_block(), vp56_get_vectors_predictors(), vp6_coeff_order_table_init(), vp6_parse_coeff_models(), vpk_read_packet(), vplayer_read_header(), vqf_read_seek(), vvc_deblock_bs_chroma(), vvc_deblock_bs_luma(), waves_synth(), wavesynth_seek(), webvtt_read_header(), wma_decode_superframe(), wmavoice_decode_packet(), write_index(), write_table_redirector_legacy_attrib(), wv_read_packet(), wv_unpack_mono(), wv_unpack_stereo(), wv_write_trailer(), x8_decode_intra_mb(), xcorr_coeff(), xmlescape(), and yuv4_read_seek().

◆ len

unsigned int len

Definition at line 415 of file spdifenc.c.

◆ code

const uint8_t* code

Definition at line 416 of file spdifenc.c.

Referenced by spdif_header_truehd().

◆ mat_codes

const { ... } mat_codes[]

◆ ff_spdif_muxer

const FFOutputFormat ff_spdif_muxer
Initial value:
= {
.p.name = "spdif",
.p.long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"),
.p.extensions = "spdif",
.priv_data_size = sizeof(IEC61937Context),
.p.audio_codec = AV_CODEC_ID_AC3,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.write_header = spdif_write_header,
.write_packet = spdif_write_packet,
.deinit = spdif_deinit,
.p.flags = AVFMT_NOTIMESTAMPS,
.p.priv_class = &spdif_class,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
}

Definition at line 678 of file spdifenc.c.

AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:450
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
spdif_write_packet
static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition: spdifenc.c:626
mat_start_code
static const uint8_t mat_start_code[20]
Definition: spdifenc.c:400
IEC61937_MPEG2_LAYER1_LSF
@ IEC61937_MPEG2_LAYER1_LSF
MPEG-2, layer-1 low sampling frequency.
Definition: spdif.h:38
spdif_class
static const AVClass spdif_class
Definition: spdifenc.c:105
SPDIF_FLAG_BIGENDIAN
#define SPDIF_FLAG_BIGENDIAN
Definition: spdifenc.c:89
IEC61937Context
Definition: spdifenc.c:60
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
Definition: opt.h:352
IEC61937_MPEG1_LAYER23
@ IEC61937_MPEG1_LAYER23
MPEG-1 layer 2 or 3 data or MPEG-2 without extension.
Definition: spdif.h:35
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
mat_end_code
static const uint8_t mat_end_code[16]
Definition: spdifenc.c:407
spdif_write_header
static int spdif_write_header(AVFormatContext *s)
Definition: spdifenc.c:570
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
FF_OFMT_FLAG_MAX_ONE_OF_EACH
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition: mux.h:50
IEC61937_MPEG1_LAYER1
@ IEC61937_MPEG1_LAYER1
MPEG-1 layer 1.
Definition: spdif.h:34
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
MAT_CODE
#define MAT_CODE(position, data)
Definition: spdifenc.c:411
IEC61937_MPEG2_LAYER2_LSF
@ IEC61937_MPEG2_LAYER2_LSF
MPEG-2, layer-2 low sampling frequency.
Definition: spdif.h:39
mat_middle_code
static const uint8_t mat_middle_code[12]
Definition: spdifenc.c:404
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Underlying C type is unsigned int.
Definition: opt.h:255
options
static const AVOption options[]
Definition: spdifenc.c:97
spdif_deinit
static void spdif_deinit(AVFormatContext *s)
Definition: spdifenc.c:609
MAT_FRAME_SIZE
#define MAT_FRAME_SIZE
Definition: spdifenc.c:398
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
IEC61937_MPEG2_LAYER3_LSF
@ IEC61937_MPEG2_LAYER3_LSF
MPEG-2, layer-3 low sampling frequency.
Definition: spdif.h:40