Commit graph

27 commits

Author SHA1 Message Date
Tim-Philipp Müller
e6d0435a8e mpeg4videoparse: try harder to make buffer metadata writable before modifying
Also, check buffer for NULL-ness before dereferencing it.

https://bugzilla.gnome.org/show_bug.cgi?id=637824
2010-12-23 22:03:16 +00:00
Tim-Philipp Müller
e29a1073b1 mpeg4videoparse: ensure buffer metadata is writable before modifying it
https://bugzilla.gnome.org/show_bug.cgi?id=637824
2010-12-22 21:46:00 +00:00
Mark Nauwelaerts
26877f66c9 mpeg4videoparse: re-use cleanup() in finalize()
... and also favor finalize() rather than dispose().
2010-12-08 16:30:12 +01:00
Arun Raghavan
5b442d0712 mpeg4videoparse: Set srcpad caps before forwarding newsegment
This holds all newsegement and most other events till there is enough
data to set srcpad caps, so that the downstream link is properly
negotiated before data starts flowing.

https://bugzilla.gnome.org/show_bug.cgi?id=635204
2010-12-08 16:30:12 +01:00
Arun Raghavan
8f30fca636 mpeg4videoparse: Use sinkpad caps as base for srcpad caps
This way, we don't lose additional fields that come from upstream (like
profile/level for now).

https://bugzilla.gnome.org/show_bug.cgi?id=635202
2010-12-08 16:30:12 +01:00
Mark Nauwelaerts
522f470883 mpeg4videoparse: minor fix to error handling
We weren't handling unparseable codec_data in some cases.

https://bugzilla.gnome.org/show_bug.cgi?id=635202
2010-12-08 16:30:12 +01:00
Stefan Kost
0c22e1b954 various (gst): add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed.
2010-10-19 15:47:17 +03:00
Mark Nauwelaerts
a60af008d5 mpeg4videoparse: sprinkle some branch prediction 2010-06-15 11:30:45 +02:00
Mark Nauwelaerts
cd018e5440 mpeg4videoparse: handle FLUSH_STOP event 2010-06-15 11:30:41 +02:00
Mark Nauwelaerts
c2b649d692 mpeg4videoparse: add config-interval parameter to re-insert config in stream
Add a new config-interval property to instruct the parser to insert
config (VOSH, VOS, etc) at periodic intervals in the stream
(when a GOP or VOP-I is encountered).

Based on patch by <marc.leeman at gmail.com>

Fixes #621205.
2010-06-15 11:30:39 +02:00
Mark Nauwelaerts
00148e3736 mpeg4videoparse: also set short configuration data in codec_data
That is, header configuration may start at Video Object (startcode),
rather than at Visual Object Sequence, which is catered for and parsed,
so let's also take it as codec_data if no more available.

Fixes (remainder of) #572551.
2010-04-20 15:39:07 +02:00
Benjamin Otte
775c7584fd gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 22:46:41 +01:00
Rob Clark
79faa0b9fa mpeg4videoparse: fix compile error
gst/mpeg4videoparse/mpeg4videoparse.c:689: warning: comparison is always true due to limited range of data type

