Commit graph

245 commits

Author SHA1 Message Date
Jesper Larsen
f9a4d559eb mpegtsmux: Remove unused data in TsMuxSection
https://bugzilla.gnome.org/show_bug.cgi?id=721685
2014-05-06 14:10:06 +02:00
Sebastian Dröge
dec5de073d mpegtsmux: Only require alignment and stream-format for h264, parsed is implicit 2014-04-25 17:40:56 +02:00
Edward Hervey
998e19896b mpegtsmux: Remove unneeded unref
packet_buffer has already been cleared in all code paths leading
to this point.

CID #1199696
2014-04-11 11:34:26 +02:00
Vincent Penquerc'h
931150cb91 Revert "tsmux: catch alloc failure"
Turns out glib aborts on allocation failure, so this is pointless.
We'll just ignore Coverity warnings on such constructs.

This reverts commit d347809a82.
2014-04-09 16:01:43 +01:00
Vincent Penquerc'h
d47727c032 mpegtsmux: guard against _dispose being called mutiple times
_dispose calls _reset, so we need to make sure _reset handles
already NULLed fields.

Coverity 1139843
2014-04-09 13:53:13 +01:00
Vincent Penquerc'h
d6dc066527 tsmux: prevent possible double free on error path
Spotted while looking at a Coverity issue in the area.
2014-04-09 13:44:59 +01:00
Vincent Penquerc'h
d347809a82 tsmux: catch alloc failure
While it will probably not trigger, it should silence a Coverity
warning about the fail code path testing for NULLness before
freeing, where the buffer was already dereferenced. It seems
safest to keep that test, in case future goto fail statements
happen to have a NULL buffer there.

Coverity 1139851
2014-04-09 13:44:45 +01:00
Edward Hervey
0ae5c15bf8 mpegtsmux: Initialize helper mpegts library
We now use that library, we need to initialize it so that debug
categories (amongst other things) get properly initialized
2014-04-08 07:47:15 +02:00
Sebastian Dröge
22b6ec3b2f mpegtsmux: Require parsed/framed input for most of the supported formats
https://bugzilla.gnome.org/show_bug.cgi?id=719519
2014-04-02 23:49:37 +02:00
Thiago Santos
2b3c3d485b mpegtsmux: forward tags that have global scope
Instead of dropping all tag events

https://bugzilla.gnome.org/show_bug.cgi?id=644395
2014-02-26 10:26:57 -03:00
Jesper Larsen
6a5f1354b3 mpegtsmux: Use mpeg-ts lib for PAT/PMT sections
Rewrite of the PAT/PMT section handling to use the mpeg-ts library
2014-02-06 15:57:50 +01:00
Jesper Larsen
93a8137be6 mpegtsmux: Add support for muxing SI tables
The muxer is now able to include DVB sections in the transport stream.

The si-interval property will determine how often the SI tables are
muxed into the stream.

The section is handled by the mpeg-ts library. Below is a small example
that will include a Netork Information Table with a Network Name
descriptor in the stream.

GstMpegTsNIT *nit;
GstMpegTsDescriptor *descriptor;
GstMpegTsSection *section;
GstElement *mpegtsmux;

gst_mpegts_initialize ();

nit = gst_mpegts_section_nit_new ();
nit->actual_network = TRUE;

descriptor = gst_mpegts_descriptor_from_dvb_network_name ("Network name");
g_ptr_array_add (nit->descriptors, descriptor);

section = gst_mpegts_section_from_nit (nit);

// mpegtsmux should be retrieved from the pipeline
gst_mpegts_section_send_event (section, mpegtsmux);
gst_mpegts_section_unref (section);
2014-02-06 15:55:46 +01:00
Justin Joy
99c2aa14c3 mpegtsmux: don't leak pad name when treating events
https://bugzilla.gnome.org/show_bug.cgi?id=722699
2014-01-22 10:07:11 +01:00
Jan Schmidt
14a56b6964 mpegtsmux: Don't disrupt buffer state in the clip function
Collectpads assumes that it can pass any buffer to the clip function
for adjustment, some of which are artificially injected - so don't
adjust global timestamp tracking there. Instead, only adjust the
buffer timestamps and use them directly in the collection function.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=698748
2013-12-31 23:23:18 +11:00
Thibault Saunier
da4f9c18ec mpegtsmux: Fix compilation when debug is disabled 2013-11-14 09:02:35 -03:00
Thibault Saunier
b148c22cec mpegtsmux: Properly add subtitle descriptor for DVb subpicture subtitles
We were adding an empty descriptor for them and it was not possible to
actually use them on muxed streams.
2013-11-13 17:56:07 -03:00
Matthieu Bouron
e7687dbaa2 mpegtsmux: fix uninitialized variable warning
https://bugzilla.gnome.org/show_bug.cgi?id=710759
2013-10-25 12:26:23 +01:00
Jesper Larsen
e4a0c4d509 mpegtsmux: Set the program number from prog-map
The prog-map property of mpegtsmux only allows you to group pids together in a program.
The program number set in the PAT/PMT tables cannot be set explicitly.

This patch will set the program number according to the prog-map.
If a program id of 0 is given, the first vacant program number starting from 1 will be used.

