aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-01 02:44:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-01 02:54:24 +0100
commit9d76cf0b18976487d71e39bbdc1b53755e366535 (patch)
treed71801d63301c89e4c860eb2dee38b47348cd5b7 /libavdevice
parent0275b75a7e705ef5a6bd6610f1450671f78000b6 (diff)
parentc8f0e88b205208da0e74f9345d4c4eb6d725774b (diff)
downloadffmpeg-9d76cf0b18976487d71e39bbdc1b53755e366535.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: rtpdec: Templatize the code for different g726 bitrate variants rv40: move loop filter to rv34dsp context lavf: make av_set_pts_info private. rtpdec: Add support for G726 audio rtpdec: Add an init function that can do custom codec context initialization avconv: make copy_tb on by default. matroskadec: don't set codec timebase. rmdec: don't set codec timebase. avconv: compute next_pts from input packet duration when possible. lavf: estimate frame duration from r_frame_rate. avconv: update InputStream.pts in the streamcopy case. Conflicts: avconv.c libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/fbdev.c libavdevice/libdc1394.c libavdevice/oss_audio.c libavdevice/v4l.c libavdevice/v4l2.c libavdevice/vfwcap.c libavdevice/x11grab.c libavformat/au.c libavformat/eacdata.c libavformat/flvdec.c libavformat/mpegts.c libavformat/mxfenc.c libavformat/rtpdec_g726.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/alsa-audio-dec.c3
-rw-r--r--libavdevice/bktr.c3
-rw-r--r--libavdevice/fbdev.c3
-rw-r--r--libavdevice/jack_audio.c3
-rw-r--r--libavdevice/libcdio.c2
-rw-r--r--libavdevice/libdc1394.c3
-rw-r--r--libavdevice/oss_audio.c3
-rw-r--r--libavdevice/pulse.c3
-rw-r--r--libavdevice/sndio_dec.c3
-rw-r--r--libavdevice/v4l.c3
-rw-r--r--libavdevice/v4l2.c3
-rw-r--r--libavdevice/vfwcap.c3
-rw-r--r--libavdevice/x11grab.c3
13 files changed, 25 insertions, 13 deletions
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c
index bd00b1535b..bb9d233a4e 100644
--- a/libavdevice/alsa-audio-dec.c
+++ b/libavdevice/alsa-audio-dec.c
@@ -46,6 +46,7 @@
*/
#include <alsa/asoundlib.h>
+#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "libavutil/mathematics.h"
@@ -80,7 +81,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
st->codec->codec_id = codec_id;
st->codec->sample_rate = s->sample_rate;
st->codec->channels = s->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
o = 2 * M_PI * s->period_size / s->sample_rate * 1.5; // bandwidth: 1.5Hz
s->timefilter = ff_timefilter_new(1000000.0 / s->sample_rate,
sqrt(2 * o), o * o);
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 72f0cc272e..6e3970128f 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -24,6 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
@@ -275,7 +276,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ret = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
s->width = width;
s->height = height;
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index fdd946d598..ee5ecee89d 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -43,6 +43,7 @@
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "avdevice.h"
+#include "libavformat/internal.h"
struct rgb_pixfmt_map_entry {
int bits_per_pixel;
@@ -110,7 +111,7 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx,
if (!(st = avformat_new_stream(avctx, NULL)))
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */
/* NONBLOCK is ignored by the fbdev driver, only set for consistency */
if (avctx->flags & AVFMT_FLAG_NONBLOCK)
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index 42499d363b..b1077c4ebe 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -29,6 +29,7 @@
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "timefilter.h"
#include "avdevice.h"
@@ -245,7 +246,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param
stream->codec->sample_rate = self->sample_rate;
stream->codec->channels = self->nports;
- av_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
}
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c
index dbd593dde5..a84918fe92 100644
--- a/libavdevice/libcdio.c
+++ b/libavdevice/libcdio.c
@@ -93,7 +93,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
st->duration = s->drive->audio_last_sector - s->drive->audio_first_sector;
else if (s->drive->tracks)
st->duration = s->drive->disc_toc[s->drive->tracks].dwStartSector;
- av_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate);
for (i = 0; i < s->drive->tracks; i++) {
char title[16];
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index 2f3a373114..754f8bf8c1 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -22,6 +22,7 @@
*/
#include "config.h"
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
@@ -256,7 +257,7 @@ static int dc1394_read_header(AVFormatContext *c, AVFormatParameters * ap)
vst = avformat_new_stream(c, NULL);
if (!vst)
goto out_camera;
- av_set_pts_info(vst, 64, 1, 1000);
+ avpriv_set_pts_info(vst, 64, 1, 1000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_RAWVIDEO;
vst->codec->time_base.den = final_frame_rate;
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index 4432376037..e3ab926704 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -40,6 +40,7 @@
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "avdevice.h"
+#include "libavformat/internal.h"
#define AUDIO_BLOCK_SIZE 4096
@@ -225,7 +226,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->codec->sample_rate = s->sample_rate;
st->codec->channels = s->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
}
diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c
index 0b60651d08..1c4b3c1dc9 100644
--- a/libavdevice/pulse.c
+++ b/libavdevice/pulse.c
@@ -31,6 +31,7 @@
#include <pulse/error.h>
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/opt.h"
#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
@@ -108,7 +109,7 @@ static av_cold int pulse_read_header(AVFormatContext *s,
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 */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
pd->pts = AV_NOPTS_VALUE;
pd->frame_duration = (pd->frame_size * 1000000LL * 8) /
diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c
index 6d6184c32b..ff3d5c160c 100644
--- a/libavdevice/sndio_dec.c
+++ b/libavdevice/sndio_dec.c
@@ -23,6 +23,7 @@
#include <sndio.h>
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "sndio_common.h"
@@ -48,7 +49,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
st->codec->sample_rate = s->sample_rate;
st->codec->channels = s->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
}
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index bbb58fbded..4b0e7198d6 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -29,6 +29,7 @@
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
+#include "libavformat/internal.h"
#include "libavcodec/dsputil.h"
#include <unistd.h>
#include <fcntl.h>
@@ -100,7 +101,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st = avformat_new_stream(s1, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
video_fd = open(s1->filename, O_RDWR);
if (video_fd < 0) {
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 07d3cb445d..dc54c4a205 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -32,6 +32,7 @@
#undef __STRICT_ANSI__ //workaround due to broken kernel headers
#include "config.h"
+#include "libavformat/internal.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -590,7 +591,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
res = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
if (s->video_size && (res = av_parse_video_size(&s->width, &s->height, s->video_size)) < 0) {
av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", s->video_size);
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 09330dea46..9a525ea27a 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
@@ -399,7 +400,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_freep(&bi);
- av_set_pts_info(st, 32, 1, 1000);
+ avpriv_set_pts_info(st, 32, 1, 1000);
ctx->mutex = CreateMutex(NULL, 0, NULL);
if(!ctx->mutex) {
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 2ecf88c2d5..15036b849e 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -36,6 +36,7 @@
*/
#include "config.h"
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
@@ -199,7 +200,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ret = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
screen = DefaultScreen(dpy);