Commit graph

13571 commits

Author SHA1 Message Date
Julien Isorce
303cec48db v4l2: refactor by emulating one v4l2_plane in non-MPLANE mode
so that the buffer informations can be retrieved the same way
in both MPLANE and non-MPLANE mode.

Here "emulating" means "manually fill in the plane".

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-12-04 09:28:08 +00:00
Julien Isorce
61ae84b50d v4l2: add support for multi-planar V4L2 API
This api is in linux kernel since version 2.6.39,
and present in all version 3.

The commit that adds the API in master branch of the
linux kernel source is:
f8f3914cf9

v4l2 doc: "Some devices require data for each input
or output video frame to be placed in discontiguous
memory buffers"

There are newer structures 'struct v4l2_pix_format_mplane'
and 'struct v4l2_plane'.
So the pixel format is not setup with the same API when using
multi-planar.

Also for gst-v4l2, one of the difference is that in GstV4l2Meta
there are now one mem pointer for each maped plane.

When not using multi-planar, this commit takes care of keeping
the same code path than previously. So that the 2 cases are
in two different blocks triggered from V4L2_TYPE_IS_MULTIPLANAR.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-12-04 09:27:20 +00:00
Wim Taymans
0d55724a2b audioparsers: don't leak template caps 2013-12-04 09:12:07 +01:00
Wim Taymans
e0a5c07e8d audioparsers: use ACCEPT_INTERSECT flag
The parser can accept input that is not completely specified. Use the
ACCEPT_INTERSECT flag on the sinkpad to tweak the acceptcaps function to
check for intersection only. This allows us to proxy downstream
constraints while still allowing non-subset caps as input.
We can then also remove the appended template caps workaround.
Make a unit-test to check the new feature.

This reverts commit 26040ee38c

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=705024
2013-12-03 22:26:44 +01:00
Wim Taymans
e3f393f7e6 audioparsers: remove fields from filter
We need to remove the fields from the filter when we can convert
between them.
2013-12-03 21:39:57 +01:00
Wim Taymans
e8313a1e70 audioparsers: refactor code to remove caps fields 2013-12-03 21:29:13 +01:00
Tim-Philipp Müller
a424fb289b deinterlace: microoptimisation: avoid some unnecessary GValue copies 2013-12-02 00:10:43 +00:00
Tim-Philipp Müller
63b0e84add deinterlace: fix off-by-one crash when downstream caps contain a list of framerates
https://bugzilla.gnome.org/show_bug.cgi?id=719544
2013-12-01 23:33:04 +00:00
Thiago Santos
079dde49ed qtdemux: Use the timestamp of the moof as the base fragment start
In SmoothStreaming fragmented scenario, the timestamps are calculated
starting from the fragment buffer timestamp. When there is a not-linked
return from downstream, qtdemux will return upstream and will keep the
non-pushed data into its adapter.

On a new fragment buffer pushed to qtdemux, the new buffer timestamp
would overwrite the previous one that should be used on the still
to be pushed buffers. Because of this, this patch will also
update the fragment_start timestamp from the adapter last pts
to make sure the moof and timestamps are in sync and will result
in correct timestamps for all fragments.
2013-11-29 17:28:48 -03:00
Thiago Santos
45c16599ff qtdemux: avoid re-reading the same moov and entering into loop
In the scenario of "mdat | moov (with fragmented artifacts)" qtdemux
could read the moov again after the mdat because it was considering the
media as a fragmented one.

To avoid this loop this patch makes it store
the last processed moov_offset to avoid parsing it again.
And it also checks if there are any samples to play before
resturning to the mdat, so that it knows there is new data to be played.

https://bugzilla.gnome.org/show_bug.cgi?id=691570
2013-11-29 17:28:48 -03:00
Thiago Santos
fcc78aa3bd qtdemux: do not free streams if they were not created locally
When parsing a trak only free streams on failures if those streams
were created locally. They could have been created from a previous
fragment, in this case we they have valid info from the other fragment.
Including pads.

https://bugzilla.gnome.org/show_bug.cgi?id=691570
2013-11-29 17:28:48 -03:00
Sebastian Dröge
220a947dc7 videomixer: Simplify NV12/21 blending code macros 2013-11-29 19:57:46 +01:00
Sebastian Dröge
b0529e0fe8 videomixer: Fix segfault when filling the background of a UYVY frame
https://bugzilla.gnome.org/show_bug.cgi?id=712401
2013-11-29 19:52:34 +01:00
Tim-Philipp Müller
4278ab18ff qtdemux: fix compilation with gst debuging disabled
qtdemux.c:9452:1: error: label at end of compound statement
2013-11-29 09:21:52 +00:00
Jonas Holmberg
0ab0421759 rtph264pay: Map inbuffer once only
Do not call gst_buffer_extract() twice since each call will map and
unmap the biffer.