https://bugzilla.gnome.org/show_bug.cgi?id=697239
2013-08-21 13:02:02 +02:00
Tim-Philipp Müller
646ba6b3df mpegts: private/teletext -> application/x-teletext 2013-07-30 16:08:17 +01:00
Edward Hervey
97426a1caa all: Fix for GST_DISABLE_GST_DEBUG
Where applicable, remove methods that don't do anything different than
the default implementation.
2013-07-29 09:42:12 +02:00
Vincent Penquerc'h
5c82a510d9 mpegtsmux: avoid using clipped out buffers
If a buffer was entirely clipped out (ie, it's out of the segment
entirely), we'll end up with a NULL buffer, which we don't want
to process/dereference.
2013-07-25 15:06:12 +01:00
Sebastian Dröge
f0a1935119 mpegtsmux: Push stream-start event before anything else 2013-05-15 11:38:35 +02:00
Greg Rutz
4d4fd09a3a mpegtsmux: Fix memory leak when using prepare_func
prepare_func will allocate a new buffer to replace the original
one. Instead of using gst_buffer_replace (which causes an extra
refcount increment on the new buffer), we just unref the original
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=699786
2013-05-07 16:37:49 +02:00
Sebastian Dröge
e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
Kevin Thornberry
72c5c70b90 mpegtsmux: fix creation of ADTS header for AAC audio in MPEG-TS
https://bugzilla.gnome.org/show_bug.cgi?id=695412
2013-03-18 10:31:51 +00:00
Krzysztof Konopko
13910f5154 mpegtsmux: crashes when trying to re-use the element
A crash occured after pushing buffers and changing mpegtsmux state to
NULL/READ and then back to PLAYING/PAUSED.

The crash was caused by holding a dangling pointer in the MpegTsMux
program table.

Additionally stream headers were leaked when resetting the element:
mux->streamheader set to NULL in mpegtsmux_reset() before it's released
later in the same function.

Added a unit test: test_multiple_state_change

https://bugzilla.gnome.org/show_bug.cgi?id=689107
2012-11-27 19:00:25 +00:00
Krzysztof Konopko
76b8e8be51 mpegtsmux: propagate flow returns
And add a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=688870
2012-11-23 00:14:53 +00:00
Tim-Philipp Müller
9f7e7d305d gst_adapter_prev_timestamp -> gst_adapter_prev_pts 2012-11-14 12:41:27 +00:00
Kevin Thornberry
c2d4c0da5e mpegtsmux: fix DTS value being used for PTS
https://bugzilla.gnome.org/show_bug.cgi?id=687806
2012-11-07 20:34:38 +00:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Jan Schmidt
119c27c9b9 tsmux: Slightly reflow collected buffer handler for clarity. 2012-10-30 10:00:08 +11:00
Jan Schmidt
5888c60570 mpegtsmux: Don't make the same buffer writable twice.
Fixes Bug 686327 - mpegtsmux: fix refcount issue with input buffers
2012-10-22 01:41:41 +11:00
Tim-Philipp Müller
32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Stefan Sauer
27cd08ad95 collectpads: remove gst_collect_pads_add_pad_full
Rename gst_collect_pads_add_pad_full() to gst_collect_pads_add_pad() and fix all
invocations.
2012-09-12 21:13:35 +02:00
Tim-Philipp Müller
c031f5bd27 schroedinger, mpegtsmux: fix plugin names 2012-08-03 11:52:11 +01:00
Mark Nauwelaerts
c4b480b993 mpegtsmux: apply some more CLOCK_BASE to ensure slack for PCR offset
Conflicts:

	gst/mpegtsmux/tsmux/tsmux.c
2012-06-27 14:52:10 +02:00
Mark Nauwelaerts
ed34ed5b3d mpegtsmux: fix value handling in pad iteration 2012-06-20 12:22:09 +02:00
Matej Knopp
9ad3761148 mpegtsmux: fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=678130
2012-06-20 10:21:42 +02:00
Mark Nauwelaerts
20507bc0cf mpegtsmux: remove obsolete struct field 2012-06-16 19:23:00 +02:00
Mark Nauwelaerts
beceb09acc mpegtsmux: add support for DVB subtitle and teletext streams
See bug #673582.

Conflicts:

	gst/mpegtsmux/Makefile.am
2012-06-16 19:23:00 +02:00
Mark Nauwelaerts
898f6b48be mpegtsmux: optionally use fixed-size PES header 2012-06-16 19:23:00 +02:00
Mark Nauwelaerts
f49e74aa34 mpegtsmux: only write PTS and DTS if different 2012-06-16 19:23:00 +02:00
Mark Nauwelaerts
fd92a8b65a mpegtsmux: optionally set data_alignment flag in PES header 2012-06-16 19:23:00 +02:00
Mark Nauwelaerts
c76627ec9a mpegtsmux: re-enable inadvertent disabled code 2012-06-16 19:22:59 +02:00
Mark Nauwelaerts
e8ab5af7b0 mpegtsmux: use default CollectPads collect heuristic
... with an appropriately custom buffer clip function to arrange for
buffer processing.

Conflicts:

	gst/mpegtsmux/mpegtsmux.c
	gst/mpegtsmux/mpegtsmux.h
