FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
internal.h File Reference

common internal API header More...

#include <limits.h>
#include <stdint.h>
#include <stddef.h>
#include <assert.h>
#include "config.h"
#include "attributes.h"
#include "timer.h"
#include "cpu.h"
#include "dict.h"
#include "version.h"
#include "libm.h"

Go to the source code of this file.

Macros

#define av_export
 
#define FF_DISABLE_DEPRECATION_WARNINGS
 
#define FF_ENABLE_DEPRECATION_WARNINGS
 
#define FF_MEMORY_POISON   0x2a
 
#define MAKE_ACCESSORS(str, name, type, field)
 
#define E1(x)   x
 
#define LOCAL_ALIGNED_A(a, t, v, s, o,...)
 
#define LOCAL_ALIGNED_D(a, t, v, s, o,...)
 
#define LOCAL_ALIGNED(a, t, v,...)   E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_8(t, v,...)   LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_16(t, v,...)   LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
 
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)
 
#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)
 
#define NULL_IF_CONFIG_SMALL(x)   x
 
#define ONLY_IF_THREADS_ENABLED(x)   NULL
 
#define av_export
 
#define FF_DISABLE_DEPRECATION_WARNINGS
 
#define FF_ENABLE_DEPRECATION_WARNINGS
 
#define FF_MEMORY_POISON   0x2a
 
#define MAKE_ACCESSORS(str, name, type, field)
 
#define E1(x)   x
 
#define LOCAL_ALIGNED_A(a, t, v, s, o,...)
 
#define LOCAL_ALIGNED_D(a, t, v, s, o,...)
 
#define LOCAL_ALIGNED(a, t, v,...)   E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_8(t, v,...)   LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_16(t, v,...)   LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
 
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)
 
#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)
 
#define NULL_IF_CONFIG_SMALL(x)   x
 
#define ONLY_IF_THREADS_ENABLED(x)   NULL
 
#define NDEBUG
 
#define av_export
 
#define FF_DISABLE_DEPRECATION_WARNINGS
 
#define FF_ENABLE_DEPRECATION_WARNINGS
 
#define FF_MEMORY_POISON   0x2a
 
#define MAKE_ACCESSORS(str, name, type, field)
 
#define E1(x)   x
 
#define LOCAL_ALIGNED_A(a, t, v, s, o,...)
 
#define LOCAL_ALIGNED_D(a, t, v, s, o,...)
 
#define LOCAL_ALIGNED(a, t, v,...)   E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
 
#define LOCAL_ALIGNED_8(t, v,...)   LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
 
#define LOCAL_ALIGNED_16(t, v,...)   LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
 
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)
 
#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)
 
#define NULL_IF_CONFIG_SMALL(x)   x
 Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
 
#define ONLY_IF_THREADS_ENABLED(x)   NULL
 Define a function with only the non-default version specified.
 

Functions

void avpriv_report_missing_feature (void *avc, const char *msg,...) av_printf_format(2
 Log a generic warning message about a missing feature.
 
void void avpriv_request_sample (void *avc, const char *msg,...) av_printf_format(2
 Log a generic warning message about a missing feature.
 
void void int avpriv_open (const char *filename, int flags,...)
 A wrapper for open() setting O_CLOEXEC.
 
uint64_t ff_get_channel_layout (const char *name, int compat)
 

Detailed Description

common internal API header

Definition in file internal.h.

Macro Definition Documentation

#define av_export

Definition at line 19497 of file avcodec.h.

#define FF_DISABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
#define FF_MEMORY_POISON   0x2a

Definition at line 19520 of file avcodec.h.

Referenced by av_dynarray2_add(), av_malloc(), and pool_release_buffer().

#define MAKE_ACCESSORS (   str,
  name,
  type,
  field 
)
Value:
type av_##name##_get_##field(const str *s) { return s->field; } \
void av_##name##_set_##field(str *s, type v) { s->field = v; }

Definition at line 19522 of file avcodec.h.

#define E1 (   x)    x

Definition at line 19528 of file avcodec.h.

#define LOCAL_ALIGNED_A (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)

Definition at line 19530 of file avcodec.h.

#define LOCAL_ALIGNED_D (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v

Definition at line 19534 of file avcodec.h.

#define LOCAL_ALIGNED (   a,
  t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))

Definition at line 19538 of file avcodec.h.

Referenced by do_hybrid_window(), and ff_lpc_calc_coefs().

#define LOCAL_ALIGNED_8 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(8, t, v, __VA_ARGS__)

Definition at line 19543 of file avcodec.h.

Referenced by apply_obmc(), dv_encode_video_segment(), and h264_filter_mb_fast_internal().

