Commit graph

56 commits

Author SHA1 Message Date
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
Sebastian Dröge
afd50a79f4 tag: Update for taglist/tag event API changes 2012-07-28 00:32:58 +02:00
Wim Taymans
b98ec32380 update for tag event change 2012-06-06 13:02:40 +02:00
Sebastian Dröge
7c6093357b videoparsers: Fix GstBaseParse::get_sink_caps() implementations
They should take the filter caps into account and always return
the template caps appended to the actual caps. Otherwise the
parsers stop to accept unparsed streams where upstream does not
know about width, height, etc.

Fixes bug #677401.
2012-06-05 09:30:00 +02:00
Mark Nauwelaerts
c5664dcda7 mpegvideoparse: avoid scanning for start codes twice
... since a previous terminating start code serves as subsequent start code.
2012-05-22 21:34:10 +02:00
Mark Nauwelaerts
09209045b6 videoparsers: avoid repeated caps setting 2012-05-22 14:49:18 +02:00
Mark Nauwelaerts
28f3858b94 mpegvideoparse: tweak codec parser API and adjust parser element
... to allow for more efficient parsing and (more) consistent parsing API
among various codec parsers.

Fixes #672701.

Conflicts:

	gst/videoparsers/gstmpegvideoparse.c
2012-05-22 14:09:47 +02:00
Mark Nauwelaerts
1f0c18daf2 mpegvideoparse: unobfuscate frame parsing
... and add comments and debug statements.

Fixes #674202.

Conflicts:

	gst/videoparsers/gstmpegvideoparse.c
2012-05-21 20:31:27 +02:00
Mark Nauwelaerts
35a58df012 mpegvideoparse: Revert "fix crash"
This reverts commit 91210831ee672343a296f31357144359d5c2e768.

Such explicit reset should not be needed as it is arranged for by
the baseclass in unison with monitoring for a new frame by subclass.

As such it might wrongfully hide something else going on ...

See #674073.
2012-05-21 20:25:01 +02:00
Matej Knopp
19f7bd470d mpegvideoparse: Parser fails to split some frames 2012-04-16 08:42:02 +02:00
Matej Knopp
23e312872e mpegvideoparse: Fix FPS and frame duration for telecine files 2012-04-16 08:42:02 +02:00
Matej Knopp
19ee94a8d1 mpegvideoparse: Do not update codec-data when only quantiser matrix changes 2012-04-16 08:42:02 +02:00
Matej Knopp
d487c9cd78 fix crash
last_sc is not reset every time a frame is being output, which can cause
last_sc > buf_size in subsequent frame.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674073
2012-04-14 10:43:21 +02:00
Sebastian Dröge
860ccd414d Merge remote-tracking branch 'origin/0.10'
Conflicts:
	NEWS
	RELEASE
	common
	configure.ac
	docs/libs/gst-plugins-bad-libs-sections.txt
	docs/plugins/gst-plugins-bad-plugins.args
	docs/plugins/gst-plugins-bad-plugins.hierarchy
	docs/plugins/gst-plugins-bad-plugins.interfaces
	docs/plugins/inspect/plugin-adpcmdec.xml
	docs/plugins/inspect/plugin-adpcmenc.xml
	docs/plugins/inspect/plugin-assrender.xml
	docs/plugins/inspect/plugin-audiovisualizers.xml
	docs/plugins/inspect/plugin-autoconvert.xml
	docs/plugins/inspect/plugin-bayer.xml
	docs/plugins/inspect/plugin-bz2.xml
	docs/plugins/inspect/plugin-camerabin2.xml
	docs/plugins/inspect/plugin-celt.xml
	docs/plugins/inspect/plugin-dataurisrc.xml
	docs/plugins/inspect/plugin-debugutilsbad.xml
	docs/plugins/inspect/plugin-dtmf.xml
	docs/plugins/inspect/plugin-dtsdec.xml
	docs/plugins/inspect/plugin-dvbsuboverlay.xml
	docs/plugins/inspect/plugin-dvdspu.xml
	docs/plugins/inspect/plugin-faac.xml
	docs/plugins/inspect/plugin-faad.xml
	docs/plugins/inspect/plugin-gsm.xml
	docs/plugins/inspect/plugin-h264parse.xml
	docs/plugins/inspect/plugin-mms.xml
	docs/plugins/inspect/plugin-modplug.xml
	docs/plugins/inspect/plugin-mpeg2enc.xml
	docs/plugins/inspect/plugin-mpegdemux2.xml
	docs/plugins/inspect/plugin-mpegtsdemux.xml
	docs/plugins/inspect/plugin-mpegvideoparse.xml
	docs/plugins/inspect/plugin-mplex.xml
	docs/plugins/inspect/plugin-pcapparse.xml
	docs/plugins/inspect/plugin-rawparse.xml
	docs/plugins/inspect/plugin-rtpmux.xml
	docs/plugins/inspect/plugin-rtpvp8.xml
	docs/plugins/inspect/plugin-scaletempo.xml
	docs/plugins/inspect/plugin-schro.xml
	docs/plugins/inspect/plugin-sdp.xml
	docs/plugins/inspect/plugin-segmentclip.xml
	docs/plugins/inspect/plugin-shm.xml
	docs/plugins/inspect/plugin-videomaxrate.xml
	docs/plugins/inspect/plugin-videoparsersbad.xml
	docs/plugins/inspect/plugin-vp8.xml
	docs/plugins/inspect/plugin-y4mdec.xml
	ext/celt/gstceltdec.c
	ext/dts/gstdtsdec.c
	ext/modplug/gstmodplug.cc
	ext/opus/gstopusenc.c
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideodecoder.h
	gst-libs/gst/video/gstbasevideoencoder.c
	gst-libs/gst/video/gstbasevideoencoder.h
	gst/adpcmdec/Makefile.am
	gst/audiovisualizers/gstbaseaudiovisualizer.c
	gst/h264parse/gsth264parse.c
	gst/mpegdemux/mpegtsparse.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/mpegtsdemux/mpegtspacketizer.c
	gst/mpegtsdemux/mpegtsparse.c
	gst/mpegtsdemux/tsdemux.c
	gst/mpegtsdemux/tsdemux.h
	gst/mxf/mxfdemux.c
	gst/rawparse/gstaudioparse.c
	gst/videoparsers/gsth263parse.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	sys/decklink/gstdecklinksink.cpp
	sys/dvb/gstdvbsrc.c
	sys/shm/gstshmsrc.c
	sys/vdpau/h264/gstvdph264dec.c
	sys/vdpau/mpeg/gstvdpmpegdec.c
	tests/examples/opencv/gst_element_print_properties.c
	win32/common/config.h
