Commit graph

5438 commits

Author SHA1 Message Date
Sebastian Dröge
f2b14c68d5 midi: Fix handling of the SEGMENT query 2013-07-29 12:17:57 +02:00
Sebastian Dröge
6812f96de4 gst: Don't swap start/stop for negative rates in the SEGMENT query 2013-07-29 12:14:08 +02:00
Sebastian Dröge
38e832cdef mpegdemux: Implement SEGMENT query 2013-07-29 11:02:55 +02:00
Sebastian Dröge
12981a5d82 tsdemux: Implement SEGMENT query 2013-07-29 11:02:55 +02:00
Sebastian Dröge
6b78fa336d mxfdemux: Implement SEGMENT query 2013-07-29 11:02:54 +02: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
Edward Hervey
3ee8aa2c2d h264parse: Show NALU string type in debug messages
If you know the NALU type by heart I tip my hat to you, for the rest of
us mere mortals this is a bit more helpful
2013-07-29 09:42:12 +02:00
Edward Hervey
a45aa8fe48 tsdemux: Remove unused macros 2013-07-29 09:42:12 +02:00
Edward Hervey
edd69b2989 tsdemux: Add more AC3 detection cases
ATSC ac3 streams are always guaranteed to be AC3 if EAC3 descriptor
is not present
If stream registration id is 'AC-3' then it's also guaranteed to be AC3.
Finally if AC3 descriptor is present it's guaranteed to be AC3.