#define LOCAL_ALIGNED_16 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
#define FF_ALLOC_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
p = av_malloc(size);\
if (p == NULL && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}

Definition at line 19552 of file avcodec.h.

Referenced by adpcm_encode_init(), allocate_buffers(), allocate_sample_buffers(), ape_decode_init(), context_init(), ff_iir_filter_init_coeffs(), ff_snow_common_init_after_header(), init_context_frame(), init_mdct_win(), initFilter(), mca(), and sws_init_context().

#define FF_ALLOCZ_OR_GOTO (   ctx,
  p,
  size,
  label 
)
#define NULL_IF_CONFIG_SMALL (   x)    x

Referenced by mpeg12_class().

#define ONLY_IF_THREADS_ENABLED (   x)    NULL
#define av_export

Definition at line 19497 of file avcodec.h.

#define FF_DISABLE_DEPRECATION_WARNINGS

Definition at line 19512 of file avcodec.h.

#define FF_ENABLE_DEPRECATION_WARNINGS

Definition at line 19513 of file avcodec.h.

#define FF_MEMORY_POISON   0x2a

Definition at line 19520 of file avcodec.h.

#define MAKE_ACCESSORS (   str,
  name,
  type,
  field 
)
Value:
type av_##name##_get_##field(const str *s) { return s->field; } \
void av_##name##_set_##field(str *s, type v) { s->field = v; }

Definition at line 19522 of file avcodec.h.

#define E1 (   x)    x

Definition at line 19528 of file avcodec.h.

#define LOCAL_ALIGNED_A (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)

Definition at line 19530 of file avcodec.h.

#define LOCAL_ALIGNED_D (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v

Definition at line 19534 of file avcodec.h.

#define LOCAL_ALIGNED (   a,
  t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))

Definition at line 19538 of file avcodec.h.

#define LOCAL_ALIGNED_8 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(8, t, v, __VA_ARGS__)

Definition at line 19543 of file avcodec.h.

#define LOCAL_ALIGNED_16 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(16, t, v, __VA_ARGS__)

Definition at line 19549 of file avcodec.h.

#define FF_ALLOC_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
p = av_malloc(size);\
if (p == NULL && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}

Definition at line 19552 of file avcodec.h.

#define FF_ALLOCZ_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
if (p == NULL && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}

Definition at line 19561 of file avcodec.h.

#define NULL_IF_CONFIG_SMALL (   x)    x
#define ONLY_IF_THREADS_ENABLED (   x)    NULL
#define NDEBUG

Definition at line 30 of file internal.h.

#define av_export

Definition at line 63 of file internal.h.

#define FF_DISABLE_DEPRECATION_WARNINGS

Definition at line 78 of file internal.h.

#define FF_ENABLE_DEPRECATION_WARNINGS

Definition at line 79 of file internal.h.

#define FF_MEMORY_POISON   0x2a

Definition at line 86 of file internal.h.

#define MAKE_ACCESSORS (   str,
  name,
  type,
  field 
)
Value:
type av_##name##_get_##field(const str *s) { return s->field; } \
void av_##name##_set_##field(str *s, type v) { s->field = v; }

Definition at line 88 of file internal.h.

#define E1 (   x)    x

Definition at line 94 of file internal.h.

#define LOCAL_ALIGNED_A (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)

Definition at line 96 of file internal.h.

#define LOCAL_ALIGNED_D (   a,
  t,
  v,
  s,
  o,
  ... 
)
Value:
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v

Definition at line 100 of file internal.h.

#define LOCAL_ALIGNED (   a,
  t,
  v,
  ... 
)    E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))

Definition at line 104 of file internal.h.

#define LOCAL_ALIGNED_8 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(8, t, v, __VA_ARGS__)

Definition at line 109 of file internal.h.

#define LOCAL_ALIGNED_16 (   t,
  v,
  ... 
)    LOCAL_ALIGNED(16, t, v, __VA_ARGS__)

Definition at line 115 of file internal.h.

#define FF_ALLOC_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
p = av_malloc(size);\
if (p == NULL && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}

Definition at line 118 of file internal.h.

#define FF_ALLOCZ_OR_GOTO (   ctx,
  p,
  size,
  label 
)
Value:
{\
if (p == NULL && (size) != 0) {\
av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\
goto label;\
}\
}

Definition at line 127 of file internal.h.

#define NULL_IF_CONFIG_SMALL (   x)    x

Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.

Used to disable the definition of strings (for example AVCodec long_names).

Definition at line 151 of file internal.h.

#define ONLY_IF_THREADS_ENABLED (   x)    NULL

Define a function with only the non-default version specified.

