Commit graph

119 commits

Author SHA1 Message Date
Mark Nauwelaerts
0882adc69f h264parse: do not use _unchecked bytewriter variants to insert config
.. since the bytewriter is explicitly created with non-fixed size to
allow (very much so expected) growth.

Partially reverts commit 20669d461a while
trying to keep (some?) compilers happy.

IIRC, the purpose of GstByteWriter in the first place was (at least)
being able to dump data without having to fuss with memory expansion
and size issues ...

Fixes #673485.
2012-04-06 14:35:56 +02:00
Thibault Saunier
20669d461a Fix 'ignoring return value of function declared with const attribute'
This always happens with GstByteReader/Writer and friends when
not taking into account returned boolean of the _read/_write functions
(which is actually wrong).

Make use of the *_unchecked variant as much as possible, or take the
returned value into account.
2012-03-10 19:22:07 -03: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
4c9ac0886a h264parse: consider nal_length_size when constructing codec_data
Fixes #670699.
2012-02-23 21:18:31 +01:00
Mark Nauwelaerts
5cce89b048 h264parse: use proper NALU offset for config data insertion
... which has to be the position of the start code, which is almost always
but need not be 4 bytes.
2012-02-15 14:29:45 +01:00
Mark Nauwelaerts
1cbd755a2c h264parse: unobfuscate frame parsing code 2012-02-10 14:52:03 +01:00
Mark Nauwelaerts
c36bb8b73d h264parse: decrease passthrough negotiation preference
Also ensure parsing fixed caps when negotiating rather than failing to
handle non-fixed list cases.

See #668471.
2012-02-03 11:27:32 +01:00
Mark Nauwelaerts
da89903f81 h264parse: disable optimized packetized processing for reverse playback
... as baseparse then provides whole chunks of data (as it should) at once
to be parsed, and so the assumptions used to optimize are no longer valid.

Fixes #667560.
2012-02-01 13:53:17 +01:00
Mark Nauwelaerts
283f97cb79 h264parse: also mind SEI position for config data insertion
Fixes #668627.
2012-02-01 13:53:15 +01:00
Mark Nauwelaerts
136f42974d h264parse: unbreak optimized packetized NALU collection processing
... in that it was so optimized it did not consider grouping NALU into AU
altogether.

Fixes #668627.
2012-02-01 13:53:13 +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
Reynaldo H. Verdejo Pinochet
26a1ca09aa Android, Fix wrong dinamic linking attempt
gstcodecparsers is built as an static library.

This change fixes building with the Android buildsystem.
2012-01-13 15:57:33 -03:00
Vincent Penquerc'h
2dc41db862 h264parse: use the framerate that was copied a few lines above 2012-01-09 11:03:24 +00: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
4f27b2b4fe h264parse: fix test and set not using the same input
This fixes H.264 output not having a set framerate, and
confusing some of the elements downstream (such as interlace).
2012-01-06 10:54:11 +00:00
Mark Nauwelaerts
c4abaf1428 h264parse: fix and tweak frame timestamping
... to run with properly init'ed variables, and to only perform interpolation
in safe cases.
2012-01-04 11:16:18 +01:00
Mark Nauwelaerts
9d0c7d054e h264parse: prefer negotiating pass-through 2012-01-03 22:10:20 +01:00
Mark Nauwelaerts
dcd2ee421a h264parse: mark byte-stream AU frame with inserted codec NALs as keyframe 2012-01-03 22:08:07 +01:00
Mark Nauwelaerts
75b8ddb6cf h264parse: properly determine skip amount when no NAL start found yet 2012-01-03 20:27:07 +01:00
Mark Nauwelaerts
c54144cc16 h264parse: some more proper parse state reset 2012-01-03 20:26:51 +01:00
Alessandro Decina
570ba0c84a h264parse: avoid pushing SPS/PPS at start only if both are found in stream
Avoid injecting SPS/PPS nals only if both are already present in the stream.
Fixes some AVC clips that happen to have only PPS nals in stream.
2011-12-19 12:36:39 +01:00
Alessandro Decina
58cc609b08 mpeg4videoparse: handle force key unit events 2011-12-18 18:37:08 +01:00
Alessandro Decina
94ae4ca833 h264parse: do wait for a keyframe when handling force key unit events
Although some decoders can start decoding with just PPS and SPS and waiting for
a keyframe is bad when the keyframe interval is large, gst-ffmpeg does need a
keyframe to start decoding.
2011-12-18 17:40:57 +01:00
Tim-Philipp Müller
7f8adea477 videoparsers: fix LIBS order in Makefile.am 2011-12-08 22:49:50 +00:00
Thibault Saunier
6b3a314d36 videoparsers: Do not not skip startcode when needed
Fix: https://bugzilla.gnome.org/show_bug.cgi?id=665631
2011-12-06 17:05:52 -03:00
Alessandro Decina
a1305b949c h264parse: handle force key unit events
Send SPS/PPS on force key unit events. Useful for example when serving HLS
without transcoding.
2011-12-06 13:16:29 +01:00
Edward Hervey
1c50dab50c h264parse: Use faster parsing variant when input is packetized
Reduces latency and cpu usage

