Commit graph

359 commits

Author SHA1 Message Date
Sebastian Dröge
fccf83e69f playbin: Only append non-raw and sysmem pad template caps to the autoplug-query result
Otherwise a decoder supporting GL memory will think that all downstream can
support GL memory because of seeing its own template caps.

https://bugzilla.gnome.org/show_bug.cgi?id=758212
2016-01-16 11:05:13 +01:00
Sebastian Dröge
9713ab06cd Revert "playbin: only add the template caps when the result is empty"
This reverts commit 023af2d3b1.

https://bugzilla.gnome.org/show_bug.cgi?id=758212
2016-01-16 11:05:13 +01:00
Thiago Santos
81c52aaa16 playbin: use subset check instead of intersect
Elements usually require that all fields on their caps are present
on the fixed caps they receive. Using intersection won't verify it,
resort to using is_subset() checks.

https://bugzilla.gnome.org/show_bug.cgi?id=760477
2016-01-13 15:29:17 -03:00
Sebastian Dröge
844aa3e6a9 playbin: Use the caps query instead of accept-caps to detect if a sink accepts caps
accept-caps is only for one element, caps query is recursive. Fixes playback
with totem and other situations.

https://bugzilla.gnome.org/show_bug.cgi?id=760234
2016-01-08 16:32:32 +02:00
Matthew Waters
023af2d3b1 playbin: only add the template caps when the result is empty
Unconditionally adding the template caps when proxying the caps query will play
havoc with decoders that attempt to choose an output format based on some caps
features.  Creating a sink that does not include those caps features and a
decoder/parser/etc that preferentially chooses some specific caps feature when
available, will always return the decoder/parser/etc template caps and choose a
feature that downstream will be unable to support.

Fix by limiting the addition of the template caps to when the result is actually
empty.

https://bugzilla.gnome.org/show_bug.cgi?id=758212
2015-12-18 21:55:00 +11:00
Sebastian Dröge
53f135cec7 playbin: Send upstream events directly to playsink
Send event directly to playsink instead of letting GstBin iterate
over all sink elements. The latter might send the event multiple times
in case the SEEK causes a reconfiguration of the pipeline, as can easily
happen with adaptive streaming demuxers.

What would then happen is that the iterator would be reset, we send the
event again, and on the second time it will fail in the majority of cases
because the pipeline is still being reconfigured
2015-10-23 12:02:28 +03:00
Sebastian Dröge
4d6aa0f831 decodebin/playbin/playsink/subtitleoverlay: Post async-done on state change failures
https://bugzilla.gnome.org/show_bug.cgi?id=756611
2015-10-19 11:06:25 +03:00
Sebastian Dröge
92061cb19e playbin/uridecodebin: Always post async-done immediately if we're a live pipeline
Not only if the base class told us, but also if one of our own elements did.

https://bugzilla.gnome.org/show_bug.cgi?id=756611
2015-10-19 11:06:25 +03:00
Sebastian Dröge
35cb3b0c57 playback: Add POINTER_TO_ULONG() macro for consistency 2015-09-11 23:29:57 +02:00
Kouhei Sutou
ab64b00b48 playback: fix build error for 64bit Windows build by MinGW
Casting to gpointer from gulong generates the following warning with
64bit Windows target MinGW:

    gstplaybin2.c: In function 'pad_added_cb':
    gstplaybin2.c:3476:7: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
           (gpointer) group_id_probe_handler);
           ^
    cc1: all warnings being treated as errors

We should cast to guintptr from gulong before we cast to gpointer.

https://bugzilla.gnome.org/show_bug.cgi?id=754755
2015-09-11 23:28:07 +02:00
danny song
49d0083456 playbin: remove unnecessary break
https://bugzilla.gnome.org/show_bug.cgi?id=751690
2015-06-29 19:55:34 -03:00
Sebastian Dröge
ab79e50510 playbin: Reset suburi also when receiving an error message from the sub uridecodebin
http://bugzilla.gnome.org/show_bug.cgi?id=751118
2015-06-22 14:51:07 +02:00
Brijesh Singh
bcc9021071 playbin: free group->suburi on failure
If suburidecodebin is failed to negotiate (e.g file does not exist)
then free internal suburi variable so that 'current-suburi' property
returns correct status.

https://bugzilla.gnome.org/show_bug.cgi?id=751118
2015-06-22 14:48:42 +02:00
Sebastian Dröge
9c47e7d5e6 playbin: Check in autoplug_continue against the subtitle factory caps correctly
6a2f017bfa changed it to check the subtitle
factory caps if there is a text-sink but we fail to get its sinkpad. What
actually should be done here is to use the factory caps if there is no
text-sink at all.

