Commit graph

242 commits

Author SHA1 Message Date
Matthieu Bouron
43dcebe2a0 h264parse: do not set CAPS and passthrough mode if SPS/PPS have not been parsed
https://bugzilla.gnome.org/show_bug.cgi?id=705452
2013-08-27 15:00:35 +02:00
Sebastian Dröge
32a65dc5f3 mpegvideoparse: Fix switch statement in level detection code
Properly fall through the cases without re-assigning the level to
the wrong value.

https://bugzilla.gnome.org/show_bug.cgi?id=706369
2013-08-20 13:30:15 +02:00
Olivier Crête
27bceba4ad mpeg4videoparse: Reparse the config if the size changed
Also only re-issue the caps update if the part of the config that
changed is one we care about.
2013-08-16 15:46:18 -04:00
Matej Knopp
e5ebd7d846 mpegvideoparse: support field encoding for interlaced video
https://bugzilla.gnome.org/show_bug.cgi?id=705144
2013-08-13 14:00:57 +02:00
Sreerenj Balachandran
b4c52425f2 vc1parse: Fix the SequenceLayer handling for advanced profile.
The Sequence Header Data Structure STRUCT_C for Advanced Profile
has only a one valid field which is the profile indicator. Don't
use the reserved fields for fps update like Simple/Main profile.

https://bugzilla.gnome.org/show_bug.cgi?id=705667
2013-08-12 16:12:52 +01:00
Sreerenj Balachandran
ea213f826c vc1parse: Fix seq hdr STRUCT_A handling for advanced profile.
The Sequence Header Data Structure STRUCT_A for advanced profile
may be eight consecutive zero bytes.Don't try to override the
width and height values in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=705667
2013-08-12 16:12:52 +01:00
Edward Hervey
8074a48594 h264parse: Use slice type to determine if frame is keyframe
This is the same behaviour as pre-baseparse-refactoring

https://bugzilla.gnome.org/show_bug.cgi?id=705598
2013-08-09 08:42:43 +02:00
Edward Hervey
b17676a1d5 h264parse: Do not trigger caps update if we only have PPS updates
Updating caps results in downstream elements potentially reconfiguring themselves
(such as decoders). If we do this in the middle of keyframes, we would result
in those elements being reconfigured and handling garbage until the next keyframe.

Instead of this only send (potentially) new codec_data when we have *both* SPS and
PPS.

https://bugzilla.gnome.org/show_bug.cgi?id=705333
2013-08-04 12:08:57 +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
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
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
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
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
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
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
Gwenole Beauchesne
d10acd3879 mpegvideoparse: cope with new parser API.
Migrate the code to use the new parser API based on GstMpegVideoPacket.

Also try to optimize gst_mpegv_parse_process_config() by using more of
GstMpegVideoPacket and determining the extension_start_code_identifier
prior to calling the parser function for that extension packet.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-07-05 17:39:28 +02:00
Sebastian Dröge
d50625eeb0 mpegvideoparse: Make sure the buffer is writable before we add the MPEG video meta
https://bugzilla.gnome.org/show_bug.cgi?id=702174
2013-06-14 14:53:52 +02:00
Ilya Smelykh
ef0e051e7d h264parse: Wait until SPS/PPS before outputting any data
https://bugzilla.gnome.org/show_bug.cgi?id=646327
2013-06-07 12:10:08 +02:00
Matej Knopp
946ffd0da5 mpegvideoparse: don't compare buffer size when checking whether to update caps
https://bugzilla.gnome.org/show_bug.cgi?id=699398
2013-05-03 12:52:18 +02:00
Tim-Philipp Müller
f1a6d84a6c mpegvideoparse: don't announce incomplete source caps
Don't send any source caps yet if we're still in
drop-buffers-until-we-get-a-sequence-header mode.

Fixes transmuxing of many MPEG-TS/PS streams into
formats which require things like width, height or
codec_data on the input caps.

Also fixes issues when using playbin with decoder
sinks that want width/height etc.

https://bugzilla.gnome.org/show_bug.cgi?id=695879
2013-05-01 17:42:11 +01:00
Josep Torra
b946de7211 h264parse: Update src pad caps when it was explicitly signaled
Fixes src pad caps aren't updated when converting from AVC to bytestream
and new caps had been received in the sink pad.

https://bugzilla.gnome.org/show_bug.cgi?id=698679
2013-04-26 10:38:36 +02:00
Youness Alaoui
ece3d1c2f6 h264parse: Do not check for VUI parameters if they were not present in the SPS 2013-04-16 19:58:06 -04:00
Sebastian Dröge
e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
Edward Hervey
2296296a51 mpegvideoparse: Only add meta if downstream needs it
It's not perfect, because in the cases where upstream doesn't
initiate an allocation query, we won't know.
2013-03-31 19:04:12 +02:00
Edward Hervey
14e7e78b7a mpegvideoparse: Store information in GstMpegVideo12Meta
FIXME : Only do so if we know downstream will need it
2013-03-31 18:55:33 +02:00
Josep Torra
030cf658e6 mpeg4videoparser: Fix a compiler warning about uninitialised variable use 2013-03-30 09:52:45 +01:00
Sebastian Dröge
ac6967a843 mpeg4videoparse: Use correct type specifiers for format strings to fix compiler warnings 2013-03-03 12:30:21 +01:00
Tim-Philipp Müller
829076358e Revert "mpeg4videoparse: set 0 duration when vop_coded is 0"
This reverts commit d3219a261a.