2012-06-16 19:22:59 +02:00
Raimo Järvi
3f9a0a1747 mpegtsmux: Fix compiler warnings
https://bugzilla.gnome.org/show_bug.cgi?id=678211
2012-06-16 19:22:59 +02:00
Mark Nauwelaerts
893d6eb2a3 mpegtsmux: fix ported segment init 2012-06-16 19:22:59 +02:00
Matej Knopp
6229305d7b mpegtsmux: port to 0.11
https://bugzilla.gnome.org/show_bug.cgi?id=678130
2012-06-16 19:22:35 +02:00
Mark Nauwelaerts
40760117b1 mpegtsmux: sprinkle some more debug catering 2012-06-11 16:52:55 +02:00
Mark Nauwelaerts
bef06e8c8d mpegtsmux: add SPN/PTS indexing capabilities
Based on patch by Andreas Frisch <fraxinas@opendreambox.org>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=644890
2012-06-11 16:52:53 +02:00
Mark Nauwelaerts
05dcabfe16 mpegtsmux: avoid memcpy due to temporary packet buffer
... by writing directly into the output buffer instead.
2012-06-11 16:52:49 +02:00
Mark Nauwelaerts
c2387d8bf6 mpegtsmux: plug leaks when freeing stream 2012-06-08 17:20:30 +02:00
Mark Nauwelaerts
351f3915db mpegtsmux: drain cached data upon EOS 2012-06-08 11:30:07 +02:00
Mark Nauwelaerts
0407e21ee3 mpegtsmux: allow for aligned output
... and refactor packet handling some more in the process.

Fixes #651805.
2012-06-08 11:30:05 +02:00
Mark Nauwelaerts
ead42a5e27 mpegtsmux: improve m2ts timestamp interpolation
* a known PCR should really belong to a packet holding that PCR
* interpolation can be extended backward for initial packets (PAT, PMT)
2012-06-08 11:30:03 +02:00
Mark Nauwelaerts
8637fd69e5 mpegtsmux: tweak output buffer timestamping 2012-06-08 11:30:01 +02:00
Mark Nauwelaerts
4cc905409e mpegtsmux: more header clarifications and remove some redundant fields 2012-06-06 10:32:05 +02:00
Mark Nauwelaerts
38bb55c472 mpegtsmux: avoid PID collision for auto-generated PID 2012-06-06 10:31:59 +02:00
Edward Hervey
fa4f487d8f tsmux: inline more code
With the previous commit, makes mpegtsmux 10 to 15% faster
2012-06-06 10:31:54 +02:00
Edward Hervey
e3a02ce49a mpegtsmux: Don't use g_list_first ()
Seriously ...
2012-06-06 10:31:48 +02:00
Mark Nauwelaerts
c195a015e1 mpegtsmux: also properly reset and free pad data 2012-06-06 10:31:43 +02:00
Mark Nauwelaerts
ec109c390f mpegtsmux: refactor init using _reset to cater for proper reuse 2012-06-06 10:31:39 +02:00
Mark Nauwelaerts
8cb22ffeaa mpegtsmux: header cleanups and clarifications 2012-06-06 10:31:34 +02:00
Mark Nauwelaerts
59627a3e5d mpegtsmux: tweak buffer handling
... for clarity and to avoid mixing _peek/_pop
2012-06-06 10:31:29 +02:00
Mark Nauwelaerts
30c782e062 mpegtsmux: misc code cleanups and refactoring 2012-06-06 10:31:24 +02:00
Mark Nauwelaerts
d97d49d237 mpegtsmux: avoid separate allocation for list of programs 2012-06-06 10:31:19 +02:00
Mark Nauwelaerts
281f48f66e mpegtsmux: rearrange define's 2012-06-06 10:31:14 +02:00
Mark Nauwelaerts
4d94e0fcf7 mpegtsmux: removed hacked event handling
Conflicts:

	gst/mpegtsmux/mpegtsmux.c

Reverted back to 0.10 state as it wasn't really ported
yet anyway.
2012-06-06 10:30:55 +02:00
Mark Nauwelaerts
74c73eba05 mpegtsmux: optimize output by aggregating packets
... rather than pushing each (small) packet in a separate buffer.
m2ts mode not yet optimized though.
2012-05-14 11:52:29 +02:00
Mark Nauwelaerts
6578797245 collectpads2: rename to collectpads 2012-04-17 15:22:59 +02:00
Alessandro Decina
4251b25308 mpegtsmux: fix pad iterator leak 2012-04-16 08:53:12 +02:00
Alessandro Decina
34cf1a1bbc mpegtsmux: don't leak force key unit events 2012-04-16 08:53:06 +02:00
Sebastian Dröge
cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
Sebastian Dröge
1318a97e0a gst: Update versioning 2012-04-04 14:44:34 +02:00
Wim Taymans
eff7037447 Merge branch 'master' into 0.11 2012-02-14 11:19:04 +01:00
Jan Schmidt
debf4984df mpegtsmux: Trivial bug fix. Don't copy data from an uninited buffer. 2012-02-13 23:05:35 +11:00
Wim Taymans
1119f6ee41 Merge branch 'master' into 0.11
Conflicts:
	ext/chromaprint/gstchromaprint.c
	ext/mpeg2enc/Makefile.am
	ext/voaacenc/gstvoaacenc.c
	gst/dvbsuboverlay/gstdvbsuboverlay.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/sdp/gstsdpdemux.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	tests/examples/camerabin/gst-camera-perf.c
	tests/examples/camerabin/gst-camerabin-test.c
	tests/examples/camerabin2/gst-camerabin2-test.c
	tests/examples/mxf/mxfdemux-structure.c
	tests/examples/scaletempo/demo-main.c
