Commit graph

86 commits

Author SHA1 Message Date
Aaron Boxer
6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Aaron Boxer
d5946fc804 mpegvideoparse: use gstvideoparseutils to handle user data 2019-08-26 18:14:17 -04:00
Sebastian Dröge
324e55a3cd mpegvideoparse: Pass through interlace-mode field from upstream if available
We generally always prefer the information from upstream for other
metadata (pixel-aspect-ration, etc.) and should also do so here.

Other parsers (h264parse) already do the same.
2019-06-19 12:49:01 +00:00
Aaron Boxer
adfd8aa696 mpegvideoparse: add debug code for closed captions
This debug code will help determine why certain instances of closed
captions that are present in the Picture User Data are not actually
processed by the pipeline
2019-03-27 13:22:47 -04:00
Tim-Philipp Müller
1b0e150d88 mpegvideoparse: extract CEA-708 closed captions 2018-12-11 13:56:06 +00:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Edward Hervey
5ebf1d477d mpegvideoparser: Handle non-hierarchical profiles again
This is a regression from since mpegvideoparser was switched to
use the codecparsing library.

The problem is that the high bit of the profile_and_level is used
to specify non-hierarchical profiles and levels. Unfortunately we
were discarding that information.

Expose that escape bit, and use it in the element

https://bugzilla.gnome.org/show_bug.cgi?id=763220
2016-03-09 15:18:42 +01:00
Dave Craig
88d7beb921 videoparsers: Check for NULL return value of gst_pad_get_current_caps()
https://bugzilla.gnome.org/show_bug.cgi?id=759503
2015-12-16 10:08:43 +01:00
Olivier Crête
567b1e8c46 videoparsers: Use gst_base_parse_merge_tags()
Instead of squashing all upstream tags

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 17:28:29 +01:00
Thiago Santos
c4cd1ce4fd videoparsers: enable accept-template flag
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Luis de Bethencourt
c944093d08 remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused.
2015-04-24 16:48:26 +01:00
Luis de Bethencourt
68efb43322 videoparser: unused value
Value set in off will be immediately overwritten after going to next.

CID #1226476
2015-03-09 11:13:55 +00:00
Vineeth T M
52ac7cf27a videoparser: comment unused GST_BASE_PARSE_FRAME_FLAG_PARSING
GST_BASE_PARSE_FRAME_FLAG_PARSING value is wrong, and the same flag is
not being used presently. Hence changing the value and commenting it out.
This needs to be included in baseparse.h later on

https://bugzilla.gnome.org/show_bug.cgi?id=737411
2014-10-06 11:48:08 +01:00
Sreerenj Balachandran
4d17166b03 mpegvideoparse: Differentiate the mpeg-2 stream from mpeg-1 based on pic_ext
Presence of picture extension header identifies the stream as mpeg2.
We are supposed to set the mpegversion to 2 if there is a picextension
instead of blindly setting the version to 1

https://bugzilla.gnome.org/show_bug.cgi?id=726028
2014-03-12 08:46:41 +01:00
Sebastian Dröge
6fbc101d19 mpegvideoparse: Use pbutils API to create the VIDEO_CODEC tag string 2013-12-16 10:22:24 +01:00
Wim Taymans
9ac2cee2db videoparsers: use ACCEPT_INTERSECT
We can also accept caps with missing fields.
2013-12-04 09:49:20 +01:00
Wim Taymans
e9dd2df3f4 videoparsers: remove fields from filter
Don't filter out the caps properties we can convert between when
proxying the getcaps query to the downstream peer pad.
2013-12-04 09:49:20 +01:00
Wim Taymans
d5a16bccac videoparsers: refactor remove_fields in getcaps 2013-12-04 09:49:20 +01:00
Mark Nauwelaerts
830a4aa7f4 mpegvideoparse: look beyond start code before leaping
In case more data than a start code alone is needed to decide whether
it ends a frame, arrange for more input data and decide when available.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711627
2013-11-11 16:34:46 +01:00
Mark Nauwelaerts
a3d658915b mpegvideoparse: tweak extension handling 2013-11-11 13:36:02 +01:00
Matej Knopp
4930dc40cd mpegvideoparse: check for same TSN only for interlaced streams (fixes unit test)
https://bugzilla.gnome.org/show_bug.cgi?id=711721
2013-11-09 15:34:51 +01:00
Sebastian Dröge
ed295e83c2 Revert "mpegvparse: Fix last start code position when input buffer is empty"
This reverts commit 7c23a6f23c.

The fix was not complete, see discussion in
https://bugzilla.gnome.org/show_bug.cgi?id=711627
2013-11-09 09:43:56 +01:00
Greg Rutz
7c23a6f23c mpegvparse: Fix last start code position when input buffer is empty
When the input buffer is empty and we need more data to determine
whether or not to terminate the previous frame, the last start code
location needs to be set to 4 bytes before the the current position
(size of start_code is 32-bits)

https://bugzilla.gnome.org/show_bug.cgi?id=711627
2013-11-07 19:10:39 +01: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
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
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
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
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
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
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
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
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
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
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
821c8519e0 videoparsers: preserve upstream fps and par
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=660866
2012-10-25 17:07:18 +02: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
Sreerenj Balachandran
0b5fde7ed8 mpegvideoparse: signal interlacing properly in video caps
The field is called "interlace-mode" mode now and is a string.

https://bugzilla.gnome.org/show_bug.cgi?id=685895
2012-10-10 16:56:38 +01:00
Michael Smith
2a18cf41a8 mpegvideoparse: reset frame parser after parsing codec_data buffer in caps, to
avoid not correctly parsing the full first frame.
2012-10-09 21:19:15 -07: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
Jan Schmidt
b7d63d3fb1 videoparsers: Disable PTS interpolation in the base parse class
All these formats have re-ordered PTS which the base class gets
wrong. It's better to leave them blank and let the decoder sort it
out. Better yet would be to track and interpolate the timestamps
in the subclasses (FIXME)
2012-09-12 23:05:47 -07:00
Jan Schmidt
c5c44628fc mpegvideoparse: Handle Sequence Display Extension
Change the way the pixel-aspect-ratio is computed by
interpreting the sequence header aspect ratio info
as MPEG-1 values until a sequence extension or
sequence display extension is seen, and then updating
the sequence header struct accordingly.

Fixes incorrect anamorphic display on some MPEG-2 (DVD)
sequences.
2012-09-12 23:05:47 -07:00
Wim Taymans
a9f46ed059 mpegvideoparse: only apply repeat count when set
When there is no extension header, the repeat_count variable is left to 0 and
then the duration on the output buffers is calculated wrongly. Because the
duration is used to interpolate output timestamps, the output timestamps are
also wrong, causing bad framerates.

See https://bugzilla.gnome.org/show_bug.cgi?id=681535
2012-08-13 10:58:50 +02:00