2012-03-29 17:41:53 +02:00
Edward Hervey
a274bc5b76 mpegvideoparse: Fix level code
Valid ranges            are from 4 to 10
Valid ranges >> 1       are from 2 to 5
Valid ranges >> 1 - 2   are from 0 to 3

 (and not from 1 to 4)
2012-03-02 11:07:47 +01:00
Mark Nauwelaerts
b8a78c6b37 videoparsers: adjust to standardized baseparse frame state tracking 2012-02-15 17:15:07 +01:00
Mark Nauwelaerts
b10b9cf109 videoparsers: adjust to modified baseparse API 2012-02-13 18:44:01 +01:00
Wim Taymans
1119f6ee41 Merge branch 'master' into 0.11
Conflicts:
	ext/chromaprint/gstchromaprint.c
	ext/mpeg2enc/Makefile.am
	ext/voaacenc/gstvoaacenc.c
	gst/dvbsuboverlay/gstdvbsuboverlay.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/sdp/gstsdpdemux.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	tests/examples/camerabin/gst-camera-perf.c
	tests/examples/camerabin/gst-camerabin-test.c
	tests/examples/camerabin2/gst-camerabin2-test.c
	tests/examples/mxf/mxfdemux-structure.c
	tests/examples/scaletempo/demo-main.c
2012-02-10 16:46:50 +01:00
Rob Clark
521e8b199b videoparsers: set interlaced field in caps for mpeg2
https://bugzilla.gnome.org/show_bug.cgi?id=667218
2012-01-31 11:51:37 +00:00
Mark Nauwelaerts
9dc7571c75 port some more to new memory API 2012-01-25 16:22:09 +01:00
Sebastian Dröge
a01a4ea2d3 Merge branch 'master' into 0.11
Conflicts:
	gst/mpegtsdemux/tsdemux.c
	gst/videoparsers/gsth264parse.c
	tests/check/elements/camerabin2.c
2012-01-10 15:50:37 +01:00
Vincent Penquerc'h
e81ecb250a mpegvideoparse: add a couple consts on string literal arrays 2012-01-09 10:58:56 +00:00
Vincent Penquerc'h
7521b597f4 various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:08:27 +00:00
Edward Hervey
b78b980d72 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/faac/gstfaac.c
	ext/opus/gstopusdec.c
	ext/opus/gstopusenc.c
	gst/audiovisualizers/gstspacescope.c
	gst/colorspace/colorspace.c
2011-11-25 12:48:58 +01:00
René Stadler
e6df0b672f videoparsers: port to 0.11
Unit tests missing for now.
2011-11-24 12:08:55 +01:00
Sebastian Dröge
dc2c61faf5 mpegvideoparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream 2011-11-24 10:14:06 +01:00
Matej Knopp
a08b3bfa23 mpegvideoparse: add support for progressive frames
https://bugzilla.gnome.org/show_bug.cgi?id=663782
2011-11-10 19:58:13 -03:00
Thibault Saunier
df551c0af4 mpegvideoparse: Handle properly frame detection
Handle the case where we have buffers containing no startcode
in the middle of a frame properly.
2011-09-14 12:13:19 -03:00
Mark Nauwelaerts
a31d541f07 mpegvideoparse: send a video-codec tag
https://bugzilla.gnome.org/show_bug.cgi?id=569305
2011-09-14 16:14:54 +02:00
Alessandro Decina
6e9873038b mpegvideoparse: fix compiler warnings 2011-09-12 10:23:36 +02:00
Vincent Penquerc'h
1a6dbe1e27 mpegvideoparse: make this build with older glib
g_list_free_full is a new convenience function.
Replace it with g_list_foreach and g_list_free.

https://bugzilla.gnome.org/show_bug.cgi?id=658450
2011-09-07 14:34:33 +02:00