https://bugzilla.gnome.org/show_bug.cgi?id=750785
2015-06-11 16:18:51 +02:00
Jan Schmidt
ca864ce46e playbin: Fix some warnings with clang around multiview enums
There is the GstVideoMultiviewMode enum and the
GstVideoMultiviewFramePacking, which is a subset of the
multiview modes, with the same values as the corresponding
types from the full enum. Do some casts and use the right
times to avoid implicitly using/passing GstVideoMultiviewFramePacking
when a GstVideoMultiviewMode is needed.
2015-06-11 23:01:48 +10:00
Jan Schmidt
383d8f02be playbin: Implement multiview frame-packing overrides
Add GstVideoMultiviewFramePacking enum, and the
video-multiview-mode and video-multiview-flags
properties on playbin.

Use a pad probe to replace the multiview information in
video caps sent out from uridecodebin.

This is a part implementation only - for full
correctness, it should also modify caps in caps events,
accept-caps and allocation queries.

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-11 12:05:00 +10:00
Sreerenj Balachandran
16378a7de3 playback: Add gstplaybackutils.{h,c} to deploy the common subroutines
Bring some of the helper functions in gstplaybin2.c to new files
gstplaybackutils.{h,c} which can be utilized by other files
in gst/playback too.

https://bugzilla.gnome.org/show_bug.cgi?id=687182
2015-06-09 10:13:08 +02:00
Stefan Sauer
9b9d1a6119 Revert "doc: Workaround gtkdoc issue"
This reverts commit df7ef3c35d.

This is fixed by the gtk-doc 1.23 release.
2015-05-18 20:01:49 +02:00
eunhae choi
1b755eb272 playbin: check the flags before set again
check the previous flags of playsink to avoid the reconfigure of playsink repeatedly

https://bugzilla.gnome.org/show_bug.cgi?id=749528
2015-05-18 10:01:04 +03:00
Nicolas Dufresne
df7ef3c35d doc: Workaround gtkdoc issue
With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the refsect2
into para.
2015-05-16 23:33:55 -04:00
Stefan Sauer
015bd9285a playback: use the new gst_object api
Use gst_object_has_as_anchestor instead of the now deprecated _has_ancestor.
2015-05-15 14:49:47 +02:00
Tim-Philipp Müller
ec5c93f169 docs: update element example pipelines
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Luis de Bethencourt
df08f5eabe remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused. Removing them.
2015-04-24 17:11:01 +01:00
Luis de Bethencourt
985ed4847f playbin: avoid possible deference of null pointer
For safety, check the pointer playbin->curr_group is valid before
reading parameters of the structure.

CID #1291624
2015-03-30 10:50:48 +01:00
Thiago Santos
d54d51d0d2 playbin: ignore new pads if it is shutting down
If a new pad is added after playbin has been put to READY/NULL it
should ignore new pads as it is shutting down.

This can happen when the pipeline fails to preroll (is still in READY)
and the user gives up on waiting or an error that doesn't reach
the demuxer occurs (on some event handling) and it will continue to
work and exposing pads while playbin has been put to NULL.

Without this check an input-selector is created and set to PAUSED
state, preventing playbin from properly shutting down in case it
has data blocked inside it.
2015-03-25 08:32:33 -03:00
Ramiro Polla
b636fe29f3 playbin: don't escape percent sign in documentation code sample 2015-03-14 14:20:17 +00:00
Sebastian Dröge
8093e3ba94 playbin: Disconnect signals and invalidate group if it fails to activate
Otherwise playbin might move to the group directly after EOS of the next
group, and then error out again.
2015-03-12 12:18:30 +00:00
Vincent Penquerc'h
a2ca6459a6 playbin: forward template and ring buffer settings to existing decodebins
https://bugzilla.gnome.org/show_bug.cgi?id=744844
2015-02-24 10:02:19 +00:00
Stefan Sauer
c51bf98af4 playbin: improve debug log
Log the human readable pad_link_return desc as well.
2015-02-11 22:16:53 -08:00
Thibault Saunier
b9cbfcdeb4 playbin: Do not mix up stream type when getting stream combiner element
We were always returning the video stream combiner whatever stream type
combiner was wanted.
2014-12-11 13:47:58 +01:00
Thiago Santos
7e801a5f26 playbin2: always unref the combiner sinkpad when removing the srcpad
Create a function to do the pad cleanup of the GstSourceCombine struct
and use it to not forget to also cleanup the sink pad and fix a memory
leak.

https://bugzilla.gnome.org/show_bug.cgi?id=741198
2014-12-10 13:36:37 -03:00
Edward Hervey
6a2f017bfa playbin: Only check sinks which are in >= GST_STATE_READY
Otherwise we endup with bogus caps intersection (from the pad template
caps and not from what the actual hardware/device supports)

