From 82ed4f1ed89d9ce0985e968fb93eb53e5136bade Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 26 Oct 2011 18:48:02 -0400 Subject: [PATCH 1/5] remove the zork pcm seek test this was forgotten when the encoder was removed --- tests/ref/seek/pcm_zork_wav | 53 ------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 tests/ref/seek/pcm_zork_wav diff --git a/tests/ref/seek/pcm_zork_wav b/tests/ref/seek/pcm_zork_wav deleted file mode 100644 index 22d95bf27f..0000000000 --- a/tests/ref/seek/pcm_zork_wav +++ /dev/null @@ -1,53 +0,0 @@ -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894127 pts: 1.894127 pos: 30364 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788367 pts: 0.788367 pos: 12672 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576757 pts: 2.576757 pos: 41286 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470748 pts: 1.470748 pos: 23590 size: 4096 -ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365125 pts: 0.365125 pos: 5900 size: 4096 -ret: 0 st: 0 flags:1 ts:-0.740839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.153379 pts: 2.153379 pos: 34512 size: 4096 -ret: 0 st:-1 flags:1 ts: 1.047503 -ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 16818 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.058322 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.835828 -ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 45430 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.730004 -ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 27738 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.624127 pts: 0.624127 pos: 10044 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.481655 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st: 0 flags:1 ts: 2.412494 -ret: 0 st: 0 flags:1 dts: 2.412381 pts: 2.412381 pos: 38656 size: 4096 -ret: 0 st:-1 flags:0 ts: 1.306672 -ret: 0 st: 0 flags:1 dts: 1.306757 pts: 1.306757 pos: 20966 size: 4096 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.200748 pts: 0.200748 pos: 3270 size: 4096 -ret: 0 st: 0 flags:0 ts:-0.904989 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.989184 -ret: 0 st: 0 flags:1 dts: 1.989116 pts: 1.989116 pos: 31884 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 0.883379 pts: 0.883379 pos: 14192 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.222493 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 -ret: 0 st: 0 flags:0 ts: 2.671678 -ret: 0 st: 0 flags:1 dts: 2.671746 pts: 2.671746 pos: 42806 size: 4096 -ret: 0 st: 0 flags:1 ts: 1.565850 -ret: 0 st: 0 flags:1 dts: 1.565760 pts: 1.565760 pos: 25110 size: 4096 -ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 7418 size: 4096 -ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096 From 0de9c41ff4acbd9e0b9f1397d279b40f5750dfe9 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 26 Oct 2011 09:27:53 -0700 Subject: [PATCH 2/5] pulse: introduce pulseaudio input It currently use the simple api and is using the latency information provided only to offset the stream start. Signed-off-by: Luca Barbato --- Changelog | 1 + configure | 4 + libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/avdevice.h | 2 +- libavdevice/pulse.c | 190 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 libavdevice/pulse.c diff --git a/Changelog b/Changelog index 491f93b79c..d34c952564 100644 --- a/Changelog +++ b/Changelog @@ -55,6 +55,7 @@ easier to use. The changes are: - Ut Video decoder - Speex encoding via libspeex - 4:2:2 H.264 decoding support +- Pulseaudio input device version 0.7: diff --git a/configure b/configure index 1860dc8ae5..80adbdc3a3 100755 --- a/configure +++ b/configure @@ -940,6 +940,7 @@ CONFIG_LIST=" libopencore_amrwb libopencv libopenjpeg + libpulse librtmp libschroedinger libspeex @@ -1459,6 +1460,7 @@ libcdio_indev_deps="libcdio" libdc1394_indev_deps="libdc1394" oss_indev_deps_any="soundcard_h sys_soundcard_h" oss_outdev_deps_any="soundcard_h sys_soundcard_h" +pulse_indev_deps="libpulse" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -2895,6 +2897,7 @@ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_de enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg +enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex @@ -3180,6 +3183,7 @@ echo "libopencore-amrnb support ${libopencore_amrnb-no}" echo "libopencore-amrwb support ${libopencore_amrwb-no}" echo "libopencv support ${libopencv-no}" echo "libopenjpeg enabled ${libopenjpeg-no}" +echo "libpulse enabled ${libpulse-no}" echo "librtmp enabled ${librtmp-no}" echo "libschroedinger enabled ${libschroedinger-no}" echo "libspeex enabled ${libspeex-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 1f2a6efceb..78de08a50e 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -16,6 +16,7 @@ OBJS-$(CONFIG_FBDEV_INDEV) += fbdev.o OBJS-$(CONFIG_JACK_INDEV) += jack_audio.o timefilter.o OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o OBJS-$(CONFIG_OSS_OUTDEV) += oss_audio.o +OBJS-$(CONFIG_PULSE_INDEV) += pulse.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_common.o sndio_dec.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_common.o sndio_enc.o OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index a1a333f454..e65644bc1a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -45,6 +45,7 @@ void avdevice_register_all(void) REGISTER_INDEV (FBDEV, fbdev); REGISTER_INDEV (JACK, jack); REGISTER_INOUTDEV (OSS, oss); + REGISTER_INDEV (PULSE, pulse); REGISTER_INOUTDEV (SNDIO, sndio); REGISTER_INDEV (V4L2, v4l2); #if FF_API_V4L diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index c0d392d939..fd82816713 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -22,7 +22,7 @@ #include "libavutil/avutil.h" #define LIBAVDEVICE_VERSION_MAJOR 53 -#define LIBAVDEVICE_VERSION_MINOR 1 +#define LIBAVDEVICE_VERSION_MINOR 2 #define LIBAVDEVICE_VERSION_MICRO 0 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c new file mode 100644 index 0000000000..1edd24fdd9 --- /dev/null +++ b/libavdevice/pulse.c @@ -0,0 +1,190 @@ +/* + * Pulseaudio input + * Copyright (c) 2011 Luca Barbato + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * PulseAudio input using the simple API. + * @author Luca Barbato + * + */ + +#include +#include +#include + +#include "libavformat/avformat.h" +#include "libavutil/opt.h" + +#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE) + +typedef struct PulseData { + AVClass *class; + char *server; + char *name; + char *stream_name; + int sample_rate; + int channels; + int frame_size; + int fragment_size; + pa_simple *s; + int64_t pts; +} PulseData; + +static pa_sample_format_t codec_id_to_pulse_format(int codec_id) { + switch (codec_id) { + case CODEC_ID_PCM_U8: return PA_SAMPLE_U8; + case CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW; + case CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW; + case CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE; + case CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE; + case CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE; + case CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE; + case CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE; + case CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE; + case CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE; + case CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE; + default: return PA_SAMPLE_INVALID; + } +} + +static av_cold int pulse_read_header(AVFormatContext *s, + AVFormatParameters *ap) +{ + PulseData *pd = s->priv_data; + AVStream *st; + char *device = NULL; + int ret; + enum CodecID codec_id = + s->audio_codec_id == CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id; + const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id), + pd->sample_rate, + pd->channels }; + + pa_buffer_attr attr = { -1 }; + + st = avformat_new_stream(s, NULL); + + if (!st) { + av_log(s, AV_LOG_ERROR, "Cannot add stream\n"); + return AVERROR(ENOMEM); + } + + attr.fragsize = pd->fragment_size; + + if (strcmp(s->filename, "default")) + device = s->filename; + + pd->s = pa_simple_new(pd->server, pd->name, + PA_STREAM_RECORD, + device, pd->stream_name, &ss, + NULL, &attr, &ret); + + if (!pd->s) { + av_log(s, AV_LOG_ERROR, "pa_simple_new failed: %s\n", + pa_strerror(ret)); + return AVERROR(EIO); + } + /* take real parameters */ + st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->codec_id = codec_id; + st->codec->sample_rate = pd->sample_rate; + st->codec->channels = pd->channels; + av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ + + pd->pts = AV_NOPTS_VALUE; + + return 0; +} + +static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt) +{ + PulseData *pd = s->priv_data; + int res; + pa_usec_t latency; + uint64_t frame_duration = + (pd->frame_size*1000000LL) / (pd->sample_rate * pd->channels); + + if (av_new_packet(pkt, pd->frame_size) < 0) { + return AVERROR(ENOMEM); + } + + if ((pa_simple_read(pd->s, pkt->data, pkt->size, &res)) < 0) { + av_log(s, AV_LOG_ERROR, "pa_simple_read failed: %s\n", + pa_strerror(res)); + av_free_packet(pkt); + return AVERROR(EIO); + } + + if ((latency = pa_simple_get_latency(pd->s, &res)) == (pa_usec_t) -1) { + av_log(s, AV_LOG_ERROR, "pa_simple_get_latency() failed: %s\n", + pa_strerror(res)); + return AVERROR(EIO); + } + + if (pd->pts == AV_NOPTS_VALUE) { + pd->pts = -latency; + } + + pkt->pts = pd->pts; + + pd->pts += frame_duration; + + return 0; +} + +static av_cold int pulse_close(AVFormatContext *s) +{ + PulseData *pd = s->priv_data; + pa_simple_free(pd->s); + return 0; +} + +#define OFFSET(a) offsetof(PulseData, a) +#define D AV_OPT_FLAG_DECODING_PARAM + +static const AVOption options[] = { + { "server", "pulse server name", OFFSET(server), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D }, + { "name", "application name", OFFSET(name), AV_OPT_TYPE_STRING, {.str = "libav"}, 0, 0, D }, + { "stream_name", "stream description", OFFSET(stream_name), AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D }, + { "sample_rate", "sample rate in Hz", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, D }, + { "channels", "number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, D }, + { "frame_size", "number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.dbl = 1024}, 1, INT_MAX, D }, + { "fragment_size", "buffering size, affects latency and cpu usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX, D }, + { NULL }, +}; + +static const AVClass pulse_demuxer_class = { + .class_name = "Pulse demuxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + +AVInputFormat ff_pulse_demuxer = { + .name = "pulse", + .long_name = NULL_IF_CONFIG_SMALL("Pulse audio input"), + .priv_data_size = sizeof(PulseData), + .read_header = pulse_read_header, + .read_packet = pulse_read_packet, + .read_close = pulse_close, + .flags = AVFMT_NOFILE, + .priv_class = &pulse_demuxer_class, +}; From c4b97fbdfabb9d252a13c9c1f7bc8e1c2e9e43c5 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Wed, 26 Oct 2011 09:27:54 -0700 Subject: [PATCH 3/5] pulse: documentation Specify avoptions and how to use pactl to list devices. Signed-off-by: Luca Barbato --- doc/indevs.texi | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index e1c058b8a6..87dee70d30 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -154,6 +154,89 @@ ffmpeg -f oss -i /dev/dsp /tmp/oss.wav For more information about OSS see: @url{http://manuals.opensound.com/usersguide/dsp.html} +@section pulse + +pulseaudio input device. + +To enable this input device during configuration you need libpulse-simple +installed in your system. + +The filename to provide to the input device is a source device or the +string "default" + +To list the pulse source devices and their properties you can invoke +the command @file{pactl list sources}. + +@example +avconv -f pulse -i default /tmp/pulse.wav +@end example + +@subsection @var{server} AVOption + +The syntax is: +@example +-server @var{server name} +@end example + +Connects to a specific server. + +@subsection @var{name} AVOption + +The syntax is: +@example +-name @var{application name} +@end example + +Specify the application name pulse will use when showing active clients, +by default it is "libav" + +@subsection @var{stream_name} AVOption + +The syntax is: +@example +-stream_name @var{stream name} +@end example + +Specify the stream name pulse will use when showing active streams, +by default it is "record" + +@subsection @var{sample_rate} AVOption + +The syntax is: +@example +-sample_rate @var{samplerate} +@end example + +Specify the samplerate in Hz, by default 48kHz is used. + +@subsection @var{channels} AVOption + +The syntax is: +@example +-channels @var{N} +@end example + +Specify the channels in use, by default 2 (stereo) is set. + +@subsection @var{frame_size} AVOption + +The syntax is: +@example +-frame_size @var{bytes} +@end example + +Specify the number of byte per frame, by default it is set to 1024. + +@subsection @var{fragment_size} AVOption + +The syntax is: +@example +-fragment_size @var{bytes} +@end example + +Specify the minimal buffering fragment in pulseaudio, it will affect the +audio latency. By default it is unset. + @section sndio sndio input device. From cf543c6574faa196bb7d2f04f2811269e9ec50c0 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Thu, 27 Oct 2011 17:41:40 +0200 Subject: [PATCH 4/5] iv8: assemble packets to return complete frames --- libavformat/iv8.c | 65 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/libavformat/iv8.c b/libavformat/iv8.c index c1ddd0fdb7..d036636f6b 100644 --- a/libavformat/iv8.c +++ b/libavformat/iv8.c @@ -55,33 +55,56 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) static int read_packet(AVFormatContext *s, AVPacket *pkt) { - int ret, size, pts, type; -retry: - type= avio_rb16(s->pb); // 257 or 258 - size= avio_rb16(s->pb); + int ret, size, pts, type, flags; + int first_pkt = 0; + int frame_complete = 0; - avio_rb16(s->pb); //some flags, 0x80 indicates end of frame - avio_rb16(s->pb); //packet number - pts=avio_rb32(s->pb); - avio_rb32(s->pb); //6A 13 E3 88 + while (!frame_complete) { - size -= 12; - if(size<1) - return -1; + type = avio_rb16(s->pb); // 257 or 258 + size = avio_rb16(s->pb); + flags = avio_rb16(s->pb); //some flags, 0x80 indicates end of frame + avio_rb16(s->pb); //packet number + pts = avio_rb32(s->pb); + avio_rb32(s->pb); //6A 13 E3 88 - if(type==258){ - avio_skip(s->pb, size); - goto retry; + frame_complete = flags & 0x80; + + size -= 12; + if (size < 1) + return -1; + + if (type == 258) { + avio_skip(s->pb, size); + frame_complete = 0; + continue; + } + + if (!first_pkt) { + ret = av_get_packet(s->pb, pkt, size); + if (ret < 0) + return ret; + first_pkt = 1; + pkt->pts = pts; + pkt->pos -= 16; + } else { + ret = av_append_packet(s->pb, pkt, size); + if (ret < 0) { + av_log(s, AV_LOG_ERROR, "failed to grow packet\n"); + av_free_packet(pkt); + return ret; + } + } + if (ret < size) { + av_log(s, AV_LOG_ERROR, "Truncated packet! Read %d of %d bytes\n", + ret, size); + pkt->flags |= AV_PKT_FLAG_CORRUPT; + break; + } } - - ret= av_get_packet(s->pb, pkt, size); - - pkt->pts= pts; - pkt->pos-=16; - pkt->stream_index = 0; - return ret; + return 0; } AVInputFormat ff_iv8_demuxer = { From 15946eb8a940416d9792c65900273d674f9c152a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 25 Oct 2011 16:52:02 +0200 Subject: [PATCH 5/5] lavc: remove "legacy" mpegvideo decoder. --- libavcodec/Makefile | 2 -- libavcodec/allcodecs.c | 1 - libavcodec/mpeg12.c | 15 --------------- 3 files changed, 18 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 9dfde53eb7..421072ee88 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -245,8 +245,6 @@ OBJS-$(CONFIG_MPC7_DECODER) += mpc7.o mpc.o mpegaudiodec.o \ OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o mpegaudiodec.o \ mpegaudiodecheader.o mpegaudio.o \ mpegaudiodata.o -OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o \ - mpegvideo.o error_resilience.o OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \ mpegvideo.o error_resilience.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 107ec310e0..23d2252f98 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -145,7 +145,6 @@ void avcodec_register_all(void) REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); REGISTER_ENCDEC (MPEG4, mpeg4); REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau); - REGISTER_DECODER (MPEGVIDEO, mpegvideo); REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau); REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau); REGISTER_DECODER (MSMPEG4V1, msmpeg4v1); diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 226bde36ac..eefcb7b45e 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -2522,21 +2522,6 @@ AVCodec ff_mpeg2video_decoder = { .profiles = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles), }; -//legacy decoder -AVCodec ff_mpegvideo_decoder = { - .name = "mpegvideo", - .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO, - .priv_data_size = sizeof(Mpeg1Context), - .init = mpeg_decode_init, - .close = mpeg_decode_end, - .decode = mpeg_decode_frame, - .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, - .flush = flush, - .max_lowres = 3, - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), -}; - #if CONFIG_MPEG_XVMC_DECODER static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) {