https://bugzilla.gnome.org/show_bug.cgi?id=719434
2013-11-28 16:08:40 -05:00
Nicolas Dufresne
77833b886d videoflip: Add unit test for the 'automatic' method
These new tests send a tag event before seding the buffer. Tested case are an
empty tag list, a tag list with orientation-180 set and an invalid orientation value.

https://bugzilla.gnome.org/show_bug.cgi?id=719497
2013-11-28 11:59:05 -05:00
Tim-Philipp Müller
b8f689a9d9 videoflip: don't crash on tag events without orientation tag
Would crash in g_free() trying to free an uninitialised pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=719497
2013-11-28 16:09:04 +00:00
Wim Taymans
e8edecc56e rtpsession: don't unref buffer twice
Cleaning the packet info will already unref the buffer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=715078
2013-11-28 16:51:13 +01:00
Jan Schmidt
b3b89dfec1 qtdemux: Add HydrogenAudio ReplayGain tags
Identical to the itunes (tm) version, but labelled with
org.hydrogenaudio.replaygain as the producer.
2013-11-28 22:36:44 +11:00
Mathieu Duponchelle
532598e360 videomixer: explicitly fail when alpha information would have been lost. 2013-11-27 16:35:46 +01:00
Nicolas Dufresne
37c73391ef gitignore: Updated to ignore *.swp and .dirstamp 2013-11-26 13:54:08 -05:00
Sebastian Dröge
fb14f66696 matroska-demux: Allow a bit more variation when detecting common framerates
Instead of +/- 1ns we allow 2ns now. Due to rounding errors there are
some Matroska files out there with 33.333331ms per frame for 30fps.
2013-11-26 11:17:42 +01:00
Sebastian Dröge
20ad174679 matroska-demux: Use gst_util_double_to_fraction() instead of GValue magic 2013-11-26 10:21:04 +01:00
Nicolas Dufresne
c42bc9efa0 videoflip: Set default method at contruction
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712333
2013-11-25 14:03:21 -05:00
Nicolas Dufresne
90ac945dcc v4l2object: Use space instead of tabs
https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-11-25 13:44:50 -05:00
Nicolas Dufresne
f18290226a v4l2object: Fix header indentation so it's readable again
It's unfortunate to have to do this, but with the mix of tabs and space, plus all the random
indentation this header has become very hard to read.

https://bugzilla.gnome.org/show_bug.cgi?id=712754
2013-11-25 13:44:35 -05:00
Wim Taymans
29d9b1e7de check: fix jitterbuffer check
Don't advance the clock to 240ms too early.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=710013
2013-11-25 17:39:52 +01:00
Thiago Santos
6bb6a5cdf4 jpegdec: deprecate max-errors
The property wasn't use internally, let the base class handle the
number of errors to tolerate.
2013-11-25 11:58:58 -03:00
Wim Taymans
710d1f3a2a rtpjitterbuffer: improve clear-pt-map handling
Don't reset the expected output seqnum when clearing the pt map because this
could stall the jitterbuffer forever.
Add a unit test for this.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709800
2013-11-25 15:52:22 +01:00
Thiago Santos
be2f2f196a jpegdec: let the base class decide when to return an error
The base videodecoder class has an error counting feature to tolerate
a few errors before posting an error message. So don't force the
error and let the base class decide when it should happen

https://bugzilla.gnome.org/show_bug.cgi?id=710762
2013-11-25 11:03:34 -03:00
Thiago Santos
673b8ca1c1 jpegdec: Add data skipping on input
Add missing bytes skipping when bad input is received.

https://bugzilla.gnome.org/show_bug.cgi?id=710762
2013-11-25 11:03:26 -03:00
Jan Schmidt
fdfc6a2a86 qtdemux: Discard 2 byte subpicture packets
As for text subtitles and as suggested in #712643, throw
away the 2 byte terminator packets that some encoders insert.

This will make things better when remuxing and causes generation
of gap events.
2013-11-25 12:24:22 +11:00
Tim-Philipp Müller
901ec63462 rtpjitterbuffer: fix wake-up when new buffers come in after running empty
Spotted by 'gratias' on IRC. Probably introduced in recent refactoring.

