#include "libavutil/avassert.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "avcodec.h"
pkt->flags = 0;
pkt->stream_index = 0;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
pkt->side_data = NULL;
pkt->data = buf->data;
pkt->size = size;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dummy_destruct_packet;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0;
return AVERROR(ENOMEM);
memcpy(pkt->buf->data, pkt->data, FFMIN(pkt->size, pkt->size + grow_by));
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dummy_destruct_packet;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
pkt->data = pkt->buf->data;
pkt->data = data;
pkt->size = size;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dummy_destruct_packet;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0;
{
AVPacket tmp_pkt;
+FF_DISABLE_DEPRECATION_WARNINGS
if (!pkt->buf && pkt->data
#if FF_API_DESTRUCT_PACKET
&& !pkt->destruct
#endif
) {
+FF_ENABLE_DEPRECATION_WARNINGS
tmp_pkt = *pkt;
pkt->data = NULL;
pkt->side_data = NULL;
DUP_DATA(pkt->data, tmp_pkt.data, pkt->size, 1, ALLOC_BUF);
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dummy_destruct_packet;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (pkt->side_data_elems) {
if (pkt) {
int i;
+FF_DISABLE_DEPRECATION_WARNINGS
if (pkt->buf)
av_buffer_unref(&pkt->buf);
#if FF_API_DESTRUCT_PACKET
pkt->destruct(pkt);
pkt->destruct = NULL;
#endif
+FF_ENABLE_DEPRECATION_WARNINGS
pkt->data = NULL;
pkt->size = 0;
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
+#include "libavutil/internal.h"
#include "get_bits.h"
#include "parser.h"
#include "mlp_parser.h"
if (mh.stream_type == 0xbb) {
/* MLP stream */
#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
mh.num_substreams > 1) {
avctx->channels = 2;
avctx->channel_layout = AV_CH_LAYOUT_STEREO;
} else
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (avctx->request_channel_layout == AV_CH_LAYOUT_STEREO &&
mh.num_substreams > 1) {
} else { /* mh.stream_type == 0xba */
/* TrueHD stream */
#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
mh.num_substreams > 1) {
avctx->channels = 2;
avctx->channels = mh.channels_thd_stream1;
avctx->channel_layout = mh.channel_layout_thd_stream1;
} else
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (avctx->request_channel_layout == AV_CH_LAYOUT_STEREO &&
mh.num_substreams > 1) {
#include <stdint.h>
#include "avcodec.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/channel_layout.h"
#include "get_bits.h"
s->max_matrix_channel = max_matrix_channel;
#if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
if (m->avctx->request_channels > 0 &&
m->avctx->request_channels <= s->max_channel + 1 &&
m->max_decoded_substream > substr) {
s->max_channel + 1, substr);
m->max_decoded_substream = substr;
} else
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (m->avctx->request_channel_layout == s->ch_layout &&
m->max_decoded_substream > substr) {
#include <float.h>
#include <limits.h>
+#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "version.h"
#define AV_CODEC_DEFAULT_BITRATE 200*1000
+FF_DISABLE_DEPRECATION_WARNINGS
static const AVOption avcodec_options[] = {
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E},
{"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far "
{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, A|V|D },
{NULL},
};
+FF_ENABLE_DEPRECATION_WARNINGS
#undef A
#undef V
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
+#include "libavutil/internal.h"
#if HAVE_PTHREADS
#include <pthread.h>
dst->draw_horiz_band= src->draw_horiz_band;
dst->get_buffer2 = src->get_buffer2;
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
dst->get_buffer = src->get_buffer;
dst->release_buffer = src->release_buffer;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
dst->opaque = src->opaque;
* and it calls back to the client here.
*/
+FF_DISABLE_DEPRECATION_WARNINGS
if (!p->avctx->thread_safe_callbacks && (
#if FF_API_GET_BUFFER
p->avctx->get_buffer ||
#endif
p->avctx->get_buffer2 != avcodec_default_get_buffer2)) {
+FF_ENABLE_DEPRECATION_WARNINGS
while (p->state != STATE_SETUP_FINISHED && p->state != STATE_INPUT_READY) {
pthread_mutex_lock(&p->progress_mutex);
while (p->state == STATE_SETTING_UP)
}
pthread_mutex_lock(&p->parent->buffer_mutex);
+FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->thread_safe_callbacks || (
#if FF_API_GET_BUFFER
!avctx->get_buffer &&
#endif
avctx->get_buffer2 == avcodec_default_get_buffer2)) {
+FF_ENABLE_DEPRECATION_WARNINGS
err = ff_get_buffer(avctx, f->f, flags);
} else {
p->requested_frame = f->f;
PerThreadContext *p = avctx->thread_opaque;
FrameThreadContext *fctx;
AVFrame *dst, *tmp;
+FF_DISABLE_DEPRECATION_WARNINGS
int can_direct_free = !(avctx->active_thread_type & FF_THREAD_FRAME) ||
avctx->thread_safe_callbacks ||
(
!avctx->get_buffer &&
#endif
avctx->get_buffer2 == avcodec_default_get_buffer2);
+FF_ENABLE_DEPRECATION_WARNINGS
if (!f->f->data[0])
return;
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/frame.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
return ret;
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
frame->type = FF_BUFFER_TYPE_INTERNAL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
switch (avctx->codec_type) {
}
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
{
return avcodec_default_get_buffer2(avctx, frame, 0);
AVBufferRef *buf = opaque;
av_buffer_unref(&buf);
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
frame->reordered_opaque = avctx->reordered_opaque;
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
/*
* Wrap an old get_buffer()-allocated buffer in an bunch of AVBuffers.
* We wrap each plane in its own AVBuffer. Each of those has a reference to
av_buffer_unref(&dummy_buf);
return ret;
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
ret = avctx->get_buffer2(avctx, frame, flags);
if (avpkt->data) {
AVBufferRef *buf = avpkt->buf;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
void *destruct = avpkt->destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (avpkt->size < size)
av_init_packet(avpkt);
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
avpkt->destruct = destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
avpkt->buf = buf;
avpkt->size = size;
}
#if FF_API_MISSING_SAMPLE
+FF_DISABLE_DEPRECATION_WARNINGS
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
{
av_log(avc, AV_LOG_WARNING, "%s is not implemented. Update your Libav "
va_end(argument_list);
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_MISSING_SAMPLE */
static AVHWAccel *first_hwaccel = NULL;
#include "libavutil/atomic.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
pkt->data = s->buf_start[buf.index];
pkt->size = buf.bytesused;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dummy_release_buffer;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
buf_descriptor = av_malloc(sizeof(struct buff_data));
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/rational.h"
goto err;
}
#if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
ret->output_count = ret->nb_outputs;
ret->input_count = ret->nb_inputs;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
return ret;
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
graph->filters[graph->nb_filters++] = filter;
#if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
graph->filter_count = graph->nb_filters;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
filter->graph = graph;
graph->filters[graph->nb_filters++] = s;
#if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
graph->filter_count = graph->nb_filters;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
s->graph = graph;
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "audio.h"
}
#if FF_API_AVFILTERBUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
static void compat_free_buffer(AVFilterBuffer *buf)
{
AVFrame *frame = buf->priv;
{
return compat_read(ctx, buf, nb_samples);
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
static const AVFilterPad avfilter_vsink_buffer_inputs[] = {
#include "libavutil/fifo.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "audio.h"
}
#if FF_API_AVFILTERBUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
static void compat_free_buffer(void *opaque, uint8_t *data)
{
AVFilterBufferRef *buf = opaque;
return ret;
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
static av_cold int init_video(AVFilterContext *ctx)
* internal API functions
*/
+#include "libavutil/internal.h"
#include "avfilter.h"
#include "thread.h"
#include "version.h"
ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad),
&f->input_pads, &f->inputs, p);
#if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
f->input_count = f->nb_inputs;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
ff_insert_pad(index, &f->nb_outputs, offsetof(AVFilterLink, srcpad),
&f->output_pads, &f->outputs, p);
#if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
f->output_count = f->nb_outputs;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
asf_st->frag_offset = 0;
*pkt = asf_st->pkt;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
asf_st->pkt.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
asf_st->pkt.buf = 0;
asf_st->pkt.size = 0;
#include "libavutil/avstring.h"
#include "libavutil/bswap.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
AVBufferRef *avbuf = pkt->buf;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
dstr = pkt->destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
size = avpriv_dv_produce_packet(avi->dv_demux, pkt,
pkt->data, pkt->size);
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dstr;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = avbuf;
pkt->flags |= AV_PKT_FLAG_KEY;
#include "id3v2.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/parseutils.h"
#include "libavutil/time.h"
this_pktl = av_mallocz(sizeof(AVPacketList));
this_pktl->pkt = *pkt;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL; // do not free original but only the copy
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
av_dup_packet(&this_pktl->pkt); // duplicate the packet if it uses non-alloced memory
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/mjpeg.h"
#include "avformat.h"
pkt->pts = pkt->dts = mxg->dts;
pkt->stream_index = 0;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
pkt->size = mxg->buffer_ptr - mxg->soi_ptr;
pkt->pts = pkt->dts = AV_RL64(startmarker_ptr + 8);
pkt->stream_index = 1;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->buf = NULL;
pkt->size = size - 14;
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
pkt->size= -1;
pkt->buf = NULL;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0;
}
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
vst->pkt.size= 0;
vst->pkt.buf = NULL;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
vst->pkt.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if(vst->slices != vst->cur_slice) //FIXME find out how to set slices correct from the begin
memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices,
#include "libavcodec/bytestream.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
+#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "metadata.h"
#include "id3v2.h"
out_pkt.buf = pkt->buf;
pkt->buf = NULL;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
out_pkt.destruct = pkt->destruct;
pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
if ((ret = av_dup_packet(&out_pkt)) < 0)
#include "common.h"
#include "pixfmt.h"
#include "pixdesc.h"
-
+#include "internal.h"
#include "intreadwrite.h"
void av_read_image_line(uint16_t *dst,
},
};
+FF_DISABLE_DEPRECATION_WARNINGS
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
{
enum AVPixelFormat pix_fmt;
return desc - av_pix_fmt_descriptors;
}
+FF_ENABLE_DEPRECATION_WARNINGS
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
int *h_shift, int *v_shift)