aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-22 05:01:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-22 05:05:02 +0200
commit32c3038734c97fa02e544447597a04798a67e0e1 (patch)
tree951dfc08cd81369234ff67560f0603e3fc179282 /libavformat
parent1aeb87fa072450699b1daa953b5b3e647b7330d3 (diff)
parentb2668c85e9d3745847f716f909ba4d3f6de0e12e (diff)
downloadffmpeg-32c3038734c97fa02e544447597a04798a67e0e1.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: x86: swscale: Place inline assembly code under appropriate #ifdefs rtsp: remove terminal comma in FF_RTP_FLAG_OPTS macro. configure: Remove redundant RTMPT/RTMPTS dependencies configure: add filtering of host cflags/ldflags configure: initialise all flag filters at the same place configure: add filtering of linker flags configure: name some variables more consistently configure: remove filter_cppflags configure: set icc_version where it is needed mpegenc: remove disabled code Conflicts: configure libavformat/movenc.c libswscale/x86/swscale_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c2
-rw-r--r--libavformat/mpegenc.c116
-rw-r--r--libavformat/rtpenc.c2
-rw-r--r--libavformat/rtpenc.h2
-rw-r--r--libavformat/rtsp.c2
5 files changed, 4 insertions, 120 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index bc46cb7dd0..9560529aef 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -52,7 +52,7 @@ static const AVOption options[] = {
{ "separate_moof", "Write separate moof/mdat atoms for each track", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MOV_FLAG_SEPARATE_MOOF}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "frag_custom", "Flush fragments on caller requests", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MOV_FLAG_FRAG_CUSTOM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
{ "isml", "Create a live smooth streaming feed (for pushing to a publishing point)", 0, AV_OPT_TYPE_CONST, {.dbl = FF_MOV_FLAG_ISML}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" },
- FF_RTP_FLAG_OPTS(MOVMuxContext, rtp_flags)
+ FF_RTP_FLAG_OPTS(MOVMuxContext, rtp_flags),
{ "skip_iods", "Skip writing iods atom.", offsetof(MOVMuxContext, iods_skip), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
{ "iods_audio_profile", "iods audio profile atom.", offsetof(MOVMuxContext, iods_audio_profile), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM},
{ "iods_video_profile", "iods video profile atom.", offsetof(MOVMuxContext, iods_video_profile), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 255, AV_OPT_FLAG_ENCODING_PARAM},
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 1e119be10b..d07a0471bf 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -379,14 +379,6 @@ static int mpeg_mux_init(AVFormatContext *ctx)
av_log(ctx, AV_LOG_WARNING, "VBV buffer size not set, muxing may fail\n");
stream->max_buffer_size = 230*1024; //FIXME this is probably too small as default
}
-#if 0
- /* see VCD standard, p. IV-7*/
- stream->max_buffer_size = 46 * 1024;
- else
- /* This value HAS to be used for SVCD (see SVCD standard, p. 26 V.2.3.2).
- Right now it is also used for everything else.*/
- stream->max_buffer_size = 230 * 1024;
-#endif
s->video_bound++;
break;
case AVMEDIA_TYPE_SUBTITLE:
@@ -534,92 +526,6 @@ static int get_vcd_padding_size(AVFormatContext *ctx, int64_t pts)
}
-#if 0 /* unused, remove? */
-/* return the exact available payload size for the next packet for
- stream 'stream_index'. 'pts' and 'dts' are only used to know if
- timestamps are needed in the packet header. */
-static int get_packet_payload_size(AVFormatContext *ctx, int stream_index,
- int64_t pts, int64_t dts)
-{
- MpegMuxContext *s = ctx->priv_data;
- int buf_index;
- StreamInfo *stream;
-
- stream = ctx->streams[stream_index]->priv_data;
-
- buf_index = 0;
- if (((s->packet_number % s->pack_header_freq) == 0)) {
- /* pack header size */
- if (s->is_mpeg2)
- buf_index += 14;
- else
- buf_index += 12;
-
- if (s->is_vcd) {
- /* there is exactly one system header for each stream in a VCD MPEG,
- One in the very first video packet and one in the very first
- audio packet (see VCD standard p. IV-7 and IV-8).*/
-
- if (stream->packet_number==0)
- /* The system headers refer only to the stream they occur in,
- so they have a constant size.*/
- buf_index += 15;
-
- } else {
- if ((s->packet_number % s->system_header_freq) == 0)
- buf_index += s->system_header_size;
- }
- }
-
- if ((s->is_vcd && stream->packet_number==0)
- || (s->is_svcd && s->packet_number==0))
- /* the first pack of each stream contains only the pack header,
- the system header and some padding (see VCD standard p. IV-6)
- Add the padding size, so that the actual payload becomes 0.*/
- buf_index += s->packet_size - buf_index;
- else {
- /* packet header size */
- buf_index += 6;
- if (s->is_mpeg2) {
- buf_index += 3;
- if (stream->packet_number==0)
- buf_index += 3; /* PES extension */
- buf_index += 1; /* obligatory stuffing byte */
- }
- if (pts != AV_NOPTS_VALUE) {
- if (dts != pts)
- buf_index += 5 + 5;
- else
- buf_index += 5;
-
- } else {
- if (!s->is_mpeg2)
- buf_index++;
- }
-
- if (stream->id < 0xc0) {
- /* AC-3/LPCM private data header */
- buf_index += 4;
- if (stream->id >= 0xa0) {
- int n;
- buf_index += 3;
- /* NOTE: we round the payload size to an integer number of
- LPCM samples */
- n = (s->packet_size - buf_index) % stream->lpcm_align;
- if (n)
- buf_index += (stream->lpcm_align - n);
- }
- }
-
- if (s->is_vcd && (stream->id & 0xe0) == AUDIO_ID)
- /* The VCD standard demands that 20 zero bytes follow
- each audio packet (see standard p. IV-8).*/
- buf_index+=20;
- }
- return s->packet_size - buf_index;
-}
-#endif
-
/* Write an MPEG padding packet header. */
static void put_padding_packet(AVFormatContext *ctx, AVIOContext *pb,int packet_bytes)
{
@@ -985,28 +891,6 @@ static void put_vcd_padding_sector(AVFormatContext *ctx)
s->packet_number++;
}
-#if 0 /* unused, remove? */
-static int64_t get_vcd_scr(AVFormatContext *ctx,int stream_index,int64_t pts)
-{
- MpegMuxContext *s = ctx->priv_data;
- int64_t scr;
-
- /* Since the data delivery rate is constant, SCR is computed
- using the formula C + i * 1200 where C is the start constant
- and i is the pack index.
- It is recommended that SCR 0 is at the beginning of the VCD front
- margin (a sequence of empty Form 2 sectors on the CD).
- It is recommended that the front margin is 30 sectors long, so
- we use C = 30*1200 = 36000
- (Note that even if the front margin is not 30 sectors the file
- will still be correct according to the standard. It just won't have
- the "recommended" value).*/
- scr = 36000 + s->packet_number * 1200;
-
- return scr;
-}
-#endif
-
static int remove_decoded_packets(AVFormatContext *ctx, int64_t scr){
// MpegMuxContext *s = ctx->priv_data;
int i;
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index f7e2cf0630..0a3071d190 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -31,7 +31,7 @@
//#define DEBUG
static const AVOption options[] = {
- FF_RTP_FLAG_OPTS(RTPMuxContext, flags)
+ FF_RTP_FLAG_OPTS(RTPMuxContext, flags),
{ "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.dbl = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM },
{ "ssrc", "Stream identifier", offsetof(RTPMuxContext, ssrc), AV_OPT_TYPE_INT, { 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h
index 8827cb3254..de2b3a6e60 100644
--- a/libavformat/rtpenc.h
+++ b/libavformat/rtpenc.h
@@ -73,7 +73,7 @@ typedef struct RTPMuxContext RTPMuxContext;
{ "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
{ "rfc2190", "Use RFC 2190 packetization instead of RFC 4629 for H.263", 0, AV_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_RFC2190}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
{ "skip_rtcp", "Don't send RTCP sender reports", 0, AV_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_SKIP_RTCP}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
- { "h264_mode0", "Use mode 0 for H264 in RTP", 0, AV_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
+ { "h264_mode0", "Use mode 0 for H264 in RTP", 0, AV_OPT_TYPE_CONST, {.dbl = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index abfdca80db..c00ff99686 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -74,7 +74,7 @@
const AVOption ff_rtsp_options[] = {
{ "initial_pause", "Don't start playing the stream immediately", OFFSET(initial_pause), AV_OPT_TYPE_INT, {0}, 0, 1, DEC },
- FF_RTP_FLAG_OPTS(RTSPState, rtp_muxer_flags)
+ FF_RTP_FLAG_OPTS(RTSPState, rtp_muxer_flags),
{ "rtsp_transport", "RTSP transport protocols", OFFSET(lower_transport_mask), AV_OPT_TYPE_FLAGS, {0}, INT_MIN, INT_MAX, DEC|ENC, "rtsp_transport" }, \
{ "udp", "UDP", 0, AV_OPT_TYPE_CONST, {1 << RTSP_LOWER_TRANSPORT_UDP}, 0, 0, DEC|ENC, "rtsp_transport" }, \
{ "tcp", "TCP", 0, AV_OPT_TYPE_CONST, {1 << RTSP_LOWER_TRANSPORT_TCP}, 0, 0, DEC|ENC, "rtsp_transport" }, \