https://bugzilla.gnome.org/show_bug.cgi?id=612454
2010-03-11 17:52:01 +01:00
Michael Smith
c2b1bebc02 mpeg4videoparse: parse more forms of codec_data 2010-02-01 16:23:47 -08:00
Julien Moutte
f33344ab0c mpeg4videoparse: don't set an invalid framerate.
When fixed_vop_rate is not set we can not set a framerate based on
vop_time_increment_resolution as it would most likely be wrong.
Don't set any framerate on the caps in that case.
2010-01-15 21:34:02 +01:00
Michael Smith
e2da34e6b6 mpeg4videoparse: avoid crash if vos < 5 bytes. 2010-01-06 11:20:41 -08:00
Mark Nauwelaerts
5658b2912b mpeg4videoparse: fix aspect-ratio parsing in VO 2009-09-07 19:10:18 +02:00
Mark Nauwelaerts
5b1ed7d42c mpeg4videoparse: also consider user_data pieces when parsing VO(S) 2009-09-07 19:10:02 +02:00
Arnout Vandecappelle
9542d9e251 mpeg4videoparse: don't leak the config data
Clear the config data when going to READY or when disposed.
Fixes #581427
2009-05-05 16:54:39 +02:00
Michael Smith
c0ad05cec4 mpeg4videoparse: Use correct values for checking VO startcode.
Fix compiler warning due to condition always being true - since we're
only looking at the final byte of the startcode (not the leading
0x000001), only check for < 0x1f, not < 0x11f
2009-02-27 11:36:58 -08:00
Wim Taymans
41b65b421b mpeg4videoparse: handle more formats
We only need a Video Object Start code before we can start pushing out data.
Search for this code also instead of only looking for VOS and VOP.
Fixes #572551.
2009-02-27 13:08:15 +01:00
Sjoerd Simons
d0d99f937b gst/mpeg4videoparse/mpeg4videoparse.c: Fix mpeg4videoparse on big endian architectures. Fixes bug #536042.
Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* gst/mpeg4videoparse/mpeg4videoparse.c:
(gst_mpeg4vparse_handle_vos):
Fix mpeg4videoparse on big endian architectures. Fixes bug #536042.
2008-06-02 07:37:31 +00:00
Sjoerd Simons
b3bc29bc64 gst/mpeg4videoparse/mpeg4videoparse.c: Move some code around to integrate the startcode searching with the other bits...
Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* gst/mpeg4videoparse/mpeg4videoparse.c: (gst_mpeg4vparse_push),
(gst_mpeg4vparse_drain), (gst_mpeg4vparse_chain),
(gst_mpeg4vparse_change_state):
Move some code around to integrate the startcode searching with the
other bits of parsing, avoid a whole bunch of peeks.
Get rid of invalid data that should not happen according to the specs.
Fixes #533559.
2008-05-22 14:03:05 +00:00
Wim Taymans
affa292951 gst/mpeg4videoparse/mpeg4videoparse.c: Set fixed caps on the srcpad after we created the pad...
Original commit message from CVS:
* gst/mpeg4videoparse/mpeg4videoparse.c: (gst_mpeg4vparse_init):
Set fixed caps on the srcpad after we created the pad...
2008-05-14 20:57:31 +00:00
Sjoerd Simons
7bd28a6a94 gst/mpeg4videoparse/mpeg4videoparse.*: Parse the config data (either outbound or in the stream) to set width/height, ...
Original commit message from CVS:
Patch by: Sjoerd Simons <sjoerd at luon dot net>
* gst/mpeg4videoparse/mpeg4videoparse.c:
(gst_mpeg4vparse_set_new_caps), (gst_mpeg4vparse_align),
(get_bits), (next_start_code), (gst_mpeg4vparse_handle_vos),
(gst_mpeg4vparse_push), (gst_mpeg4vparse_drain),
(gst_mpeg4vparse_chain), (gst_mpeg4vparse_sink_setcaps),
(gst_mpeg4vparse_sink_event), (gst_mpeg4vparse_src_query),
(gst_mpeg4vparse_set_property), (gst_mpeg4vparse_get_property),
(gst_mpeg4vparse_class_init), (gst_mpeg4vparse_init):
* gst/mpeg4videoparse/mpeg4videoparse.h:
Parse the config data (either outbound or in the stream) to set
width/height, apect ration, framerate in the caps if applicable.
Mark frames as GST_BUFFER_FLAG_DELTA_UNIT when they are not
intra frames
Set the timestamps of outgoing buffers to the buffer in
which the VOP header was found.
Drop incoming data untill configuration is found (by default,
configurable using a property).
Report a 1 frame latency. Fixes #532723.
2008-05-13 17:21:07 +00:00
Julien Moutte
adbe2a1b69 gst/mpeg4videoparse/mpeg4videoparse.*: Improved version not damaging headers using a simple state machine.
Original commit message from CVS:
2007-10-27  Julien MOUTTE  <julien@moutte.net>

* gst/mpeg4videoparse/mpeg4videoparse.c:
(gst_mpeg4vparse_align),
(gst_mpeg4vparse_drain), (gst_mpeg4vparse_chain),
(gst_mpeg4vparse_sink_setcaps), (gst_mpeg4vparse_sink_event),
(gst_mpeg4vparse_cleanup), (gst_mpeg4vparse_change_state),
(gst_mpeg4vparse_dispose), (gst_mpeg4vparse_base_init),
(gst_mpeg4vparse_class_init), (gst_mpeg4vparse_init),
(plugin_init):
* gst/mpeg4videoparse/mpeg4videoparse.h: Improved version not
damaging headers using a simple state machine.
2007-10-27 08:20:59 +00:00
Julien Moutte
843665f109 Add a simple MPEG4 ES parser.
Original commit message from CVS:
2007-10-26  Julien MOUTTE  <julien@moutte.net>

* configure.ac:
* gst/mpeg4videoparse/Makefile.am:
* gst/mpeg4videoparse/mpeg4videoparse.c:
(gst_mpeg4vparse_drain),
(gst_mpeg4vparse_chain), (gst_mpeg4vparse_sink_setcaps),
(gst_mpeg4vparse_sink_event), (gst_mpeg4vparse_cleanup),
(gst_mpeg4vparse_change_state), (gst_mpeg4vparse_dispose),
(gst_mpeg4vparse_base_init), (gst_mpeg4vparse_class_init),
(gst_mpeg4vparse_init), (plugin_init):
* gst/mpeg4videoparse/mpeg4videoparse.h: Add a simple MPEG4 ES
parser.
2007-10-26 16:08:04 +00:00