On systems with ELF shared libraries, all symbols exported from FFmpeg libraries are tagged with the name and major version of the library to which they belong. If a function is moved from one library to another, a wrapper must be retained in the original location to preserve binary compatibility.

Functions defined with this macro will never be used to resolve symbols by the build-time linker.

Parameters
typereturn type of function
namename of function
argsargument list of function
verversion tag to assign function Return NULL if a threading library has not been enabled. Used to disable threading functions in AVCodec definitions when not needed.

Definition at line 190 of file internal.h.

Function Documentation

void avpriv_report_missing_feature ( void avc,
const char *  msg,
  ... 
)
void void avpriv_request_sample ( void avc,
const char *  msg,
  ... 
)

Log a generic warning message about a missing feature.

Additionally request that a sample showcasing the feature be uploaded.

Parameters
[in]avca pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct
[in]msgstring containing the name of the missing feature

Referenced by aac_decode_er_frame(), alac_decode_init(), amrwb_decode_frame(), ape_decode_init(), ast_read_header(), avpriv_adx_decode_header(), avr_read_header(), cdxl_decode_frame(), cinepak_decode(), compute_band_indexes(), cook_decode_init(), dca_decode_frame(), dca_exss_parse_header(), dca_subframe_footer(), dca_subframe_header(), decode_audio_block(), decode_band_hdr(), decode_bytes(), decode_channel_transform(), decode_eld_specific_config(), decode_frame(), decode_frame_header(), decode_frame_headers(), decode_ga_specific_config(), decode_ics(), decode_init(), decode_mvc2(), decode_nop(), decode_packet(), decode_scalefactors(), decode_sgirle8(), decode_slice_header(), decode_subframe(), decode_wmv9(), decode_yuv_frame(), determine_bitrate(), dxtory_decode_v2_410(), dxtory_decode_v2_420(), dxtory_decode_v2_444(), dxtory_decode_v2_565(), dxtory_decode_v2_rgb(), ea_read_packet(), epaf_read_header(), execute_code(), exif_add_metadata(), ff_eac3_parse_header(), ff_h264_decode_seq_parameter_set(), ff_mjpeg_decode_sof(), ff_parse_mpeg2_descriptor(), ff_spdif_read_packet(), fill_coding_method_array(), flashsv_decode_frame(), flic_decode_init(), flv_set_audio_codec(), flv_set_video_codec(), g2m_decode_frame(), get_cox(), get_packet_header(), get_siz(), get_sot(), iff_read_header(), imc_decode_init(), jp2_find_codestream(), jpeg2000_decode_packet(), jpeg2000_decode_packets(), lag_decode_zero_run_line(), latm_decode_audio_specific_config(), lvf_read_header(), mimic_decode_frame(), mov_read_mdhd(), mpc7_decode_init(), mpc8_decode_init(), mtv_read_header(), mv_read_header(), mxf_parse_structural_metadata(), mxf_read_packet_old(), mxf_read_primer_pack(), nist_read_header(), oma_read_header(), paf_vid_decode(), parse_fmtp(), parse_MP4SLDescrTag(), parse_setup_header(), parse_video_var(), process_audio_header_eacs(), process_audio_header_elements(), process_ea_header(), process_frame_obj(), ptx_decode_frame(), qt_rtp_parse_packet(), read_block_data(), read_frame(), read_header(), read_major_sync(), read_restart_header(), read_sbr_extension(), read_stream_mux_config(), read_table(), rm_read_audio_stream_info(), rpl_read_header(), rsd_read_header(), rso_read_header(), rv10_decode_init(), rv10_decode_picture_header(), save_bits(), smc_decode_stream(), smjpeg_read_header(), spdif_get_offset_and_codec(), spdif_header_dts(), spdif_header_truehd(), sunrast_decode_frame(), synth_superframe(), tiff_unpack_fax(), tm2_read_header(), truemotion1_decode_header(), truespeech_decode_init(), unsupported(), vc1_decode_init(), vcr1_decode_init(), vqa_decode_init(), wsaud_read_header(), xa_decode(), xan_wc3_copy_pixel_run(), xmv_read_header(), xwd_decode_frame(), xwma_read_header(), and zero12v_decode_init().

void void int avpriv_open ( const char *  filename,
int  flags,
  ... 
)

A wrapper for open() setting O_CLOEXEC.

Definition at line 71 of file file_open.c.

Referenced by audio_open(), av_file_map(), av_fopen_utf8(), bktr_init(), dv1394_read_header(), fbdev_read_header(), fbdev_write_header(), and read_random().

uint64_t ff_get_channel_layout ( const char *  name,
int  compat 
)

Definition at line 159 of file channel_layout.c.

Referenced by av_get_channel_layout(), and av_opt_set().