Commit graph

47 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
f4bcf8290b playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
In decodebin3 and uridecodebin3 the `force-sw-decoders` boolean property is
added. In uridecodebin3 it is only a proxy property which will forward
the value to decodebin3.

When decodebin3 has `force-sw-decoders` disabled, it will filter out in its
decoder and decodable factories those elements within the 'Hardware'
class, at reconfiguring output stream.

playbin3 adds by default GST_PLAY_FLAG_FORCE_SW_DECODERS, and sets
`force-sw-decoders` property accordingly to its internal uridecodebin, also
filters out the 'Hardware' class decoder elements when caps
negotiation.
2020-01-09 12:28:32 +00:00
Philippe Normand
0a515acfa8 playbin3: Propagate sink context
When the playsink's sink is activated its state is set to READY but it remains
unlinked. So, in order for decodebin3 to potentially reuse the context later on,
the whole playbin3 needs to have it internally stored.
2019-12-31 10:00:20 +00:00
Aaron Boxer
0fb2acab5b playbin: remove deprecated raw audio and raw video sink flags
These flags were deprecated in 2011 with commit
105da803ad

Removing these flags will simplify the logic in playbin.
2019-12-22 07:16:11 +00:00
Thibault Saunier
909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Niels De Graef
0314b482f3 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-08-27 07:31:57 +02:00
Mathieu Duponchelle
d98835fdef doc: remove xml from comments 2019-05-30 01:12:59 +02:00
Thibault Saunier
287897e465 doc: Fix some gtk-doc comments 2019-05-13 11:34:08 -04:00
Philippe Normand
610fa16784 playbin3: New text-offset property
This new property controls the synchronisation offset between the text and video
streams. Positive values make the text ahead of the video and negative values
make the text go behind the video.

https://bugzilla.gnome.org/show_bug.cgi?id=797134
2018-11-01 09:52:34 +00:00
hoonhee.lee
88196c36f1 playbin3: Collect appropriate stream-type when doing stream selection
https://bugzilla.gnome.org/show_bug.cgi?id=796193
2018-05-17 10:19:07 +01:00
Tim-Philipp Müller
b6853f783f playbin3: fix leak of recursive mutex 2018-04-12 18:12:49 +01:00
Philippe Normand
22a6287b8e playbin3: fix source-setup signal emission
Previous code would pass 0 as source element.
2018-02-14 10:23:03 +00:00
Edward Hervey
eacb7a77d2 playbin3: Re-enable buffering message handling
Buffering messages are only sent for the active group (in case there
is more than one).

If the inactive group posts buffering messages we keep the last one
around and will post it once it becomes the playing one.
2018-02-10 15:43:54 +01:00
Edward Hervey
c1e902a084 playbin3: Implement gapless playback
Similar in vein to the playbin2 architecture except that uridecodebin3
are prerolled much earlier and all streams of the same type are
fed through a 'concat' element.

This keeps the philosphy of having all elements connected as soon
as possible.

The 'about-to-finish' signal is emitted whenever one of the uridecodebin
is about to finish, allowing the users to set the next uri/suburi.

The notion of a group being active has changed. It now means that the
uridecodebin3 has been activated, but doesn't mean it is the one
currently being outputted by the sinks (i.e. curr_group and next_group).
This is done via detecting GST_MESSAGE_STREAM_START emission by playsink
and figuring out which group is really playing.

When the current group changes, a new thread is started to deactivate
the previous one and optionnaly fire 'about-to-finish'.
2018-02-10 12:24:10 +01:00
Edward Hervey
b9e73d0575 playbin3: Use uridecodebin3 and link/reconfigure immediately
Apologies for the big commit, but it wasn't really possible to split it
in anything smaller.

* Switch to uridecodebin3 instead of managing urisourcebin and decodebin3
ourselves. No major architectural change with this.