https://bugzilla.gnome.org/show_bug.cgi?id=738131
2014-12-05 07:58:44 +01:00
Tim-Philipp Müller
9c5d53c7e3 docs: fix some gtk-doc warnings
Deprecated entities found in documentation for xyz:Long_description
.
2014-11-15 23:13:42 +00:00
Andrei Sarakeev
2133a98eb1 playbin: Don't leak input-selector sinkpads
https://bugzilla.gnome.org/show_bug.cgi?id=736861
2014-09-18 12:52:02 +03:00
George Kiagiadakis
a2122f04ec playbin: filter out buffering messages when switching uri
When switching URI from about-to-finish, playbin starts decoding the new
URI and the queue2 inside uridecodebin starts emitting buffering messages
immediately. However, the queue(s) inside playsink still have buffers to
play and the pipeline doesn't need to pause for buffering, so we should
not send those buffering messages up to the application, otherwise there
is an audible glitch caused by pausing the pipeline for a very short time.

https://bugzilla.gnome.org/show_bug.cgi?id=727255
2014-09-05 12:44:27 -03: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
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
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
Sebastian Dröge
73646bd04f playbin: Go asynchronously from READY to PAUSED
We now add all our elements to uridecodebin *after*
GstBin::change_state(READY->PAUSED), so we need to post async-start
and async-done messages ourselves if we want to work async.

https://bugzilla.gnome.org/show_bug.cgi?id=733495
2014-07-23 12:46:48 +02:00
Sebastian Dröge
5bf3c92462 playbin: Create new sources after chaining up to the parent class
Otherwise we start the new sources already before the parent class
got ready to start.
2014-07-21 09:35:36 +02:00
Sebastian Dröge
0d87f8fdb2 playbin: Don't block on non-serialized events
https://bugzilla.gnome.org/show_bug.cgi?id=729321
2014-05-01 13:18:11 +02:00
Tim-Philipp Müller
bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Jan Schmidt
98482c3a0e playbin: Drop reference to any source element in NULL state
Drop the reference instead of waiting for either finalize(), or
for a new source when reused. Everyone else already forgot about
the old source.
2014-04-04 02:15:53 +11:00
Arun Raghavan
f4cab18ec1 playback: Add video-/audio-filter properties
This provides an audio-filter and video-filter property to allow
applications to set filter elements/bins. The idea is that these will
e
applied if possible -- for non-raw sinks, the filters will be skipped.

If the application wishes to force the application of the filters, this
can be done by setting the new flag introduced on playsink -
GST_PLAY_FLAG_FORCE_FILTERS.

https://bugzilla.gnome.org/show_bug.cgi?id=679031
2014-03-16 18:38:29 +01:00
Sebastian Dröge
1bda077374 Revert "playback: Add video-/audio-filter properties"
This reverts commit fb8fdedb4f.
2014-03-16 18:38:25 +01:00
Arun Raghavan
fb8fdedb4f playback: Add video-/audio-filter properties
This provides an audio-filter and video-filter property to allow
applications to set filter elements/bins. The idea is that these will be
applied if possible -- for non-raw sinks, the filters will be skipped.

If the application wishes to force the application of the filters, this
can be done by setting the new flag introduced on playsink -
GST_PLAY_FLAG_FORCE_FILTERS.

https://bugzilla.gnome.org/show_bug.cgi?id=679031
2014-03-16 18:35:57 +01:00
Matthieu Bouron
45dfceacdb playbin: improve autoplug_query_caps return
Makes autoplug_query_caps return
downstream_caps + intersect_first(filter_caps, element_caps)

https://bugzilla.gnome.org/show_bug.cgi?id=724828
2014-02-27 21:23:12 +01:00
Sebastian Dröge
a5918b0ab5 playbin: Keep inputselector around until we release its pads
Otherwise there's an interesting race condition when we destroy
the inputselector (actually it will be destroyed later when its state
change message gets destroyed) and afterwards release its sinkpad.

This is the code path when the last channel is removed from the
input selector.

Gave this warning sometimes, for chained oggs or whenever else
we change decode groups:
GStreamer-CRITICAL **: Padname '':sink_0 does not belong to element inputselector0 when removing
2014-02-18 15:06:25 +01:00
Sebastian Dröge
a02678057e playbin: First try to get the pad's current caps, then query caps
The caps query might give us ANY caps while the pad has fixed caps
configured currently.
2014-02-11 16:36:20 +01:00
Sebastian Dröge
57295753d5 playbin: Fix memory leak in autoplugging code
We should not leak element factories ideally.
2014-02-10 16:33:50 +01:00