2012-02-10 16:46:50 +01:00
Vincent Penquerc'h
27f21d31ac mpegtsmux: specify in template caps we only take raw/adts AAC format
This appears to be what this element supports.

https://bugzilla.gnome.org/show_bug.cgi?id=665394
2012-02-02 12:37:02 +00:00
Alessandro Decina
f547336fdc mpegtsmux: update after collectpads2 changes 2012-01-31 08:44:04 +01:00
Vincent Penquerc'h
8147669971 plenty: fixup glib deprecations 2012-01-27 15:47:07 +00:00
Edward Hervey
f70a623418 Merge remote-tracking branch 'origin/master' into 0.11-premerge
Conflicts:
	docs/libs/Makefile.am
	ext/kate/gstkatetiger.c
	ext/opus/gstopusdec.c
	ext/xvid/gstxvidenc.c
	gst-libs/gst/basecamerabinsrc/Makefile.am
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideoencoder.c
	gst/asfmux/gstasfmux.c
	gst/audiovisualizers/gstwavescope.c
	gst/camerabin2/gstcamerabin2.c
	gst/debugutils/gstcompare.c
	gst/frei0r/gstfrei0rmixer.c
	gst/mpegpsmux/mpegpsmux.c
	gst/mpegtsmux/mpegtsmux.c
	gst/mxf/mxfmux.c
	gst/videomeasure/gstvideomeasure_ssim.c
	gst/videoparsers/gsth264parse.c
	gst/videoparsers/gstmpeg4videoparse.c
2011-12-30 11:41:17 +01:00
Alessandro Decina
38a5719c53 mpegtsmux: unset the current PCR stream when starting a new unit
Unset the current PCR stream when starting a new unit so that afterwards a new
stream is selected as PCR and PAT and PMT tables are regenerated.
2011-12-18 17:32:11 +01:00
Alessandro Decina
ee429ba7b8 mpegtsmux: fix key unit event handling when muxing both audio and video
Take only video buffers into account when deciding when to cut so that new units
start with a video keyframe.
2011-12-18 17:31:18 +01:00
Vincent Penquerc'h
1029619766 mpegtsmux: port to GstCollectPads2
I *think* the stream lock use is correct, not 100% sure.
2011-12-15 13:22:24 +00:00
Tim-Philipp Müller
65e8564343 mpegtsmux: fix build in uninstalled setup
Add -base libs includes to CFLAGS, fix order of LIBS.
2011-11-30 10:35:12 +00:00
Alessandro Decina
777c1f034f mpegtsmux: add support for force key unit events
Handle force key unit events outputting PAT and PMT when all_headers=TRUE
2011-11-30 08:56:48 +01:00
Vincent Penquerc'h
7521b597f4 various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:08:27 +00:00
Stefan Sauer
d2f2955f18 collectpads: port API changes 2011-11-17 08:53:23 +01:00
Wim Taymans
c8adc4f8c8 make request pads take _%u 2011-11-04 12:22:37 +01:00
Alessandro Decina
fa6d174455 tsmux: remove unnecessary check
remove an if (best) check where best != NULL has already been checked
2011-08-21 10:54:52 +02:00
Sameer Naik
666807ed69 mpegtsmux: fix segfault if gst_collect_pads_pop () returns no buffer
In mpegtsmux_choose_best_stream () call if the gst_collect_pads_pop () call
returns no buffer (NULL), the plugin SegFaults in the gst_buffer_unref call.
To fix this we check if a valid buffer is returned before calling
gst_buffer_unref ().

Fixes bug #654416.
2011-07-12 07:51:21 +02:00
Andreas Frisch
4a7057048f mpegtsmux: fix pointer output in stream-not-associated debug output
https://bugzilla.gnome.org/show_bug.cgi?id=651050
2011-05-25 14:21:57 +01:00
David Schleef
02daafb9ae mpegtsmux: use gst debug for tsmux library 2011-05-18 12:06:38 -07:00
David Schleef
55633f5e8f mpegtsmux: Add byte-stream to h264 caps 2011-04-18 09:50:56 -07:00
David Schleef
4a8ba50cb2 mpegtsmux: Fix 64-bit printf format problem 2011-03-27 13:57:05 -07:00
Jan Schmidt
5111540ceb Use correct clock when checking whether to write a new PCR
The PCR clocks against the 27MHz SCR clock, so check it correctly
to avoid writing the PCR too often.

Partially fixes: #611046
2011-03-26 16:18:22 +11:00
Jan Schmidt
9a26173a57 Rewrite M2TS packet output
Make sure we only write the bottom 30 bits of the PCR to the m2ts header.
Don't use floating point computation for it, and remove weird bit fiddling
that messes up the PCR in a way I can't find any
justification/documentation for.

Don't accidentally lose PCR packets from the output.

Fix the description for the m2ts-mode property so it's clear it's a flag,
and which setting does what.

