summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
AgeCommit message (Collapse)AuthorFilesLines
2017-09-01tsdemux: Make jp2k handling more robust and efficientEdward Hervey1-24/+20
* Avoid copying the pending data and instead create a buffer directly from that data with the appropriate offset. * Locate the jp2k magic to determine the exact location of the (first) frame data instead of assuming that the header is of an expected size https://bugzilla.gnome.org/show_bug.cgi?id=786111
2017-09-01tsdemux: Handle quirk in jp2k es header handlingEdward Hervey1-0/+12
The jp2k specification (ITU-T T.800) specifies that the 'brat' box has two fields and the second one (AUF2) can be set to 0 for progressive streams. The problem is that the mpeg-ts specification (ITU-T H.222.0 06/2012) says that the AUF2 field is only present if the stream is interlaced In order to cope with both situation, accept those next 32bit if the stream is marked as progressive and those bits contain 0 https://bugzilla.gnome.org/show_bug.cgi?id=786111
2017-08-29tsdemux: Properly error out on jp2k parsing errorsEdward Hervey1-0/+8
Avoids crashes later on where we assume buffer exists
2017-08-09mpegtsdemux: remove obsolete function declarationMark Nauwelaerts1-2/+0
2017-07-21tsmux/tsdemux: Add support for JPEG2000Aaron Boxer2-3/+246
Based on patches by Milos Seleceni. https://bugzilla.gnome.org/show_bug.cgi?id=753323
2017-05-16Remove plugin specific static build optionNicolas Dufresne1-1/+0
Static and dynamic plugins now have the same interface. The standard --enable-static/--enable-shared toggle are sufficient.
2017-02-28mpegtsdemux: Fix wrong usage of '<<' operatorEdward Hervey1-2/+11
Detected by GCC 7. Add comments for clarity https://bugzilla.gnome.org/show_bug.cgi?id=779333
2017-02-27tsparse: Convert PCR values immediatelyJan Schmidt1-6/+6
Doing lazy conversion of PCR values doesn't work right when a PCR discont is encountered. Instead, convert PCR values to the continuous timestamp domain as soon as we encounter them and store that instead.
2017-01-24tsdemux: Set caps/tags in the GstStream object before pushing the ↵Sebastian Dröge1-3/+3
stream-start event Otherwise downstream will get a more or less empty GstStream although we already know a lot about it at this point.
2017-01-20tsdemux: Don't leak pad name and template for OpusSebastian Dröge1-3/+0
It's set again (the same way) further below, overwriting the previously allocated memory without freeing. https://bugzilla.gnome.org/show_bug.cgi?id=777533
2016-12-19tsdemux: Don't leak a taglist if a taglist has already been createdGraham Leggett1-1/+3
https://bugzilla.gnome.org/show_bug.cgi?id=776244
2016-11-28tsdemux: Post an error message on the bus if we activated a program without padsSebastian Dröge1-0/+14
Otherwise decodebin and applications are going to wait forever for pads to appear, which is never going to happen. Happens on this stream, which probably just need support for it added: https://samples.mplayerhq.hu/3D/AVC_codec_in_m2ts_not_recognized/AVC_codec_not_recognized_right_video_sample.m2ts
2016-11-24mpegtspacketizer: Don't add existing values to groupEdward Hervey1-8/+14
If the last value is already identical, there is no need in adding it yet-another-time
2016-11-22mpegtspacketizer: Reset values before parsing each sectionSebastian Dröge1-1/+7
2016-11-22mpegtspacketizer: Make sure in all cases that we have enough data left for ↵Sebastian Dröge1-4/+7
reading a section start In some cases we ended up parsing sections without.
2016-11-12mpegtsdemux: fix operator precedence in SAFE_FOURCC_ARGSScott D Phillips1-2/+2
Type cast has higher precedence than bitwise shift, so the third argument will truncate to 8 bits and then shift right by 8 bits resulting in constant zero. https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-10-12mpegtsdemux: Implement efficient program updatesEdward Hervey3-1/+200
If the parent bin can handle it, only add/remove the new/gone stream instead of re-adding/re-moving everything https://bugzilla.gnome.org/show_bug.cgi?id=772742
2016-10-12mpegtsdemux: Ensure we always get an upstream stream-idEdward Hervey1-1/+41
This was a regression. We only have a upstream-id via STREAM_START if we were in push-mode. In pull-mode we need to create one. Note: It would be good to eventually have that method (copied from gst_pad_get_stream_id_internal()) public in the future
2016-10-11mpegtsdemux: Fix issues with GST_DISABLE_GST_DEBUGEdward Hervey2-4/+1
Some variables were hidden or unused
2016-10-11mpegtsdemux: Switch to using GstStream/GstStreamCollectionEdward Hervey3-14/+67
For each MpegTSBaseStream, we have a GstStream object which subclasses can extend with information. For each program a GstStreamCollection is created with all GstStream from each stream.
2016-10-11mpegtsbase: Remove duplicated codeEdward Hervey1-68/+49
Just have one function to check for private section streams
2016-10-08mpegts: Also clear packetizer on TIME DISCONTEdward Hervey1-2/+3
When dealing with TIME-based input, the incoming stream could have potentially changed completely. In order to check whether it did or not, we need to re-check all sections (PAT, PMT...). If it didn't, we will keep using the existing streams/pad, and if it did we will act as if there was a program switch. Fixes HLS streaming with decodebin3/playbin3
2016-10-03tsdemux: Add conditions to identify ATSC EAC3Wonchul Lee2-0/+15
https://bugzilla.gnome.org/show_bug.cgi?id=770528
2016-09-13tsdemux: handle a NULL name in DVB short event descriptorGraham Leggett1-6/+16
Resolves the warning: GStreamer-WARNING **: Trying to set NULL string on field 'title' on taglist. https://bugzilla.gnome.org/show_bug.cgi?id=771198
2016-09-01tsdemux: Support ATSC EAC3Wonchul Lee2-0/+6
EAC3 bit streams shall be identified with a stream_type value of 0x87 when transmitted as PES streams conforming to ATSC-published standards. It is specified in ATSC Standard A/52. https://bugzilla.gnome.org/show_bug.cgi?id=770528
2016-08-26Use the new API to post flow ERROR messages on the busThibault Saunier1-3/+1
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-25meson: Make mpegts lib build when using subprojectsThibault Saunier1-1/+1
The headers passed as parametter are relative to the build dir basically "../subproject/gst-plugins-bad/gst-libs/gst/mpegts/XXX.h" but that does not match what is needed at build time when building as subproject, also we always add current dir as include_dir so we are safe including directly. And link mpegtsdemux against the 'math' library as it is needed.
2016-08-20Add support for Meson as alternative/parallel build systemNirbheek Chauhan1-0/+18
https://github.com/mesonbuild/meson With contributions from: Tim-Philipp Müller <tim@centricular.com> Matej Knopp <matej.knopp@gmail.com> Jussi Pakkanen <jpakkane@gmail.com> (original port) Highlights of the features provided are: * Faster builds on Linux (~40-50% faster) * The ability to build with MSVC on Windows * Generate Visual Studio project files * Generate XCode project files * Much faster builds on Windows (on-par with Linux) * Seriously fast configure and building on embedded ... and many more. For more details see: http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html Building with Meson should work on both Linux and Windows, but may need a few more tweaks on other operating systems.
2016-08-03tsdemux: Fix draining on wrong programsEdward Hervey1-13/+21
When draining a program, we might send a newsegment event on the pads that are going to be removed (and then the pending data). In order to do that, calculate_and_push_newsegment() needs to know what list of streams it should take into account (instead of blindly using the current one). All callers to calculate_and_push_newsegment() and push_pending_data() can now specify the program on which to act (or NULL for the default one).
2016-08-03tsdemux: Fix GAP synchronization without a valid PCR PIDEdward Hervey1-7/+13
For streams that don't have a valid PCR PID, we just use the latest PTS from any given stream. https://bugzilla.gnome.org/show_bug.cgi?id=608148
2016-08-03tsdemux: handle pcr_pid == 0x1fffMichael Olbrich1-1/+18
Streams without PCR make senses in HLS, where the playlist timestamps can be used to seek or calculate the duration. https://bugzilla.gnome.org/show_bug.cgi?id=608148
2016-08-03mpegtsdemux: do not abort playback when no PCR were found during initial scanArnaud Vrac1-1/+1
Seeking will not be possible in those streams but at least the can be played. Note scanning is only done when tsdemux is configured in pull mode. https://bugzilla.gnome.org/show_bug.cgi?id=608148
2016-08-03mpegtsdemux: only wait for PCR when PCR pid is setArnaud Vrac1-0/+2
Streams without PCR make senses in HLS, where the playlist timestamps can be used to seek or calculate the duration. https://bugzilla.gnome.org/show_bug.cgi?id=608148
2016-07-25tsdemux: add support for LPCM with stream_type = 0x83Michael Olbrich2-0/+5
https://bugzilla.gnome.org/show_bug.cgi?id=765807
2016-06-06tsdemux: Change the pad naming scheme to include a generation IDJan Schmidt2-8/+21
A simple fix for the problem of creating new pads with duplicate names when switching program, easier than the alternative of trying to work out which pads might persist and manage that. See https://bugzilla.gnome.org/show_bug.cgi?id=758454
2016-05-13mpegtsbase: remove unused variables: upstream_live and queried_latencyDamian Ziobro1-5/+0
https://bugzilla.gnome.org/show_bug.cgi?id=766343
2016-04-12mpegtsbase: Fix when applying new PMT with same program numberJan Schmidt1-2/+3
When the sub-class is delaying deactivation of the old program, but it has the same program number as the new program, don't overwrite the old program in the hash table and then steal the new program back out of it. Instead, add the new program to the hash table after handling removal of the old one.
2016-03-24mpegtsbase: plug EIT string leakThiago Santos1-0/+1
2016-03-24mpegtspacketizer: simplify variable resetThiago Santos1-2/+1
Just set it directly to 0, instead of checking and reseting
2016-03-24bad: use new gst_element_class_add_static_pad_template()Vineeth TM2-6/+3
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-12tsdemux: add video/x-h265 to template capsTim-Philipp Müller1-0/+2
2016-03-12mpegts: Don't leave freed programs in the hash tableJan Schmidt2-0/+15
When the sub-class claims a program for later freeing, make sure it's not left in the hash table, or it can cause crashes on shutdown. Make sure tsdemux frees any program it has kept around at shutdown if it wasn't freed already. https://bugzilla.gnome.org/show_bug.cgi?id=763503
2016-03-08tsdemux: Don't reset/recalculate segments with accurate seeksEdward Hervey1-3/+4
When dealing with accurate seeks, we must send out a segment which is exactly what is requested. https://bugzilla.gnome.org/show_bug.cgi?id=763262
2016-03-03mpegtspacketizer: handle early PTS conversion when a group has been foundAurélien Zanelli1-2/+6
In some cases, the PTS might be smaller than the first observed PCR value which causes element to apply wraparound leading to bogus timestamp. To solve this, we only apply it if the PTS-PCR difference is greater that 1 second to be sure that it's a real wraparound. Moreover, using unsigned 32 bits values to handle wrapover could end up with bogus value, so it use pts value to handle it. Also, convert pcr time to gst time before comparing it to pts. Since refpcr is expressed in PCR time base while pts is expressed in GStreamer time. https://bugzilla.gnome.org/show_bug.cgi?id=743259
2016-02-19tsparse: Fix per-program-pad pushingEdward Hervey1-19/+23
This fixes a couple of issues regarding the output of (request) per-program pads output: We would never push out PAT sections (ok, that was one reallly stupid mistake. I guess nobody ever uses this feature ...). In the case where the PMT section of a program was bigger than one packet, we would only end up pushing the last packet of that PMT. Which obviously results in the resulting stream never containing the proper (complete) PMT. The problem was that the program is only started (in the base class) after the PMT section is completely parsed. When dealing with single-program pads, tsparse only wants to push the PMT corresponding to the requested program (and not the other ones). tsparse did that check by looking at the streams of the program... ... but that program doesn't exist for the first packets of the initial PMT. The fix is to use the base class program information (if it parsed the PAT it already has some information, like the PMT PID for a given program) if the program hasn't started yet.
2016-02-19tsparse: Use GstFlowCombinerEdward Hervey2-3/+28
In addition to the fact that it's a sane thing to do for multi-source pad elements, it also avoids the situation where just using a request pad (and not the main static pad) would result in the processing stopping.
2016-02-17mpegtsbase: Refactor code to check for subclass seek handlingVineeth TM1-10/+12
If subclass is not able to handle seek event, then there is no need to stop streaming and send flush events. We should simply return FALSE https://bugzilla.gnome.org/show_bug.cgi?id=758516
2016-02-17mpegtsbase: Add condition to check for non working negative rateVineeth TM1-0/+5
tsdemux is not able to handle negative playback rates. But in mpegtsbase, the same check is not being done. added a check to not handle negative rate while seeking unless the same is handled upstream. https://bugzilla.gnome.org/show_bug.cgi?id=758516
2015-12-02tsdemux: Expose DVB Subpicture as subpicturesEdward Hervey1-2/+2
For some reason we were considering them as private data.
2015-12-02tsdemux: Push GAP events *after* deactivating old programsEdward Hervey1-8/+18
The order in which program switch must happen is: 1) drain all data on old pads (but don't push EOS) 2) add new pads (but don't push any data on them) 3) Push EOS and remove old pads 4) Start pushing data on new pads There was one caveat in this implementation, which is that when we activate a sparse pad (step 2) we would push a GAP event. The problem is that, while being an event, it is actually *data*. We therefore need to make sure pushing those GAP event is done at the step we start pushing data. https://bugzilla.gnome.org/show_bug.cgi?id=750402