aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2014-09-19 01:44:42 -0300
committerJames Almer <jamrial@gmail.com>2014-09-19 14:32:38 -0300
commit6edd6a4f002d8ca51f1f60be3c26afced1ba9420 (patch)
tree5114de1e8a88ccfc15954c8f211e16f4162a2883
parent5ccd08d26ddafe6e6f6374f6c5fa59c18727d219 (diff)
downloadffmpeg-6edd6a4f002d8ca51f1f60be3c26afced1ba9420.tar.gz
avcodec/dv_profile: deprecate internal function that shouldn't be public
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavcodec/dv_profile.c12
-rw-r--r--libavcodec/dv_profile.h6
-rw-r--r--libavcodec/dv_profile_internal.h8
-rw-r--r--libavcodec/dvdec.c3
-rw-r--r--libavcodec/version.h5
6 files changed, 33 insertions, 4 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 8a280297e8..b257b21925 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2014-08-09
API changes, most recent first:
+2014-09-xx - xxxxxxx - lavc 56.1.101 - dv_profile.h
+ deprecate avpriv_dv_frame_profile2(), which was made public by accident.
+
-------- 8< --------- FFmpeg 2.4 was cut here -------- 8< ---------
diff --git a/libavcodec/dv_profile.c b/libavcodec/dv_profile.c
index 084f3047bc..b301cbfb8b 100644
--- a/libavcodec/dv_profile.c
+++ b/libavcodec/dv_profile.c
@@ -257,7 +257,7 @@ void ff_dv_print_profiles(void *logctx, int loglevel)
#endif /* CONFIG_DVPROFILE */
-const AVDVProfile* avpriv_dv_frame_profile2(AVCodecContext* codec, const AVDVProfile *sys,
+const AVDVProfile* ff_dv_frame_profile(AVCodecContext* codec, const AVDVProfile *sys,
const uint8_t *frame, unsigned buf_size)
{
#if CONFIG_DVPROFILE
@@ -297,10 +297,18 @@ const AVDVProfile* avpriv_dv_frame_profile2(AVCodecContext* codec, const AVDVPro
return NULL;
}
+#if FF_API_DV_FRAME_PROFILE
+const AVDVProfile* avpriv_dv_frame_profile2(AVCodecContext* codec, const AVDVProfile *sys,
+ const uint8_t *frame, unsigned buf_size)
+{
+ return ff_dv_frame_profile(codec, sys, frame, buf_size);
+}
+#endif
+
const AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys,
const uint8_t *frame, unsigned buf_size)
{
- return avpriv_dv_frame_profile2(NULL, sys, frame, buf_size);
+ return ff_dv_frame_profile(NULL, sys, frame, buf_size);
}
const AVDVProfile *av_dv_codec_profile(int width, int height,
diff --git a/libavcodec/dv_profile.h b/libavcodec/dv_profile.h
index a2aec4d1c2..d4437c9786 100644
--- a/libavcodec/dv_profile.h
+++ b/libavcodec/dv_profile.h
@@ -58,8 +58,14 @@ typedef struct AVDVProfile {
const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */
} AVDVProfile;
+#if FF_API_DV_FRAME_PROFILE
+/**
+ * @deprecated use av_dv_frame_profile()
+ */
+attribute_deprecated
const AVDVProfile* avpriv_dv_frame_profile2(AVCodecContext* codec, const AVDVProfile *sys,
const uint8_t* frame, unsigned buf_size);
+#endif
/**
* Get a DV profile for the provided compressed frame.
diff --git a/libavcodec/dv_profile_internal.h b/libavcodec/dv_profile_internal.h
index 97720416ab..67d3a2b79a 100644
--- a/libavcodec/dv_profile_internal.h
+++ b/libavcodec/dv_profile_internal.h
@@ -19,9 +19,17 @@
#ifndef AVCODEC_DV_PROFILE_INTERNAL_H
#define AVCODEC_DV_PROFILE_INTERNAL_H
+#include "dv_profile.h"
+
/**
* Print all allowed DV profiles into logctx at specified logging level.
*/
void ff_dv_print_profiles(void *logctx, int loglevel);
+/**
+ * Get a DV profile for the provided compressed frame.
+ */
+const AVDVProfile* ff_dv_frame_profile(AVCodecContext* codec, const AVDVProfile *sys,
+ const uint8_t *frame, unsigned buf_size);
+
#endif /* AVCODEC_DV_PROFILE_INTERNAL_H */
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 7de7e5b4ce..5751135409 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -42,6 +42,7 @@
#include "avcodec.h"
#include "dv.h"
+#include "dv_profile_internal.h"
#include "dvdata.h"
#include "get_bits.h"
#include "idctdsp.h"
@@ -362,7 +363,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
int apt, is16_9, ret;
const AVDVProfile *sys;
- sys = avpriv_dv_frame_profile2(avctx, s->sys, buf, buf_size);
+ sys = ff_dv_frame_profile(avctx, s->sys, buf, buf_size);
if (!sys || buf_size < sys->frame_size) {
av_log(avctx, AV_LOG_ERROR, "could not find dv frame profile\n");
return -1; /* NOTE: we only accept several full frames */
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 7b303344e8..a77e8b7401 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 56
#define LIBAVCODEC_VERSION_MINOR 1
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -175,5 +175,8 @@
/* XXX: don't forget to drop the -vismv documentation */
#define FF_API_VISMV (LIBAVCODEC_VERSION_MAJOR < 57)
#endif
+#ifndef FF_API_DV_FRAME_PROFILE
+#define FF_API_DV_FRAME_PROFILE (LIBAVCODEC_VERSION_MAJOR < 57)
+#endif
#endif /* AVCODEC_VERSION_H */