Commit Graph

138 Commits

Author SHA1 Message Date
Luca Barbato
82569b01a1 mpegtsenc: set muxing type notification to verbose 2012-10-10 18:56:54 +02:00
Diego Biurrun
72eaba5e4f avformat: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Diego Biurrun
0177b7d23a Improve descriptiveness of a number of codec and container long names 2012-07-30 20:46:55 +02:00
Jindřich Makovička
84e430dd7b mpegtsenc: use avio_open_dyn_buf(), zero pointers after freeing
Per suggestion by Michael Niedermayer.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-04 15:41:09 +03:00
Jindrich Makovicka
2439bd8681 mpegtsenc: Support LATM packetization for AAC
This adds the avoption mpegts_flags and converts the existing
resend_headers option into a flag, keeping the old option as
fallback for now.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:20:41 +03:00
Jindrich Makovicka
b1c56eabe8 mpegtsenc: use AVFormatContext for AAC packetization
This removes the dependency on adts.c internals, and simplifies
adding other packetization formats.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:17:48 +03:00
Jindrich Makovicka
d1a3a3d4b2 mpegtsenc: use AVERROR() for return codes
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:13:35 +03:00
Martin Storsjö
20234a4bd7 cosmetics: Align muxer/demuxer declarations
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 19:19:59 +03:00
Jindrich Makovicka
3fadb29baf mpegtsenc: allow user triggered PES packet flushing
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-26 11:41:18 +03:00
Martin Storsjö
4fa57d524f libavformat: Set the default for the max_delay option to -1
Make the muxers/demuxers that use the field handle the default
-1 in the same way as 0.

This allows distinguishing an intentionally set 0 from the default
value where the user hasn't set it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-20 10:53:47 +02:00
Martin Storsjö
ddf422803b mpegtsenc: Add an AVOption for forcing a new PAT/PMT/SDT to be written
When segmenting the output from the mpegts muxer, one can
now set this option when cutting to a new segment, to make sure
the next segment starts with PAT/PMT/SDT.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-13 17:31:05 +02:00
Mike Melanson
cc09dc7863 s/vbsf/bsf/
-vbsf doesn't exist anymore. It got renamed to -bsf somewhere along the
line. Update print statement accordingly.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-30 07:30:21 +01:00
Anton Khirnov
f0cb13958d lavf: remove disabled FF_API_MUXRATE cruft 2012-01-27 10:52:43 +01:00
Jindřich Makovička
891ce00c8d mpegts: adjustable minimum PES payload
With the current default PES packet size, and very small audio bitrates,
audio packet duration gets too long. For players, which wait for a whole
audio packet (or more) it takes a very long time to start playing sound.

