Commit graph

13786 commits

Author SHA1 Message Date
Tim-Philipp Müller
5fc94da399 textoverlay: remove code that can't be reached
If this code could ever be reached, it would leak
memory (CID 1231978), but gst_caps_get_features()
never returns NULL, so that can't happen.
2014-08-29 19:18:55 +01:00
Tim-Philipp Müller
db857e5a97 encoding: remove assignment that's no longer needed
CID 1231980
2014-08-29 18:21:13 +01:00
Peter G. Baum
b9a54fcabe riff: Recognize RF64 as RIFF file
https://bugzilla.gnome.org/show_bug.cgi?id=735631
2014-08-29 11:47:24 +03:00
Göran Jönsson
acdb7feacf rtspconnection: Protect readsrc, writesrc and controllsrc with a mutex
Fixes a crash when controlsrc, readsrc or writesrc are modified from
gst_rtsp_source_dispatch_read/write and gst_rtsp_watch_reset at the
same time.

https://bugzilla.gnome.org/show_bug.cgi?id=735569
2014-08-29 11:28:13 +03:00
Sebastian Dröge
2434af3d31 playsinkconvertbin: setcaps() always returns TRUE and the return value is unused
Change it to a void return value. The caps are forwarded afterwards via
gst_pad_event_default() and not inside this function.

CID 1226477
2014-08-28 17:13:05 +03:00
Sebastian Dröge
0a19783291 videodecoder: Fix broken boolean expression
We can seek with end_type==NONE and end_type==SET && end_position=-1. The
check for end_type!=NONE made the second condition impossible.

CID 1226440
2014-08-28 17:06:22 +03:00
Sebastian Dröge
d357f28260 audiodecoder: Fix broken boolean expression
We can seek with end_type==NONE and end_type==SET && end_position=-1. The
check for end_type!=NONE made the second condition impossible.

CID 1226439
2014-08-28 17:00:26 +03:00
Sebastian Dröge
a5cf0a4572 decodebin: Include information from the error messages of tried but failed elements in the missing plugin errors 2014-08-25 21:01:16 +03:00
Sebastian Dröge
22a138b716 decodebin: Initialize local variables for every retry 2014-08-25 21:01:16 +03:00
Sebastian Dröge
21e9f84486 decodebin: Remove error case that resulted in two error messages
We already send one in gst_decode_bin_expose() for this case. Only
if we're unable to typefind the caps another error message is needed.
2014-08-25 21:01:16 +03:00
Tim-Philipp Müller
f14494f425 typefinding: tighten checks for 'freeform mp3' a little
Freeform mp3s typically have bitrates higher than the
otherwise max allowed rate. Prevents misdetection of
some truetype font files as mp3.

https://bugzilla.gnome.org/show_bug.cgi?id=732923
2014-08-25 11:18:21 +01:00
Sebastian Dröge
4a69d6ba3b audiodecoder: Don't ignore ::start/stop return values 2014-08-25 13:15:07 +03:00
Tim-Philipp Müller
844ae7cc1c spec: add gst-device-monitor-1.0 to RPM .spec file
https://bugzilla.gnome.org/show_bug.cgi?id=734944
2014-08-18 13:04:31 +01:00
Thiago Santos
98ed3ddc8f playsinkconvertbin: only intersect with the filter at the end
Otherwise we might change some capsfeatures from ANY to the specific
value from the filter and do not filter those out in case the
sink doesn't support them

https://bugzilla.gnome.org/show_bug.cgi?id=734822
2014-08-15 18:24:36 -03:00
Thibault Saunier
dcf8c3e8b0 discoverer: Set 'processing = FALSE' when done discovering SYNC
This avoids a race where we would get new tag but we are already
prerolled and analyzing results.

It is the way it is supposed to be handled as stated in comment:
"If preroll is complete, drop these tags - the collected information is
possibly already being processed and adding more tags would be racy"
2014-08-15 13:40:17 +02:00
Thiago Santos
568ef481c5 gstvideo: add missing entry to win32 .def
gst_video_guess_framerate
2014-08-14 17:22:08 -03:00
Jan Schmidt
c98f051548 video: Add gst_video_guess_framerate() function
Takes a nominal frame duration and returns a standard
FPS if it matches closely enough (< 0.1%), or else
calculates a framerate that'll do.
2014-08-15 01:08:22 +10:00
Jan Schmidt
2a37534129 video: Various simple docs fixes 2014-08-15 01:08:12 +10:00
Jan Schmidt
946dc6b09f videodecoder: Reset last_timestamp_out on new segment
Reset last_timestamp_out when applying the output segment
change, to avoid decoder confusion over new timestamp timelines when
a seamless segment change happens.

Move some locks/unlocks to later when they're actually needed.

https://bugzilla.gnome.org/show_bug.cgi?id=734617
2014-08-14 17:59:06 +10:00
Thiago Santos
14d79a3a47 decodebin: handle group switching for deadend group
Gracefully handle switching groups that all pads are deadend.

