Commit graph

138 commits

Author SHA1 Message Date
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