For 24kbps audio, one PES packet is about 1 second long. On Motorola STBs,
we observe about 3 second delay before the playback starts with the
default setting.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-28 20:31:54 +01:00
Jindřich Makovička
6fa9843b4b mpegts: properly output large audio packets
Do not assume the audio packets being always smaller than
DEFAULT_PES_PAYLOAD_SIZE.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-28 20:31:15 +01:00
Luca Barbato
1c66862472 mpegts: rename payload_index to payload_size
It holds the size of the current payload.
2011-12-19 18:31:28 +01:00
Diego Biurrun
da9cea77e3 Fix a bunch of common typos. 2011-12-11 00:32:25 +01:00
Anton Khirnov
c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Alex Converse
ac47e014bb adtsenc: Check frame size.
Inspired by work from: Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-11-28 11:22:40 -08:00
Anton Khirnov
773375c3d0 lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
It's used in lavf.
2011-10-20 21:06:58 +02:00
Anton Khirnov
5a9ee3152b mpegenc/mpegtsenc: add muxrate private options.
Deprecate AVFormatContext.mux_rate.
2011-10-17 08:39:53 +02:00
Anton Khirnov
145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Anton Khirnov
dfc2c4d900 lavf: use designated initialisers for all (de)muxers.
It's more readable and less prone to breakage.
2011-07-17 06:58:37 +02:00
Jindrich Makovicka
575c38d76c mpegtsenc: set Random Access indicator on keyframe start packets
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-07-13 20:49:26 +02:00
Mans Rullgard
0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Anton Khirnov
d2d67e424f Remove all uses of now deprecated metadata functions. 2011-06-08 07:43:45 +02:00
Martin Storsjö
50fefa10de mpegtsenc: Add an AVClass pointer to the private data
Since a private class is set for this muxer, the callers will
assume that the private data starts with an AVClass pointer.
If no such member exists, the first few bytes of the struct
will be overwritten, and the class pointer may be broken at
any later time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-20 15:16:09 +03:00
Anton Khirnov
f0029cbcf6 lavf: use designated initializers for AVClasses. 2011-05-17 23:01:42 +02:00
Anton Khirnov
b66752790a AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-05-10 20:22:06 +02:00
Martin Storsjö
ed87375dd5 mpegtsenc: Clear st->priv_data when freeing it
If not cleared, the caller might try to free it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-05-09 19:14:40 +03:00
Anton Khirnov
f8fec05052 mpegtsenc: make PMT PID really start on pmt_start_pid 2011-04-28 07:26:40 +02:00
Diego Biurrun
6001dad6e2 Replace more FFmpeg references by Libav. 2011-04-17 19:31:49 +02:00
Rudolf Polzer
0a962e61e9 mpegts: force the default timebase
The mpegts muxer does not set the stream time base using
av_set_pts_info, but expects it to have the default value of 1/90000.
If the calling code changes stream pts before writing the header,
other muxers override the time base at that point (like mpegenc.c).
2011-04-14 13:51:26 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Anton Khirnov
b7f2fdde74 avio: rename put_flush_packet -> avio_flush
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:59:39 -04:00
Anssi Hannula
435cebd015 mpegtsenc: handle multiple language tags per stream
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 14:43:03 -05:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Tony Strauss
6c065f0acd mpegtsenc: use correct PES stream_id for AAC
This adds the AAC codec to the list of audio codecs that results
in a PES stream_id of 0xc0 (audio stream).

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-21 23:57:07 +00:00
Anton Khirnov
77eb5504d3 avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:15 -05:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Mans Rullgard
2dd1ee4bfe mpegtsenc: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:18:26 +00:00
Anssi Hannula
3f2d3a1904 mpegtsenc: set audio_type according to st->disposition
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 23:18:26 +00:00
Mans Rullgard
740ad0d14d mpegtsenc: fix PMT PID calculation
445996aa51 caused the PMT PID to be
off by one.  This corrects it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-31 16:58:23 +00:00
Georgi Chorbadzhiyski
445996aa51 Replace defines in libavformat/mpegtsenc.c with AVOptions
Around 01/28/11 18:56, Ronald S. Bultje scribbled:
> That patch is now merged, can you submit the update to muxers.texi?
> Then we'll apply the whole thing.

See attached. I hope the documentation is enough.

--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

From c236024b8254f5c2c45934c30fff390cb0e55a5e Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <gf@unixsol.org>
Date: Tue, 25 Jan 2011 13:09:17 +0200
Subject: [PATCH] mpegts: Replace defines in with AVOptions

This patch adds support for setting transport_stream_id,
original_network_id, service_id, pmt_start_pid and start_pid
in mpegts muxer.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-01-31 10:42:13 -05:00
Peter Ross
4d54df8e07 mpegtsenc: support CODEC_ID_AAC_LATM
$subject. Have used this for loopback testing with mpegts.c.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
[2. text/x-diff; 0001-mpegtsenc-support-CODEC_ID_AAC_LATM.patch]

From 0f7f9db4b7da1793996af6dda84298507703759a Mon Sep 17 00:00:00 2001
From: Peter Ross <pross@xvid.org>
Date: Sun, 9 Jan 2011 09:45:50 +1100
Subject: [PATCH] mpegtsenc: support CODEC_ID_AAC_LATM

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-28 22:33:57 +00:00
Georgi Chorbadzhiyski
a7827a17c6 In mpegts "reserved_future_use" field must be set to 1 in SDT table
According to EN 300 468 section 3.1 (Definitions):

   Unless otherwise specified within the present document all
   "reserved_future_use" bits is set to "1".

This was not the case for SDT generation so this patch fixes it.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-28 17:46:36 +01:00