* Reconfigure sinks/outputs when needed. This is possible thanks to the
various streams-related API. Instead of blocking new pads and waiting
for a (fake) no-more-pads to decide what to connect, we instead reconfigure
playsink and the combiners to whatever types are currently selected. All of
this is done in reconfigure_output().
  New pads are immediately connected to (combiners and) sinks, allowing
immediate negotiation and usage.

* Since elements are always connected, the "cached-duration" feature is gone
and queries can reach the target elements.

* The auto-plugging related code is currently disabled entirely until
we get the new proper API.

* Store collections at the GstSourceGroup level and not globally

* And more comments a bit everywhere

NOTE: gapless is still not functional, but this opens the way to be able
to handle it in a streams-aware fashion (where several uridecodebin3 can
be active at the same time).
2018-02-10 12:24:09 +01:00
Edward Hervey
2858400608 playbin3: Remove wrong 'notify'
Those properties doesn't exist on playbin3, don't emit a notify for that
2018-02-10 12:17:39 +01:00
Edward Hervey
8386ea706f playbin3: Remove setting 'subtitle-encoding' on decodebin
That property doesn't exist
2018-02-10 12:17:39 +01:00
Edward Hervey
7b8cfb9e53 playbin3: Clarify documentation of combiner properties 2018-02-10 12:17:39 +01:00
Edward Hervey
4ed0708f78 playbin3: Remove unused define 2018-02-10 12:17:39 +01:00
Edward Hervey
fa9adbe986 playbin3: Remove unused variable
The lock is never used
2018-02-10 12:17:38 +01:00
Edward Hervey
0f51dde728 playbin3: Disable autoplug-related code
The signals were never emitted from decodebin3. This needs
switching to a new signalling system
2018-02-10 12:16:09 +01:00
Edward Hervey
29f57e23c7 playbin3: fix "no-more-pads" handling
That signal is never emitted by decodebin3 and is handled differently
2018-02-10 12:14:47 +01:00
Edward Hervey
9f1063e4a3 playbin3: Remove duration caching
This is now handled directly via sinks and queries through pads
2018-02-10 12:14:47 +01:00
Dongil Park
a8a5905ec6 playbin3: Fix accessing invalid index in GstStream when received select-stream event
If select-stream event was send to playbin3 as missing any GstStream of ES type
(V or A or TEX) of collection then, playbin will access to invalid address of
GstStream due to invalid index limit. This caused SIGSEGV.

https://bugzilla.gnome.org/show_bug.cgi?id=791638
2017-12-15 09:03:12 +01:00
Edward Hervey
6280547be7 playbin3: Remove unneeded blacklisting
Blacklisted mimetypes have been empty in almost 10 years ...
2017-11-10 17:22:36 +01:00
Edward Hervey
cd508aff97 playbin3: Remove context caching
This is now handled by the GstBin baseclass
2017-11-10 17:22:22 +01:00
Edward Hervey
3dd0888d1e playbin3: Remove source property
And instead use the "setup-source" signal. This opens the way to deal
with more than one 'source' for a given playlist entry
2017-11-10 17:06:46 +01:00
Seungha Yang
969ab3f48c playbin3: Use STREAMS_SELECTED message to update selected stream types
Application might choose only specific type among all available types
using select-streams event. In this case, it is desired that reconfigure
of playsink to clear unused stream path.