https://bugzilla.gnome.org/show_bug.cgi?id=715039
2013-11-25 00:37:50 +00:00
Mark Nauwelaerts
643e6fdc36 matroskamux: correctly handle negative relative timestamps
... rather than scaling these as unsigned.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712744

Based on patch by Krzysztof Kotlenga <pocek@users.sf.net>
2013-11-23 12:25:05 +01:00
MathieuDuponchelle
83f8ee1d41 videomixer2: Merge tag events to send them in collected.
Otherwise there were race conditions where we would send tags
on a flushing srcpad.

We have a test for that in GES, but this should be tested
systematically with harness in the future as I believe it
is useful for exactly that kind of cases.

https://bugzilla.gnome.org/show_bug.cgi?id=708165
2013-11-22 18:54:35 -03:00
Thibault Saunier
a45d470236 qtdemux: Use GstVideoInfo helper to create caps for raw video
This way we do not miss mandatory fields in caps.
At the same time use the gst_pb_utils_get_codec_description
helper to get codec description.

https://bugzilla.gnome.org/show_bug.cgi?id=712335
2013-11-22 18:52:54 -03:00
Thibault Saunier
6ff7522ba2 matroskademux: Use GstVideoInfo helper to create caps for raw video
This way we do not miss mandatory fields in caps.
At the same time use the gst_pb_utils_get_codec_description helper to
get codec description.

https://bugzilla.gnome.org/show_bug.cgi?id=712328
2013-11-22 18:52:54 -03:00
Thibault Saunier
1fc591238b multifilesrc: Implement seeking in case of multiple images
https://bugzilla.gnome.org/show_bug.cgi?id=712254
2013-11-22 18:52:54 -03:00
Wim Taymans
4c9474905b rtpjitterbuffer: pass downstream flowreturn to upstream
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712722
2013-11-22 12:27:31 +01:00
Michael Olbrich
f8f2fc3e86 v4l2: clear cached caps on close
A different device with different caps may be used for the next open.

https://bugzilla.gnome.org/show_bug.cgi?id=712611
2013-11-21 14:14:24 -05:00
Tim-Philipp Müller
d9c2914c90 g_memmove() is deprecated
Just use plain memmove(), g_memmove() is deprecated in
recent GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=712811
2013-11-21 15:30:34 +00:00
Wim Taymans
3a1199c2f7 rtpvorbisdepay: handle packets > 0xffff
Handle input packet sizes larger than 16 bits in the depayloader.
Remove size restrictions on the payloader.
2013-11-21 11:32:15 +01:00
Wim Taymans
43e9b56122 rtptheoradepay: handle packets > 0xffff
Reorganize some things in the depayloader so that it can handle packets larger
than 16 bits.
Remove the size restriction on the payloader.
2013-11-21 11:30:28 +01:00
Jan Schmidt
81e2c8130a isomp4: Handle mp4s subpicture streams better.
Clean up the handling of mp4s streams. Use the generic esds
descriptor function to extract the palette, instead of hard coding
a wrong magic offset.

Add some more size safety checks when parsing ES descriptors, and
replace magic numbers with the descriptive constants that are already
defined.

Enhance dump output for stsd atoms.

Streams from both bug 712643 and historic bug 568278 now both work
correctly.

Fixes: #712643
2013-11-21 02:28:27 +11:00
Jan Schmidt
217d2d8deb qtdemux: Sort fourcc declarations and remove duplicates 2013-11-20 22:08:25 +11:00
Jan Schmidt
b6f581eecc qtdemux: Merge all the fourcc headers into one
Remove qtdemux_fourcc.h and ftypcc.h and put it all in fourcc.h
2013-11-20 21:48:03 +11:00
Wim Taymans
0c6f4efe4a rtpjitterbuffer: avoid mapping the buffer
Reuse the parsed structure to get the timestamps.
2013-11-19 10:12:00 +01:00
Tim-Philipp Müller
28f524a551 rtspsrc: fix 'make check'
Fix generic/states check. Also, g_return_if_fail() is
not for internal state checking.
2013-11-18 17:13:49 +00:00
Tim-Philipp Müller
d506409af5 docs: get rid of 'Since: 0.10.x' markers
And some gtk-doc markup fixes.
2013-11-18 14:47:35 +00:00
Tim-Philipp Müller
548e756e0a rtpmanager: fix Since markers
Should be next stable release series version
2013-11-16 12:15:14 +00:00