This can happen when quickly switching programs on mpegts as the
output is unaligned it can happen that not enough data was accumulated at
parsers to generate any buffers, causing the stream to receive EOS before
any data can be decoded.

To handle this scenario, the _expose function now also gets if there is
any next group to be exposed along with the list of endpads. If there are
no endpads and there is another group to expose it will switch to this next
group and then retry exposing the streams.

Also, the requirement to only switch from the chain that has the endpad had
to be modified to care for when the drainpad is NULL

https://bugzilla.gnome.org/show_bug.cgi?id=733169
2014-08-13 18:51:37 +03:00
Thiago Santos
9c09c8ae17 decodebin: consider all deadend pads as drained
Otherwise when switching out a group with a deadend pad it will block
as it would be waiting for EOS on a deadend that already got one

https://bugzilla.gnome.org/show_bug.cgi?id=733169
2014-08-13 18:51:37 +03:00
Thiago Santos
6bf3356967 basetextoverlay: fix caps negotiation filter 2014-08-13 11:22:52 -03:00
Sebastian Dröge
d280bba126 playsinkconvertbin: Make sure to intersect raw caps with our converter caps
Otherwise we end up allowing video/x-raw with arbitrary caps features that are
not handled by our converters.

https://bugzilla.gnome.org/show_bug.cgi?id=734683
2014-08-13 14:28:05 +03:00
Jan Schmidt
02d1ab0d1c audiodecoder: Don't drain and flush on SEGMENT events.
As was done for the base video decoder in commit 695675, don't
flush out the decoder on a new SEGMENT event. Segment events
may be a new segment, but are also often segment updates for
the current segment where the old data should be kept. For new
segments, a STREAM_START event will already trigger a drain, but
make sure to flush any remaining partial data then as well.

https://bugzilla.gnome.org/show_bug.cgi?id=734666
2014-08-12 23:54:41 +10:00
Sanjay NM
8cab1ab5fc videoscale: Add NV21 support
https://bugzilla.gnome.org/show_bug.cgi?id=734650
2014-08-12 14:31:48 +03:00
Matthieu Crapet
48f7a40078 tests: fix decodebin signal used in icles/playback/ decodetest, test and test5
Since release 1.1.4, "new-decoded-pad" no longer exists.
2014-08-12 09:28:41 +03:00
Thiago Santos
a080c0ebbf basetextoverlay: rework caps negotiation
Make textoverlay negotiate caps more correctly.

1) Check what caps we received in the video-sink
2) If it already has the overlay meta -> use it directly
3) If it doesn't, textoverlay try adding the overlay meta and using it,
   if downstream doesn't support it, just use what is received in the
   video-sink
4) Check if the allocation query also supports the meta to enable
   really using it

Before it wasn't really doing renegotiation of any kind, just
re-checking if it should use the overlay meta or not

Also had to update the caps in the test as memory:SystemMemory seems
to be required when you use a caps feature otherwise intersection/subset
checks will fail.

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:40:44 -03:00
Thiago Santos
c20e044ef0 basetextoverlay: always intersect with the filter caps
Avoids returning values that upstream can't produce

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 10:30:58 -03:00
Thiago Santos
c9904fb639 encodebin: delay missing encoder error as passthrough is still possible
Set up a fakesink with a pad probe to replace the missing encoder to detect
if encoding was really required and only error out in this case. Otherwise
just let passthrough branch work.

This delays the error posting from the set_state function to when buffers
are really flowing. Unit test updated accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=650652
2014-08-11 10:30:58 -03:00
Sebastian Dröge
59fb749ef6 decodebin: Remove buffering special casing for adaptive streaming demuxers
They output smaller buffers now and we should be able to handle the buffering
limits like in every other situation now.
2014-08-11 10:57:43 +02:00
Jan Alexander Steffens (heftig)
8a1f8623fa videodecoder: Don't set decoding timestamps on raw video
https://bugzilla.gnome.org/show_bug.cgi?id=733720
2014-08-11 10:29:33 +02:00
George Kiagiadakis
a4d97f49e2 videodecoder: In reverse playback, flush the output queue after decoding each keyframe chain
This fixes the reverse playback scenario when upstream is not fully
parsing the stream and does not send every keyframe chain separately
with the DISCONT flag on the keyframe.

To explain this, let's suppose we have this stream:
 0 1 2 3 4 5 6 7 8
 K     K     K

In most circumstances, the upstream parser will chain in the
decoder the buffers in the following order:

 6 7 8 3 4 5 0 1 2
 D     D     D

In this case, GstVideoDecoder will flush the parse queue every time
it receives discont (D) and we will eventually get in the output queue:

  (flush here) 8 7 6  (flush here) 5 4 3 (flush here) 2 1 0

In case the upstream parser doesn't do this work, though,
GstVideoDecoder will receive the whole stream at once and will flush
the parse queue afterwards:

 0 1 2 3 4 5 6 7 8
 D