Fixes: #611061 #644429
Partially fixes: #645006
2011-03-26 16:18:22 +11:00
Jan Schmidt
2721e943e2 Fix a FIXME, and some whitespace/code style bits.
Also, add a new copyright notice for me.
2011-03-26 16:18:22 +11:00
Tim-Philipp Müller
0276663d0c mpegtsmux: fix broken pad caps refcount handling
gst_caps_make_writable() takes ownership of the caps passed in, but
the caller doesn't own a ref to the caps here, because GST_PAD_CAPS
doesn't return a ref. Looks like the code relied on a caps leak
elsewhere for this to work properly.
2011-03-14 12:42:33 +00:00
Tim-Philipp Müller
70e71562b7 mpegtsmux: don't error out if downstream fails to handle the newsegment event
If downstream doesn't handle the newsegment event, don't error out (esp.
not without posting a proper error message on the bus), but just continue.
If there's a problem, we'll find out when we start pushing buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=644395
2011-03-14 12:42:33 +00:00
Andreas Frisch
aac497b635 mpegtsmux: remove unused variable 2011-03-14 12:42:33 +00:00
David Schleef
455aaa3fbd mpegtsmux: fix release_pad
Remove bogus freeing of pad element_private data that we
never set (collectpads uses it, which causes confusion here).
Also, check that our collectpads instance exists before using
it.  Partial fix for #636011.
2011-02-17 13:47:52 -08:00
David Schleef
94f6f34ace mpegtsmux: Set adaptation flag when appropriate
Specifically, when there's stuff to go into the adaptation
header.
2011-01-02 14:52:34 -08:00
David Schleef
ea113a79aa mpegtsmux: Set random_access_indicator for keyframes 2011-01-02 14:52:34 -08:00
David Schleef
7e8081c89e mpegtsmux: Fix some memleaks 2010-11-27 19:09:58 -08:00
Stefan Kost
0c22e1b954 various (gst): add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed.
2010-10-19 15:47:17 +03:00
Andoni Morales Alastruey
4668330bdc mpegtsmux: Initialize PES packet before getting the header size.
The PES header length is calculated before setting the dynamic flags, returning
a wrong value. Small frames that should be sent in a single TS packet are
spawned to a new packet because of that error. For audio streams where a single
frame can cope in one TS packet it introduces a huge overhead.

For a 100B packet, we prepare a TS packet with a payload of(100+9)B. Then, we
write the TS header using this value in tsmux_write_ts_header, and call
tsmux_stream_get_data(). The dynamic flags where not set yet and now
tsmux_stream_pes_header_length() returns 14B instead of 9B. The payload of the
TS packet is 114B, 5B more than what was calculated. 109B are sent in a first
packet and the remaining 5B are sent in another one.

Fixes bug #628548.
2010-09-04 15:01:30 +02:00
Marc-André Lureau
43f8e926e7 mpegtsmux: start pmt at 0x020 as suggested by Zaheer 2010-06-08 15:36:47 +02:00
Marc-André Lureau
d335a55b49 mpegtsmux: take all the pmt in the streamheaders 2010-06-08 15:36:29 +02:00
Benjamin Otte
240f494aa7 Add -Wold-style-definition
and fix the warnings
2010-03-22 16:56:03 +01:00
Benjamin Otte
775c7584fd gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 22:46:41 +01:00
Julien Moutte
d8117471f6 mpegtsmux: Fix a potential unref of a NULL pointer.
At first iteration we don't have any cached SPS/PPS buffer to free.
2010-02-04 19:45:42 +01:00
Marc-André Lureau
4d3a965476 mpegtsmux: add PAT/PMT in streamheader
The check for PAT/PMT buffers was suggested by
Zaheer Abbas Merali.

https://bugzilla.gnome.org/show_bug.cgi?id=608896
2010-02-03 18:26:15 +00:00
Marc-André Lureau
1537023905 mpegtsmux: add pat-interval and pmt-interval properties
https://bugzilla.gnome.org/show_bug.cgi?id=608896
2010-02-03 18:26:12 +00:00
Marc-André Lureau
130cf80752 mpegtsmux: fix PAT/PMT insertion frequency
The current code is comparing timestamps with different clock.
Let's use only the clock for PTS values.

Also rename frequency to interval, to avoid confusion. And remove
documentation about value 0, which won't work like documented.

https://bugzilla.gnome.org/show_bug.cgi?id=608896
2010-02-03 18:26:09 +00:00
Marc-André Lureau
6d554a5560 mpegtsmux: marking non-delta unit, including pre-sections
This patch address the issue observed with KF timestamps
and delta flag. When a section is appended before the keyframe,
it is not marked as non-delta. It's preferable to mark the
first buffer non-delta.

This patch also simplify the initial patch written by thomas,
since it does not clutter tsmux/ with a delta flag passed
around only for GStreamer convenience.