Only silences a warning, but still.
2013-07-29 09:42:11 +02:00
Edward Hervey
a76c658e8d tsdemux: Flush out pending data on EOS
Ensures downstream elements (like decoders) really get all the data
2013-07-29 09:42:11 +02:00
Edward Hervey
ca77865bce mpegtspacketizer: More AFC flags
I should have put those in a previous commit. sorry :(
2013-07-29 09:42:11 +02:00
Edward Hervey
cea403eaa5 mpegdefs: Simplify PCR/PTS/DTS => GST conversion macros
We know we will not overflow 64 bits, therefore just use direct
multiplication/division instead of the scale method (trims usage from
50 instruction calls to 2/3).
2013-07-29 09:42:11 +02:00
Matej Knopp
f42176b877 dvdspu: artifacts when rendering clipped spu
https://bugzilla.gnome.org/show_bug.cgi?id=705039
2013-07-29 08:43:25 +02:00
Matej Knopp
bcff370c43 mpegvideoparse: do not update caps when bitrate changes
https://bugzilla.gnome.org/show_bug.cgi?id=705035
2013-07-29 08:41:50 +02:00
Edward Hervey
e6ebd9024e tsdemux: HDV only has mpeg 1 audio layer 2
Set that accordingly on the caps
2013-07-27 12:18:36 +02:00
Edward Hervey
2c4f994db4 asfmux: Various debug argument fixes
mainly G_GUINT16_FORMAT to ... the right type (guint32 or guint8)
2013-07-27 06:39:16 +02:00
Edward Hervey
8c60e42070 mpegtsdemux: Add more flag debugging for PES and TS packets
Helps with debugging issues. And also remove unused variable (opcr)

This will also allow us in the future to properly detect:
* random-access location (to enable keyframe observation and
  potentially seeking
* discont location (to properly handle resets)
* splice location (to properly handle new stream changes)
2013-07-26 08:17:17 +02:00
Edward Hervey
dbe350d380 pesparse: Demote a Warning
We actually now know what to do ... have a log message :)
2013-07-26 06:46:41 +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
Edward Hervey
1f7fa9be1d tsdemux: Remember requested seek rate and use it
The new seek handling re-creates the segment time information once it
has enough information after a seek.

The problem was that we'd completely ignore the requested rate. So store
that and use it in the newly created segment.

https://bugzilla.gnome.org/show_bug.cgi?id=694369
2013-07-24 15:51:46 +02:00
Edward Hervey
06717150bf mpegvideoparse: Fix codec_data handling
Set to sequence_offset so that _process_config accepts it.

(btw: seq_offset usage throughout this plugin is really dodgy)

https://bugzilla.gnome.org/show_bug.cgi?id=702806
2013-07-23 18:16:32 +02:00
Edward Hervey
069a497d19 tsdemux: Create and send codec tag
Helps with applications that rely on presence of that tag for user-facing
information.

https://bugzilla.gnome.org/show_bug.cgi?id=702216
2013-07-23 15:11:51 +02:00
Sebastian Dröge
46e85b4a6c mxfdemux: Add support for group-id in the stream-start event 2013-07-23 10:33:31 +02:00
Sebastian Dröge
44e404fe41 tsdemux: Add support for group-id in the stream-start event 2013-07-23 10:33:31 +02:00
Sebastian Dröge
2a1877909f tsparse: Add support for group-id in the stream-start event 2013-07-23 10:33:31 +02:00
Sebastian Dröge
4ec7baa61a mpegdemux: Add support for group-id in the stream-start event 2013-07-23 10:33:31 +02:00
Sebastian Dröge
a68733ea91 midiparse: Add support for group-id in the stream-start event 2013-07-23 10:33:31 +02:00
Tim-Philipp Müller
580a94d18b interlace: fix negotiation if filter caps are passed to query_caps
Make videotestsrc ! interlace ! $anything work again. Problem
was that upstream filter caps were passed which contained
interlace-mode=progressive, which doesn't intersect too well
with interlace's source pad template caps, leading to
not-negotiated errors.
2013-07-22 17:32:50 +01:00
Olivier Crête
6a1896d805 h264parse: Don't abort on invalid streams
Just return an error
2013-07-22 16:27:16 +02:00
Edward Hervey
1db3d40a4b mpegvideoparse: Only map input buffer once
Instead of constantly map/unmapping it a bit everywhere, we pass along
to all functions the GstMapInfo.

Makes mpeg video frame parsing 6% faster

https://bugzilla.gnome.org/show_bug.cgi?id=702330
2013-07-22 10:46:23 +02:00
Douglas Bagnall
dfb101e0ed tsdemux: disentangle requested program number from active program number
The program_number attribute was overloaded, trying to indicate both
the currently playing program, and the program requested via the
"program-number" property.  The end result was that setting the
property didn't work (see #690934).

I added a new requested_program_number field rather than reviving the
current_program_number field because it seemed this would result in
fewer changes overall and be less confusing.  It breaks symmetry with
the "program-number" property, but it retains parallels with the likes
of program->program_number.

Because gst_ts_demux_reset is called after the properties have been
parsed, requested_program_number is initialised in gst_ts_demux_init.
Whether this is exactly the right place, I don't know.
2013-07-22 09:53:46 +02:00
Jesper Larsen
8e4f966018 tsdemux: fix program-number functionality
Setting the program-number property does not affect which program
is actually being demuxed.

Moving the initialization of the program_number from
gst_ts_demux_reset to gst_ts_demux_init seems to fix this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=690934
2013-07-22 09:53:46 +02:00
Arnaud Vrac
506abb06e2 mpegdemux: do not push discont buffers if they aren't discont
Explicitly unset discont flag when it shouldn't be set.

https://bugzilla.gnome.org/show_bug.cgi?id=682110
2013-07-17 18:36:30 +01:00
Tim-Philipp Müller
ff495342f2 h263parse: fix height extraction for H263p 2013-07-15 23:04:35 +01:00
Tim-Philipp Müller
79249be0aa h263parse: add pixel-aspect-ratio if upstream doesn't provide one 2013-07-15 23:04:35 +01:00
Edward Hervey
1b1b3a40d7 mpegtsdemux: Remember seek sequence number
* Avoids handling twice the same seek (can happen with playbin and files
  with subtitles)
* Set the sequence number of the segment event to the sequence number of
  the seek event that generated it (-1 for the initial one).
2013-07-15 11:20:40 +02:00
Arnaud Vrac
024aa47f64 tsdemux: implement seeking in push mode 2013-07-15 11:20:40 +02:00
Arnaud Vrac
388c28381f tsdemux: recalculate new segment after byte seek
The seeking start time is approximated from the seek offset in bytes
using the accumulated PCR observations, so on a VBR stream there might
be a big difference between the actual PCR and the estimated one after
the seek. This might result in a long wait to skip all out of segments
packets.

Instead we just recalculate the new segment to start at the first PTS
after the seek, so that playback starts immediatly.
2013-07-15 10:51:28 +02:00
Sreerenj Balachandran
654744a03c mpegvideoparse: Use sequence_display_extension values to update the src caps
The caps should always represent what the user is supposed to see.
So if there is a sequence_display_extension associated with the
stream then use the display_horizontal_size/display_vertical_size
to update the src caps (if they are less than the values provided
by sequence header).

https://bugzilla.gnome.org/show_bug.cgi?id=704009
2013-07-12 10:06:05 +02:00
Sebastian Dröge
1e7b3a8c9e Release 1.1.2
Oops... should've been part of 1.1.2 tag already :(
2013-07-12 09:46:11 +02:00
Sebastian Dröge
f83e9405de mpegpsmux: Send stream-start event before any data 2013-07-10 12:28:38 +02:00
Edward Hervey
8ca1751f00 mpegtsdemux: Avoid parsing section without enough data
This is actually a workaround (we'll be skipping the upcoming section)

This will only happen for sections where the beginning is located within
the last 8 bytes of a packet (which is the minimum we need to properly
identify any section beginning).

Later we should figure out a way to store those bytes and mark that
some analysis needs to happen. The probability of this happening is
too low for me to care right now and do that fix. There is a good chance
that section will eventually be repeated and won't end up on such border.
2013-07-09 12:25:11 +02:00
Edward Hervey
2fb7b87140 mpegtsdemux: Avoid vmethod calls
Depending on usage, tsparse and tsdemux might not need to be called
when new section/pes-data is available.
2013-07-09 12:25:11 +02:00
Edward Hervey
61b30175b3 mpegtsdemux: Remove unneeded variables
* packet.origts is no longer used since the PCR refactoring done ages ago
* known_packet_size is a duplicate of packet_size != 0
* caps was never used outside of the packetizer
2013-07-09 12:25:11 +02:00
Gwenole Beauchesne
18984f98dd h264parser: fix size caps to report cropped dimensions.
Restore the original h264parser behaviour to report cropped dimensions
in size caps.

https://bugzilla.gnome.org/show_bug.cgi?id=694068

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-07-09 12:15:07 +02:00
Edward Hervey
f58f13e874 mpegtsdemux: Fix multiple-SI detection/parsing
We had two issues with the previous code:
1) We were badly handling PUSI-flagged packets. We were discarding the
   initial data (if pointer != 0) whereas we should have been accumulating
   it with the previous data (if there was a continuity of course).
   => First series of information loss
2) We were not checking whether there were more sections after the end
   of one (i.e. when the following byte was not a stuff byte).

