Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>tags/n2.8
@@ -1276,7 +1276,9 @@ static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx) | |||||
s->pack_pblocks = 1; | s->pack_pblocks = 1; | ||||
#if FF_API_XVMC | #if FF_API_XVMC | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
avctx->xvmc_acceleration = 2; | avctx->xvmc_acceleration = 2; | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#endif /* FF_API_XVMC */ | #endif /* FF_API_XVMC */ | ||||
} | } | ||||
} | } | ||||
@@ -2919,6 +2921,7 @@ AVCodec ff_mpegvideo_decoder = { | |||||
#if FF_API_XVMC | #if FF_API_XVMC | ||||
#if CONFIG_MPEG_XVMC_DECODER | #if CONFIG_MPEG_XVMC_DECODER | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) | static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) | ||||
{ | { | ||||
if (avctx->active_thread_type & FF_THREAD_SLICE) | if (avctx->active_thread_type & FF_THREAD_SLICE) | ||||
@@ -2950,7 +2953,7 @@ AVCodec ff_mpeg_xvmc_decoder = { | |||||
AV_CODEC_CAP_DELAY, | AV_CODEC_CAP_DELAY, | ||||
.flush = flush, | .flush = flush, | ||||
}; | }; | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#endif | #endif | ||||
#endif /* FF_API_XVMC */ | #endif /* FF_API_XVMC */ | ||||
@@ -26,6 +26,7 @@ | |||||
#include <limits.h> | #include <limits.h> | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "libavutil/internal.h" | |||||
#include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||
#include "avcodec.h" | #include "avcodec.h" | ||||
#include "version.h" | #include "version.h" | ||||
@@ -41,6 +42,7 @@ | |||||
#define AV_CODEC_DEFAULT_BITRATE 200*1000 | #define AV_CODEC_DEFAULT_BITRATE 200*1000 | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
static const AVOption avcodec_options[] = { | static const AVOption avcodec_options[] = { | ||||
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, | {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, | ||||
{"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, | {"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, | ||||
@@ -504,6 +506,7 @@ static const AVOption avcodec_options[] = { | |||||
{"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 }, | {"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 }, | ||||
{NULL}, | {NULL}, | ||||
}; | }; | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#undef A | #undef A | ||||
#undef V | #undef V | ||||
@@ -151,8 +151,10 @@ static attribute_align_arg void *frame_worker_thread(void *arg) | |||||
if (fctx->die) break; | if (fctx->die) break; | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
if (!codec->update_thread_context && THREAD_SAFE_CALLBACKS(avctx)) | if (!codec->update_thread_context && THREAD_SAFE_CALLBACKS(avctx)) | ||||
ff_thread_finish_setup(avctx); | ff_thread_finish_setup(avctx); | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
av_frame_unref(p->frame); | av_frame_unref(p->frame); | ||||
p->got_frame = 0; | p->got_frame = 0; | ||||
@@ -771,8 +773,10 @@ void ff_thread_flush(AVCodecContext *avctx) | |||||
int ff_thread_can_start_frame(AVCodecContext *avctx) | int ff_thread_can_start_frame(AVCodecContext *avctx) | ||||
{ | { | ||||
PerThreadContext *p = avctx->internal->thread_ctx; | PerThreadContext *p = avctx->internal->thread_ctx; | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
if ((avctx->active_thread_type&FF_THREAD_FRAME) && p->state != STATE_SETTING_UP && | if ((avctx->active_thread_type&FF_THREAD_FRAME) && p->state != STATE_SETTING_UP && | ||||
(avctx->codec->update_thread_context || !THREAD_SAFE_CALLBACKS(avctx))) { | (avctx->codec->update_thread_context || !THREAD_SAFE_CALLBACKS(avctx))) { | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
return 0; | return 0; | ||||
} | } | ||||
return 1; | return 1; | ||||
@@ -790,8 +794,10 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int | |||||
if (!(avctx->active_thread_type & FF_THREAD_FRAME)) | if (!(avctx->active_thread_type & FF_THREAD_FRAME)) | ||||
return ff_get_buffer(avctx, f->f, flags); | return ff_get_buffer(avctx, f->f, flags); | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
if (p->state != STATE_SETTING_UP && | if (p->state != STATE_SETTING_UP && | ||||
(avctx->codec->update_thread_context || !THREAD_SAFE_CALLBACKS(avctx))) { | (avctx->codec->update_thread_context || !THREAD_SAFE_CALLBACKS(avctx))) { | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() cannot be called after ff_thread_finish_setup()\n"); | av_log(avctx, AV_LOG_ERROR, "get_buffer() cannot be called after ff_thread_finish_setup()\n"); | ||||
return -1; | return -1; | ||||
} | } | ||||
@@ -831,9 +837,10 @@ FF_ENABLE_DEPRECATION_WARNINGS | |||||
pthread_mutex_unlock(&p->progress_mutex); | pthread_mutex_unlock(&p->progress_mutex); | ||||
} | } | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
if (!THREAD_SAFE_CALLBACKS(avctx) && !avctx->codec->update_thread_context) | if (!THREAD_SAFE_CALLBACKS(avctx) && !avctx->codec->update_thread_context) | ||||
ff_thread_finish_setup(avctx); | ff_thread_finish_setup(avctx); | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
if (err) | if (err) | ||||
av_buffer_unref(&f->progress); | av_buffer_unref(&f->progress); | ||||
@@ -33,6 +33,7 @@ | |||||
#include "libavutil/samplefmt.h" | #include "libavutil/samplefmt.h" | ||||
#if FF_API_AVCODEC_RESAMPLE | #if FF_API_AVCODEC_RESAMPLE | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
#define MAX_CHANNELS 8 | #define MAX_CHANNELS 8 | ||||
@@ -440,4 +441,5 @@ void audio_resample_close(ReSampleContext *s) | |||||
av_free(s); | av_free(s); | ||||
} | } | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#endif | #endif |
@@ -81,6 +81,7 @@ AVFrame *ff_get_audio_buffer(AVFilterLink *link, int nb_samples) | |||||
} | } | ||||
#if FF_API_AVFILTERBUFFER | #if FF_API_AVFILTERBUFFER | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
AVFilterBufferRef* avfilter_get_audio_buffer_ref_from_arrays_channels(uint8_t **data, | AVFilterBufferRef* avfilter_get_audio_buffer_ref_from_arrays_channels(uint8_t **data, | ||||
int linesize,int perms, | int linesize,int perms, | ||||
int nb_samples, | int nb_samples, | ||||
@@ -167,4 +168,5 @@ AVFilterBufferRef* avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, | |||||
nb_samples, sample_fmt, | nb_samples, sample_fmt, | ||||
channels, channel_layout); | channels, channel_layout); | ||||
} | } | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#endif | #endif |
@@ -29,6 +29,7 @@ | |||||
#include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||
#if FF_API_AVFILTERBUFFER | #if FF_API_AVFILTERBUFFER | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, | AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, | ||||
int perms) | int perms) | ||||
{ | { | ||||
@@ -134,4 +135,5 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) | |||||
return 0; | return 0; | ||||
} | } | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#endif | #endif |
@@ -290,7 +290,9 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) | |||||
dst->sample_rate = src->sample_rate; | dst->sample_rate = src->sample_rate; | ||||
dst->opaque = src->opaque; | dst->opaque = src->opaque; | ||||
#if FF_API_AVFRAME_LAVC | #if FF_API_AVFRAME_LAVC | ||||
FF_DISABLE_DEPRECATION_WARNINGS | |||||
dst->type = src->type; | dst->type = src->type; | ||||
FF_ENABLE_DEPRECATION_WARNINGS | |||||
#endif | #endif | ||||
dst->pkt_pts = src->pkt_pts; | dst->pkt_pts = src->pkt_pts; | ||||
dst->pkt_dts = src->pkt_dts; | dst->pkt_dts = src->pkt_dts; | ||||