From f6ee61fb05482c617f5deee29a190d8ff483b3d1 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 5 Jul 2014 09:09:15 +0000 Subject: lavc: export DV profile API used by muxer/demuxer as public --- libavcodec/dv_profile.h | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'libavcodec/dv_profile.h') diff --git a/libavcodec/dv_profile.h b/libavcodec/dv_profile.h index 9cf58a0bb5..f2f5ce9b9b 100644 --- a/libavcodec/dv_profile.h +++ b/libavcodec/dv_profile.h @@ -26,12 +26,12 @@ #include "avcodec.h" /* - * DVprofile is used to express the differences between various + * AVDVProfile is used to express the differences between various * DV flavors. For now it's primarily used for differentiating * 525/60 and 625/50, but the plans are to use it for various * DV specs as well (e.g. SMPTE314M vs. IEC 61834). */ -typedef struct DVprofile { +typedef struct AVDVProfile { int dsf; /* value of the dsf in the DV header */ int video_stype; /* stype for VAUX source pack */ int frame_size; /* total size of one frame in bytes */ @@ -51,15 +51,28 @@ typedef struct DVprofile { int audio_samples_dist[5]; /* how many samples are supposed to be */ /* in each frame in a 5 frames window */ const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */ -} DVprofile; +} AVDVProfile; -const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys, - const uint8_t* frame, unsigned buf_size); -const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec); +#if LIBAVCODEC_VERSION_MAJOR < 56 +const AVDVProfile *avpriv_dv_frame_profile(const AVDVProfile *sys, + const uint8_t* frame, unsigned buf_size); +const AVDVProfile *avpriv_dv_codec_profile(AVCodecContext* codec); +#endif /** - * Print all allowed DV profiles into logctx at specified logging level. + * Get a DV profile for the provided compressed frame. + * + * @param sys the profile used for the previous frame, may be NULL + * @param frame the compressed data buffer + * @param buf_size size of the buffer in bytes + * @return the DV profile for the supplied data or NULL on failure + */ +const AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys, + const uint8_t *frame, unsigned buf_size); + +/** + * Get a DV profile for the provided stream parameters. */ -void ff_dv_print_profiles(void *logctx, int loglevel); +const AVDVProfile *av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt); #endif /* AVCODEC_DV_PROFILE_H */ -- cgit v1.2.3