https://bugzilla.gnome.org/show_bug.cgi?id=778015
2017-10-27 09:55:59 +02:00
Seungha Yang
7a236e2302 playbin3: Delay linking text output until video stream is shown
We are not sure that which stream's collection arrives first
when there are multiple parsebins such as adaptive streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Edward Hervey
6ccba23752 playbin3: We only care about source pads going away 2017-07-18 13:05:06 +02:00
Tim-Philipp Müller
6a3640f367 playbin: minor docs fix
The "frame" property is no more, it's "sample" these days.
2017-04-28 15:54:04 +01:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Sebastian Dröge
903a8863ce playbin3/urisourcebin: Enable buffering by default
This only has effect on network streams in these elements, and by
enabling it by default we get the same behaviour as in playbin2.
2017-03-07 14:59:36 +02:00
Seungha Yang
10fe0497b2 playback: Fix leak on select_streams
Since gst_event_parse_select_streams() returns newly allocated
memory for stream-id(s), it should be freed explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=775553
2017-01-31 16:48:04 +01:00
Seungha Yang
f4d6aa7167 playbin3: Reconfigure playsink again with pad-removed
If selected streams and actived streams are matched,
do reconfigure of playsink again with pad-removed signal

https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Seungha Yang
858ee3d913 playback: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=773341
2016-12-08 16:59:07 +01:00
Wonchul Lee
08ee940de2 playbin3: remove dead code
It never reach into this code path, custom_combiner always not null
here.

https://bugzilla.gnome.org/show_bug.cgi?id=774454
2016-11-16 00:17:18 +11:00
Wonchul Lee
8b95d17f75 playbin3: Fix deadlock when adding multiple parsebin
https://bugzilla.gnome.org/show_bug.cgi?id=773131
2016-11-15 20:37:00 +11:00
Scott D Phillips
ff8d49a4c8 Use intermediate guint when handling GstVideoMultiviewFlags
The underlying integer type of the enum GstVideoMultiviewFlags is
implementation defined and may not have the same size as guint.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:51:30 +02:00
Edward Hervey
8485a8d786 playback: GstStreamType is a flag
Therefor don't use equality
2016-10-13 11:42:28 +02:00
Edward Hervey
262b9bfd07 playbin3: Remove fallback properties/signals
These can all be used via the GstStream API

https://bugzilla.gnome.org/show_bug.cgi?id=769079
2016-09-27 10:11:56 +01:00
Tim-Philipp Müller
d2e5361927 playbin3: add "element-setup" signal
Allows configuration of plugged elements.

https://bugzilla.gnome.org/show_bug.cgi?id=578933
2016-08-08 20:04:58 +01:00
Guillaume Desmottes
c1f37edfd9 playbin3: fix collection leak
The collection referenced owned by playbin3 was not released when it was
destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=769080
2016-07-25 09:02:53 +02:00
Jan Schmidt
e68c85e5a5 playback: Flesh out docs a bit for new elements
Add some more text to the docs for urisourcebin,
parsebin, decodebin3 and playbin3, including a warning
that they are unstable API for now
2016-07-22 23:21:36 +10:00
Tim-Philipp Müller
f25eee6f4b docs: add playbin3, decodebin3, parsebin, urisourcebin to docs
Docs still need some fleshing out though.
2016-07-22 12:52:12 +01:00
Guillaume Desmottes
9834782afa playbin3: fix stream leak
The stream returned by gst_message_streams_selected_get_stream() is
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=768811
2016-07-18 13:58:39 +01:00
Guillaume Desmottes
c1d55f29a1 playbin3: fix leaks of collection returned by message parse API
gst_message_parse_stream_collection() and
gst_message_parse_streams_selected() actually return a reffed
GstStreamCollection.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-07-15 16:43:07 +01:00
Edward Hervey
d514e79bee playback: New elements
With contributions from Jan Schmidt <jan@centricular.com>

* decodebin3 and playbin3 have the same purpose as the decodebin and
playbin elements, except make usage of more 1.x features and the new
GstStream API. This allows them to be more memory/cpu efficient.

* parsebin is a new element that demuxers/depayloads/parses an incoming
stream and exposes elementary streams. It is used by decodebin3.
It also automatically creates GstStream and GstStreamCollection for
elements that don't natively create them and sends the corresponding
events and messages

* Any application using playbin can use playbin3 by setting the env
variable USE_PLAYBIN3=1 without reconfiguration/recompilation.
2016-06-30 14:15:47 +02:00