During the flush, it will look backwards for keyframes and will
decode in this order:

 6 7 8 3 4 5 0 1 2

This is the same order that it would receive from upstream if
upstream was parsing and looking for the keyframes, only that now
there is no flushing of the output queue in between keyframes,
which will result in the output queue looking like this:

 2 1 0 6 5 3 8 7 6

This will confuse downstream obviously and will play incorrectly.
This patch forces the decoder to flush the output queue every time
it picks a new keyframe to decode, so it will end up decoding 6 7 8
and then flushing before picking 3 for decoding, so the output will
get 8 7 6 before 6 5 3 and the video will play back correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=734441
2014-08-11 10:22:55 +02:00
Tim-Philipp Müller
f7d6087d53 configure: use pkg-config to detect x11 and xv libs
AC_PATH_XTRA macro unnecessarily pulls in libSM and libICE.

https://bugzilla.gnome.org/show_bug.cgi?id=731047
2014-08-10 17:30:18 +01:00
Tim-Philipp Müller
d960a25a19 xvimage: fix crash when outputting debug log
Can't print a GstMemory via GST_PTR_FORMAT, it will crash
inside GObject checking if it's a GObject, and we can't
check generically whether it's a derived GstMemory type,
as boxed types don't allowe derivation.
2014-08-10 17:27:14 +01:00
Sebastian Rasmussen
a285f7126b audioencoder: Mark caps argument as not being transferred
https://bugzilla.gnome.org/show_bug.cgi?id=734540
2014-08-10 10:45:14 +01:00
Sebastian Rasmussen
58ec221608 vorbisenc: Improve annotation of internal function
https://bugzilla.gnome.org/show_bug.cgi?id=734541
2014-08-10 10:43:26 +01:00
Sebastian Rasmussen
9995054e80 tests: Add missing unrefs of objects after use
Unreffing the objects returned by gst_bin_get_by_name() and
gst_pipeline_get_use() were missing in several tests, so add these.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734359
2014-08-06 15:18:56 +02:00
Sebastian Rasmussen
1da3df79cf oggdemux: Unref peer pad after use in error case
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734350
2014-08-06 13:48:42 +02:00
Sebastian Dröge
8fc307fae0 appsrc: Some minor fixes and cleanup 2014-08-06 10:07:42 +02:00
Wang Xin-yu (王昕宇)
251c63c4ab appsrc: Make caps set action queued together with buffer
https://bugzilla.gnome.org/show_bug.cgi?id=729760
2014-08-06 10:04:49 +02:00
Sebastian Dröge
a0a9fd004b playbin: Keep a reference to the playsink sinkpads
Otherwise playsink might get shut down without us noticing
that our pad references are gone now.

Probably fixes https://bugzilla.gnome.org/show_bug.cgi?id=733165
2014-08-01 15:00:46 +02:00
Mohammed Sameer
b34e0ba91c streamsynchronizer: don't unset DISCONT flag
Unsetting DISCONT flag means we need to copy the buffer. This copy operation
mandates that all GstMemory should be copy-able which is not always the case

https://bugzilla.gnome.org/show_bug.cgi?id=727409
2014-08-01 14:23:07 +02:00
Edward Hervey
f9c5bc5b5a Makefile: Add usage of build-checks step
Allows building checks without running them
2014-07-31 18:40:59 +02:00
Edward Hervey
2ca269ac6b check: Fix include path of rtp checks
Fixes make distcheck
2014-07-31 16:11:25 +02:00
Thibault Saunier
235e462077 pbutils: discoverer: Always set the pipeline back to NULL after an error
Otherwize the pipeline would be in an wrong state and on the next
iteration any kind of error could happen

Everytime an error happens in a pipeline the application has to set the
pipeline back to NULL instead of READY.

https://bugzilla.gnome.org/show_bug.cgi?id=733976
2014-07-30 15:28:21 +02:00
Thiago Santos
cf50b45ff6 decodebin: add missing 'time' word to debug message
It prints the buffers, bytes and time limits, but 'time' was missing
from the string.
2014-07-29 15:55:27 -03:00
Sebastian Dröge
362e9a547b playbin: Pass through NO_PREROLL state change returns
Fixes playback of live pipelines.
2014-07-28 16:57:00 +02:00
Sebastian Dröge
f3f55e1758 uridecodebin: Pass through NO_PREROLL state change returns
Fixes playback of live pipelines.
2014-07-28 16:57:00 +02:00
Tim-Philipp Müller
1ed192abb0 playbin: fix 'attempt to unlock mutex that was not locked' in error code path
Fixes playbin unit test with latest GLib.
2014-07-26 14:52:01 +01:00
Nicolas Dufresne
ce50fc221e videoencoder: Don't delay set_format
This prevent implementing allocation query, as the format need to be
known in order to determin the size and number of buffers needed.

Note: This may lead to few regressions that will need fixing

https://bugzilla.gnome.org/show_bug.cgi?id=732288
2014-07-25 14:12:02 -04:00