https://bugzilla.gnome.org/show_bug.cgi?id=604908
2010-02-03 16:37:27 +00:00
Julien Moutte
6f1ee59df6 mpegtsmux: generate SPS/PPS header once and fix overflow
Some H264 packets can be as small as 5 bytes for repeated frames.
In such a situation the output buffer size was not big enough (5*2) to fit the
SPS/PPS header and the start codes. This corrupts the ES stream.
We now generate the SPS/PPS only once which is much more optimal and we now
know the size of the header to calculate the output buffer size more safely.
2010-02-02 12:23:24 +01:00
Thiago Santos
6e1f2cf392 mpegtsmux: Fix mistake on previous commit
Use the correct variables and variable format in the warning
message
2010-01-12 15:21:29 -03:00
Thiago Santos
ddeb6e17fd mpegtsmux: Do not crash on misinterpreted h264
Avoid crashing when bytestream h264 is interpreted as avc format
h264

Fixes #606657
2010-01-12 09:37:34 -03:00
Marc-André Lureau
67e5d76d08 mpegtsmux: only video can have non-delta-unit 2010-01-08 16:06:38 +00:00
Thomas Vander Stichele
5fab65aafb mpegtsmux: mark delta-unit on outgoing buffers
Signed-off-by: Marc-André Lureau <mlureau@flumotion.com>
2010-01-08 13:07:53 +01:00
Stefan Kost
b7b8b7f407 build: fprintf, sprintf, sscanf need stdio.h 2009-10-07 15:26:12 +03:00
Tim-Philipp Müller
95d894fd96 mpegsmux, mpegpsmux: fix unused variable warning with the debugging system in core disabled 2009-09-02 13:37:47 +01:00
Tim-Philipp Müller
10d67eda7a GstAdapter is not a GstObject and should be freed with g_object_unref() 2009-08-31 13:14:02 +01:00
Tim-Philipp Müller
d94d572e16 mpegtsmux: use an old-fashioned array instead of GPtrArray for mux->programs
Using GPtrArray for a fixed-sized array is a bit pointless and makes
for ugly code.
2009-08-31 13:00:04 +01:00
Lin YANG
e453e599af mpegtsmux: Minor fixes 2009-08-31 09:19:23 +02:00
Lin YANG
3ca8288c5b mpegtsmux: mux->programs: use GPrtArray instead of GArray 2009-08-31 09:19:17 +02:00
Lin YANG
5b0b69a858 mpegtsmux: mpegtsmux_collected(): calculate PCR for programs 2009-08-31 09:19:12 +02:00
Lin YANG
b67ed24676 mpegtsmux: mpegtsmux_create_streams(): create multi streams 2009-08-31 09:19:00 +02:00
Lin YANG
451275714c mpegtsmux: MpetTsPadData: add prog_id and ref to its program 2009-08-31 09:18:53 +02:00
Lin YANG
ee31988c7a mpegtsmux: Extend mux->program to a GArray programs 2009-08-31 09:18:48 +02:00
Lin YANG
9f90dfee3e mpegtsmux: Add new property prog-map to the muxer 2009-08-31 09:18:40 +02:00
Tim-Philipp Müller
98292e9efd Fix previous commit so that things still work with debug logs enabled 2009-06-19 17:04:48 +01:00
Tim-Philipp Müller
6eb167a176 Make build without warnings with debugging disabled 2009-06-19 16:21:28 +01:00
vanista
751555b5c3 gst/mpegtsmux/: Improve muxing of AC3/h264 streams a bit. Fixes bug #550613.
Original commit message from CVS:
Patch by: vanista <vanista at gmail dot com>
* gst/mpegtsmux/mpegtsmux.c: (mpegtsmux_create_stream):
* gst/mpegtsmux/tsmux/tsmux.c: (tsmux_write_pmt):
* gst/mpegtsmux/tsmux/tsmuxstream.c: (tsmux_stream_new),
(tsmux_stream_write_pes_header), (tsmux_stream_get_es_descrs):
* gst/mpegtsmux/tsmux/tsmuxstream.h:
Improve muxing of AC3/h264 streams a bit. Fixes bug #550613.
2009-01-05 11:28:49 +00:00
vanista
2082d618f9 gst/mpegtsmux/: Add initial support for muxing AC3/DTS/LPCM into MPEG TS.
Original commit message from CVS:
Patch by: vanista <vanista at gmail dot com>
* gst/mpegtsmux/mpegtsmux.c: (mpegtsmux_create_stream):
* gst/mpegtsmux/tsmux/tsmuxstream.c: (tsmux_stream_new):
Add initial support for muxing AC3/DTS/LPCM into MPEG TS.
Fixes bug #550613.
2008-11-24 10:46:01 +00:00
Stefan Kost
a14e8e07df Don't install static libs for plugins. Fixes #550851 for -bad.
Original commit message from CVS:
* ext/alsaspdif/Makefile.am:
* ext/amrwb/Makefile.am:
* ext/apexsink/Makefile.am:
* ext/arts/Makefile.am:
* ext/artsd/Makefile.am:
* ext/audiofile/Makefile.am:
* ext/audioresample/Makefile.am:
* ext/bz2/Makefile.am:
* ext/cdaudio/Makefile.am:
* ext/celt/Makefile.am:
* ext/dc1394/Makefile.am:
* ext/dirac/Makefile.am:
* ext/directfb/Makefile.am:
* ext/divx/Makefile.am:
* ext/dts/Makefile.am:
* ext/faac/Makefile.am:
* ext/faad/Makefile.am:
* ext/gsm/Makefile.am:
* ext/hermes/Makefile.am:
* ext/ivorbis/Makefile.am:
* ext/jack/Makefile.am:
* ext/jp2k/Makefile.am:
* ext/ladspa/Makefile.am:
* ext/lcs/Makefile.am:
* ext/libfame/Makefile.am:
* ext/libmms/Makefile.am:
* ext/metadata/Makefile.am:
* ext/mpeg2enc/Makefile.am:
* ext/mplex/Makefile.am:
* ext/musepack/Makefile.am:
* ext/musicbrainz/Makefile.am:
* ext/mythtv/Makefile.am:
* ext/nas/Makefile.am:
* ext/neon/Makefile.am:
* ext/ofa/Makefile.am:
* ext/polyp/Makefile.am:
* ext/resindvd/Makefile.am:
* ext/sdl/Makefile.am:
* ext/shout/Makefile.am:
* ext/snapshot/Makefile.am:
* ext/sndfile/Makefile.am:
* ext/soundtouch/Makefile.am:
* ext/spc/Makefile.am:
* ext/swfdec/Makefile.am:
* ext/tarkin/Makefile.am:
* ext/theora/Makefile.am:
* ext/timidity/Makefile.am:
* ext/twolame/Makefile.am:
* ext/x264/Makefile.am:
* ext/xine/Makefile.am:
* ext/xvid/Makefile.am:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/dshow/Makefile.am:
* gst/aiffparse/Makefile.am:
* gst/app/Makefile.am:
* gst/audiobuffer/Makefile.am:
* gst/bayer/Makefile.am:
* gst/cdxaparse/Makefile.am:
* gst/chart/Makefile.am:
* gst/colorspace/Makefile.am:
* gst/dccp/Makefile.am:
* gst/deinterlace/Makefile.am:
* gst/deinterlace2/Makefile.am:
* gst/dvdspu/Makefile.am:
* gst/festival/Makefile.am:
* gst/filter/Makefile.am:
* gst/flacparse/Makefile.am:
* gst/flv/Makefile.am:
* gst/games/Makefile.am:
* gst/h264parse/Makefile.am:
* gst/librfb/Makefile.am:
* gst/mixmatrix/Makefile.am:
* gst/modplug/Makefile.am:
* gst/mpeg1sys/Makefile.am:
* gst/mpeg4videoparse/Makefile.am:
* gst/mpegdemux/Makefile.am:
* gst/mpegtsmux/Makefile.am:
* gst/mpegvideoparse/Makefile.am:
* gst/mve/Makefile.am:
* gst/nsf/Makefile.am:
* gst/nuvdemux/Makefile.am:
* gst/overlay/Makefile.am:
* gst/passthrough/Makefile.am:
* gst/pcapparse/Makefile.am:
* gst/playondemand/Makefile.am:
* gst/rawparse/Makefile.am:
* gst/real/Makefile.am:
* gst/rtjpeg/Makefile.am:
* gst/rtpmanager/Makefile.am:
* gst/scaletempo/Makefile.am:
* gst/sdp/Makefile.am:
* gst/selector/Makefile.am:
* gst/smooth/Makefile.am:
* gst/smoothwave/Makefile.am:
* gst/speed/Makefile.am:
* gst/speexresample/Makefile.am:
* gst/stereo/Makefile.am:
* gst/subenc/Makefile.am:
* gst/tta/Makefile.am:
* gst/vbidec/Makefile.am:
* gst/videodrop/Makefile.am:
* gst/videosignal/Makefile.am:
* gst/virtualdub/Makefile.am:
* gst/vmnc/Makefile.am:
* gst/y4m/Makefile.am:
* sys/acmenc/Makefile.am:
* sys/cdrom/Makefile.am:
* sys/dshowdecwrapper/Makefile.am:
* sys/dshowsrcwrapper/Makefile.am:
* sys/dvb/Makefile.am:
* sys/dxr3/Makefile.am:
* sys/fbdev/Makefile.am:
* sys/oss4/Makefile.am:
* sys/qcam/Makefile.am:
* sys/qtwrapper/Makefile.am:
* sys/vcd/Makefile.am:
* sys/wininet/Makefile.am:
* win32/common/config.h:
Don't install static libs for plugins. Fixes #550851 for -bad.
2008-11-04 12:42:30 +00:00
vanista
71043cd0f9 gst/mpegtsmux/mpegtsmux.c: Fix EOS logic by correctly popping the collect pad buffers only when we've chosen to use t...
Original commit message from CVS:
Patch by: vanista <vanista at gmail dot com>
* gst/mpegtsmux/mpegtsmux.c: (mpegtsmux_choose_best_stream):
Fix EOS logic by correctly popping the collect pad buffers only
when we've chosen to use them instead of popping them always and
storing them in a private queue.
Before the pipeline would deadlock if all pads go EOS at the same
time. Fixes bug #557763.
2008-10-27 08:52:50 +00:00
Wim Taymans
0ce15bab49 gst/mpegtsmux/mpegtsmux.c: Set caps on outgoing buffers.
Original commit message from CVS:
* gst/mpegtsmux/mpegtsmux.c: (new_packet_cb):
Set caps on outgoing buffers.
2008-09-02 11:23:02 +00:00
Edward Hervey
d5e8bc1472 gst/mpegtsmux/tsmux/tsmux.c: Fix build on macosx.
Original commit message from CVS:
* gst/mpegtsmux/tsmux/tsmux.c: (tsmux_write_ts_header):
Fix build on macosx.
2008-09-02 09:46:04 +00:00
Sebastian Dröge
7ac077828f gst/mpegtsmux/mpegtsmux_aac.c: Allocate a fixed size buffer on the stack instead of using malloc().
Original commit message from CVS:
* gst/mpegtsmux/mpegtsmux_aac.c: (mpegtsmux_prepare_aac):
Allocate a fixed size buffer on the stack instead of using malloc().
* gst/mpegtsmux/tsmux/tsmux.c: (tsmux_new), (tsmux_free),
(tsmux_program_new), (tsmux_program_free):
* gst/mpegtsmux/tsmux/tsmuxstream.c: (tsmux_stream_new),
(tsmux_stream_free), (tsmux_stream_consume),
(tsmux_stream_add_data):
Use GSlice.
2008-09-01 17:49:59 +00:00
Sebastian Dröge
b24d38315f gst/mpegtsmux/mpegtsmux.c: Add support for muxing MPEG4 video.
Original commit message from CVS:
* gst/mpegtsmux/mpegtsmux.c: (mpegtsmux_create_stream):
Add support for muxing MPEG4 video.
2008-09-01 17:47:03 +00:00
Edward Hervey
b76d9f5bcd gst/mpegtsmux/tsmux/: Fix build of mpegtsmux.
Original commit message from CVS:
* gst/mpegtsmux/tsmux/tsmux.h:
* gst/mpegtsmux/tsmux/tsmuxstream.h:
Fix build of mpegtsmux.
2008-09-01 17:41:39 +00:00
Sebastian Dröge
845094c32e Add Fluendo MPEG-TS muxer and libtsmux to gst-plugins-bad. This is renamed to mpegtsmux to prevent conflicts. Also al...
Original commit message from CVS:
* configure.ac:
* gst/mpegtsmux/Makefile.am:
* gst/mpegtsmux/mpegtsmux.c: (mpegtsmux_base_init),
(mpegtsmux_class_init), (mpegtsmux_init), (mpegtsmux_dispose),
(gst_mpegtsmux_set_property), (gst_mpegtsmux_get_property),
(release_buffer_cb), (mpegtsmux_create_stream),
(mpegtsmux_create_streams), (mpegtsmux_choose_best_stream),
(mpegtsmux_collected), (mpegtsmux_request_new_pad),
(mpegtsmux_release_pad), (new_packet_cb),
(mpegtsdemux_prepare_srcpad), (mpegtsmux_change_state),
(plugin_init):
* gst/mpegtsmux/mpegtsmux.h:
* gst/mpegtsmux/mpegtsmux_aac.c: (mpegtsmux_prepare_aac):
* gst/mpegtsmux/mpegtsmux_aac.h:
* gst/mpegtsmux/mpegtsmux_h264.c: (mpegtsmux_prepare_h264):
* gst/mpegtsmux/mpegtsmux_h264.h:
* gst/mpegtsmux/tsmux/Makefile.am:
* gst/mpegtsmux/tsmux/crc.h:
* gst/mpegtsmux/tsmux/tsmux.c: (tsmux_new), (tsmux_set_write_func),
(tsmux_set_pat_frequency), (tsmux_get_pat_frequency), (tsmux_free),
(tsmux_program_new), (tsmux_set_pmt_frequency),
(tsmux_get_pmt_frequency), (tsmux_program_add_stream),
(tsmux_program_set_pcr_stream), (tsmux_get_new_pid),
(tsmux_create_stream), (tsmux_find_stream), (tsmux_packet_out),
(tsmux_write_adaptation_field), (tsmux_write_ts_header),
(tsmux_write_stream_packet), (tsmux_program_free),
(tsmux_write_section), (tsmux_write_section_hdr),
(tsmux_write_pat), (tsmux_write_pmt):
* gst/mpegtsmux/tsmux/tsmux.h:
* gst/mpegtsmux/tsmux/tsmuxcommon.h:
* gst/mpegtsmux/tsmux/tsmuxstream.c: (tsmux_stream_new),
(tsmux_stream_get_pid), (tsmux_stream_free),
(tsmux_stream_set_buffer_release_func), (tsmux_stream_consume),
(tsmux_stream_at_pes_start), (tsmux_stream_bytes_avail),
(tsmux_stream_bytes_in_buffer), (tsmux_stream_get_data),
(tsmux_stream_pes_header_length),
(tsmux_stream_find_pts_dts_within),
(tsmux_stream_write_pes_header), (tsmux_stream_add_data),
(tsmux_stream_get_es_descrs), (tsmux_stream_pcr_ref),
(tsmux_stream_pcr_unref), (tsmux_stream_is_pcr),
(tsmux_stream_get_pts):
* gst/mpegtsmux/tsmux/tsmuxstream.h:
Add Fluendo MPEG-TS muxer and libtsmux to gst-plugins-bad. This
is renamed to mpegtsmux to prevent conflicts. Also all relevant
informations about copyright and license are added to the top of
every file but apart from that no changes compared to the latest
SVN versions happened.
2008-09-01 16:38:40 +00:00