This fixes those two issues.

Fixes #677443

https://bugzilla.gnome.org/show_bug.cgi?id=677443
2013-07-07 08:29:37 +02:00
Edward Hervey
513417e0ff mpegtbase: Fix switch/case typo
Ended up trying to analyze PMT ... with a PAT :(
2013-07-07 07:21:46 +02:00
Edward Hervey
1c96c79b88 mpegtsdemux: Handle private section streams
Until now we simply ignored those streams (since we couldn't do anything
with it anyway). Now that we have the mpegts library and we offload the
section handling to the application side we can properly identify and
extract them.

By default it is disabled for tsparse and enabled for tsdemux, but there is
a property to change that.

This should open the way to properly handle all private section streams,
including:
* DSM-CC
* MHEG
* Carousel data
* Metadata streams (though I haven't seen any of those in the wild)
* ... And all other specs/protocols making use of those

Partially fixes #560631
2013-07-06 14:50:52 +02:00
Edward Hervey
a3b6b1a951 mpegtsdemux: Handle registration descriptor for programs and streams
* Allows us to simplify some code and prepare for future cleanups.
* Remove useless casts
* Add some FIXME regarding VC1
2013-07-06 10:59:54 +02:00
Brendan Long
f53e66f4c6 webvttenc: Separate cues with two line breaks instead of one.
See http://dev.w3.org/html5/webvtt/#syntax

https://bugzilla.gnome.org/show_bug.cgi?id=703673
2013-07-05 18:32:43 +01:00