https://bugzilla.gnome.org/show_bug.cgi?id=665584
2011-12-05 19:04:17 +01:00
Mark Nauwelaerts
9604342af3 h264parse: reflow slice nal processing 2011-12-05 13:11:39 +01:00
Mark Nauwelaerts
ef24518b60 h264parse: optimize slice nal processing
Only minimal slice info is needed here to determine real frame start,
so no need to parse extensively.

Fixes #665418.
2011-12-05 13:11:04 +01:00
Alessandro Decina
4474db4e71 h264parse: let upstream PAR override in-stream PAR 2011-12-01 09:07:18 +01:00
Alessandro Decina
21b063a78c h264parse: rework PAR parsing
And in the process refactor _update_src_caps a bit
2011-12-01 09:06:56 +01:00
Luciana Fujii Pontello
6d85d4882a h264parse: respect pixel-aspect-ratio
Parse pixel-aspect-ratio in vui information.
2011-12-01 08:23:22 +01:00
Thibault Saunier
e1bacb4813 codecparser: mpeg4: Look for resync code in _mpeg4_parse
This way the API is simpler and users can call 1 single function for packet
detection.
2011-11-28 21:25:34 -03:00
Thibault Saunier
5555b5fa9d mpeg4videoparse: Properly handle profile and level in caps
Fix #660234
2011-11-28 21:25:34 -03:00
Thibault Saunier
48ad76e538 mpeg4videoparse: Port to the new mpeg4parser library 2011-11-28 21:25:34 -03:00
Thibault Saunier
db4d4979ab mpeg4videoparse: Move to the videoparsers plugin
Rename a few variables to use the same convention as others elements in this
plugin

Conflicts:

	gst/videoparsers/gstmpeg4videoparse.c
2011-11-28 21:25:34 -03: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
Sebastian Dröge
dc2c61faf5 mpegvideoparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream 2011-11-24 10:14:06 +01:00
Sebastian Dröge
61fad46dca h263parse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream 2011-11-24 10:09:59 +01:00
Sebastian Dröge
b10c1f277f diracparse: Implement ::get_sink_caps vfunc to propagate downstream caps constraints upstream 2011-11-24 10:08:27 +01:00
Mark Nauwelaerts
1f3b4ad574 h264parse: remove redundant code
... now that what should not be needed is really not needed anymore to cover
up bogus stuff that has been FIXMEd.
2011-11-18 17:20:10 +01:00
Mark Nauwelaerts
7fae33a661 h264parse: fix up AU collection processing
On the one hand, no need to collect nal if processing last one.
On the other hand, ensure AU collection processing to have sufficient
next NAL data in normal cases.

Fixes #663180.
2011-11-18 17:20:08 +01:00
Mark Nauwelaerts
66543b3dd9 h264parse: mind to-be-skipped data in subsequent re-used offsets 2011-11-18 17:20:06 +01:00
Mark Nauwelaerts
e12044c359 h264parse: avoid additional NAL parsing if no AU collection is needed 2011-11-18 17:20:03 +01:00
Mark Nauwelaerts
9db239e1ec h264parse: some more get_caps tweaking
... by having it use sink template rather than src template, and not
passing an downstream parsed(=true) to upstream.
2011-11-18 17:20:00 +01:00
Sebastian Dröge
f3f9e4b978 h264parse: Implement ::sink_get_caps to allow stream-format conversion again
Just proxying the downstream caps will prevent h264parse from
accepting a different stream-format than what is supported
downstream, although it could convert to a different stream-format.
2011-11-16 10:39:40 -08:00
Jonas Larsson
5099ff23af h264parse: outgoing byte stream prefix always has size 4
Fixes #664123.
2011-11-16 10:57:30 +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
Sreerenj Balachandran
f8239ff692 h264parse: correct debug message and remove some dead code
See #661113.
2011-10-17 11:17:50 +02:00
Sreerenj Balachandran
0a478db7dd h264parse: correct parsing of "numberOfPictureParameterSets"
See #661113.
2011-10-17 11:17:47 +02:00