vop_coded 0 means that the previous frame should be repeated,
so it should have valid duration after all.

https://bugzilla.gnome.org/show_bug.cgi?id=683169
2013-02-14 09:40:08 +00:00
Olivier Crête
f25b0eda09 pngparse: Declare the width/height outside the loop
Also initialize them to make gcc happy
2013-02-12 18:11:34 -05:00
Olivier Crête
41afff88e0 videoparsers: Add png file parser
https://bugzilla.gnome.org/show_bug.cgi?id=690639
2013-02-12 17:04:38 -05:00
David Schleef
168c8406b5 Unrevert: mpegvideoparse: set timestamp based on pic offset
API is now in baseparse in gstreamer.

Timestamps in MPEG-TS streams are based on the last timestamp
before the start code of the picture.  GstBaseParse sets the
timestamp based on the beginning of the sequence header, if
one exists before the picture.  This fixes the case where the
timestamp occurs in the MPEG-TS stream between the seq header
and picture start code.
2013-02-12 12:23:03 -08:00
Tim-Philipp Müller
aedc136926 Revert "mpegvideoparse: set timestamp based on pic offset"
This reverts commit 63718da919.

The required baseparse API addition has not been pushed yet,
which breaks the build.
2013-02-12 09:38:35 +00:00
David Schleef
63718da919 mpegvideoparse: set timestamp based on pic offset
Timestamps in MPEG-TS streams are based on the last timestamp
before the start code of the picture.  GstBaseParse sets the
timestamp based on the beginning of the sequence header, if
one exists before the picture.  This fixes the case where the
timestamp occurs in the MPEG-TS stream between the seq header
and picture start code.
2013-02-11 17:41:17 -08:00
Mark Nauwelaerts
7df753165f h264parse: separate fields for distinct functional uses of codec_data field
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692789
2013-02-02 19:29:40 +01:00
Thijs Vermeir
471ad809f6 videoparsers: use appropriate printf format for gsize 2012-12-18 16:52:26 +01:00
Sebastian Dröge
f623a78924 videoparsers: Make sure the caps are actually writable before changing them 2012-12-17 15:16:48 +01:00
Sebastian Dröge
9f1257330d videoparsers: Use the peer caps for restrictions instead of the srcpad allowed caps
Otherwise we will intersect with the srcpad template caps and add all the caps fields
that the parser will ever set, no matter if downstream restricts this field or not.
This requires upstream to set this field on the caps to successfully negotiate.

https://bugzilla.gnome.org/show_bug.cgi?id=690184
2012-12-17 15:04:44 +01:00
Wim Taymans
0e0dd05fd6 h264parse: use upstream width/height when given
The upstream width and height should override the dimension detected in the
file.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=683142
2012-12-13 14:15:04 +01:00
Arnaud Vrac
0d15c8a7a5 mpeg4videoparse: export number of sprite warping points in caps
This allows filtering out videos for hardware decoders that do not
support GMC at all or only support a limited number of sprite warping
points (usually 1).
2012-12-13 11:01:00 +00:00
Arnaud Vrac
07c2a82e5d mpeg4videoparse: handle divx caps
DivX 4/5 are MPEG4 part 2 videos, so they can be parsed by this plugin.
2012-12-13 11:01:00 +00:00
Thibault Saunier
d53a447731 mpeg4videoparse: Fix nitpick 2012-11-15 11:40:05 -03:00
Thibault Saunier
daed78039e mpeg4videoparse: Make sure pad template caps are not fixed from the begging
Right now decodebin will concider the pad template caps as fixed and if a decoder
has restriction on for example height/width it won't be autoplugged because
gst_caps_is_subset fails as those fields are missing from the pad template caps.
We fix the issue here making sure that the pad caps are fixed using data from
the stream.
2012-11-15 10:45:53 -03:00
Thibault Saunier
b3abd51656 h264parse: don't rewind to the NAL length size in bytewriter if the format is bytestream
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=687548

Signed-off-by:  Kevin Thornberry
2012-11-06 12:44:29 -03:00
Thibault Saunier
72933e3929 h264parse: Actually add PPS data to the output buffer 2012-11-06 11:54:39 -03: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
Mark Nauwelaerts
0d1c7f6ea2 videoparsers: use parsed or upstream fps to set some baseparse parameters 2012-10-25 18:02:38 +02:00
Mark Nauwelaerts
58441bf262 h264parse: extract structure from correct caps
... which are known != NULL.
2012-10-25 18:02:38 +02:00