summaryrefslogtreecommitdiff
path: root/gst/playback
AgeCommit message (Collapse)AuthorFilesLines
2021-09-03decodebin3: fix unblocking on input gap eventsMathieu Duponchelle1-1/+6
Initial gap events should not be discarded on the input streams, but instead cause unblocking just as buffers do. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1239>
2021-09-02parsebin: Guess subtitle/ caps as text streamsPhilippe Normand1-0/+1
The subtitles in ogg/kate are identified using subtitle/ caps names. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1213>
2021-08-18playbin/uridecodebin: Emit source-setup signal early before doing the ↵Sebastian Dröge2-20/+34
scheduling query Some elements will require the source to be set up properly before the scheduling query returns useful results, e.g. appsrc and giostreamsrc. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1241>
2021-07-19decodebin3: improve decoder selectionMichael Olbrich1-66/+81
Currently the decoder selection is very naive: The type with the highest rank that matches the current caps is used. This works well for software decoders. The exact supported caps are always known and the static caps are defined accordingly. With hardware decoders, e.g. vaapi, the situation is different. The decoder may reject the caps later during a caps query. At that point, a new decoder is created. However, the same type is chosen an after several tries, decodebin fails. To avoid this, do the caps query while adding the decoder and try again with other decoder types if the query fails: 1. create the decoder from the next matching type 2. add and link the decoder 3. change the decoder state to READY 4. do the caps query if it fails then remove the decoder again and go back to 1. 5. expose the source pad 6. sync the decoder state with the parent. This way, the decoder is already part of the pipeline when the state change to READY happens. So context handling should work as before. Exposing the source pad after the query was successful is important: Otherwise the thread from the decoder source pad may block in a blocked pad downstream in the playsink waiting for other pads to be ready. The thread now blocks trying to set the state back to NULL while holding the SELECTION_LOCK. Other streams may block on the SELECTION_LOCK and the playsink never unblocks the pad. The result is a deadlock. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1201>
2021-05-13playback: Handle sources with dynamic pads and pads already presentThibault Saunier1-66/+70
In case we already have a pad but more might be added later we were ignoring the new pads added later, we should track the element new pads and expose them as they are added. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1120>
2021-05-13playback: Stop giving "source" as name to sourcesThibault Saunier1-1/+1
This makes it very hard to understand what source we are talking about Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1120>
2021-05-05Use gst_element_request_pad_simple...François Laignel6-10/+13
Instead of the deprecated gst_element_get_request_pad.
2021-04-21uridecodebin: Don't force floating reference for future reusable decodebinSeungha Yang1-2/+9
uridecodebin assumes that refcount of decodebins stored in pending_decodebins are floating but it might not be true in case that refcount of the decodebin was touched in other places. To avoid the floating refcount issue, hold strong reference. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1113>
2021-04-21uridecodebin: Use gst_object_ref instead of g_object_refSeungha Yang1-1/+1
It's more debugging friendly (tracer for example) Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1113>
2021-04-12playbin{2,3}: fix base_time selection when flush seeking liveMathieu Duponchelle2-6/+44
This is a direct translation of <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/429>, as playbin{2,3} insulates its sub groups state changes from the pipeline base class, it needs to track whether the subgroup is live itself, and handle RESET_TIME the same way GstPipeline does. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1104>
2021-03-26playback: Don't special-case G_SIGNAL_RUN_CLEANUP stage in signal accumulatorsSebastian Dröge5-34/+17
All these signals don't run the class handler in the CLEANUP stage. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1076>
2021-03-25decodebin3: Don't insert duplicated streams in collectionEdward Hervey1-1/+3
Filter out the ones which are already present. Can happen with several input stream which have identical collections Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1083>
2021-03-25parsebin: Put stream flags in GstStreamEdward Hervey1-1/+3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1082>
2021-03-25decodebin3: Make input activation "atomic"Edward Hervey1-1/+9
When adding inputs dynamically, we need to make sure the new parsebin are added *and* activated by the same thread (by taking the state change lock). The rationale for this is that the calling thread might be an upstream streaming thread and when activating parsebin it might call back upstream. If we don't use the same thread (ex: when the application does a state change on decodebin3 between the moment we add parsebin to decodebin3 and we synchronize the state of parsebin) then we would end up in different threads trying to take upstream recursive locks. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/932>
2021-03-19gst: don't use volatile to mean atomicMatthew Waters1-2/+2
volatile is not sufficient to provide atomic guarantees and real atomics should be used instead. GCC 11 has started warning about using volatile with atomic operations. https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1073>
2021-03-16playback: element_init returns voidStéphane Cerveau3-4/+4
no need to return boolean as it will be always TRUE. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-10playback: remove useless ret testStéphane Cerveau11-10/+11
Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific init needs to be tested before registering the element. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
2021-02-19decodebin3: change stream selection message ownerStéphane Cerveau1-1/+1
In order to select the streams on GST_MESSAGE_STREAM_COLLECTION, the app needs to send the select-streams event to the decodebin and not to the parsebin. The message should be always owned by the decodebin. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1014>
2021-02-16uridecodebin3: make caps property workTim-Philipp Müller1-0/+3
The caps set on uridecodebin3 via the "caps" property were never passed to the internal decodebin3, so did absolutely nothing. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/837 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1034>
2020-12-24decodebin3: When reconfiguring a slot make sure that the ghostpad is unlinkedSebastian Dröge1-0/+9
This was only taken care of previously if there was a decoder before. However if previously a decoder was not needed then the ghostpad would've been linked directly to the slot's srcpad. Reconfiguring the slot requires this to be undone so that linking can happen normally. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/985>
2020-12-11decodebin3: Release selection lock when pushing EOSEdward Hervey1-5/+22
We can't keep the lock otherwise this would lock other actions. In order to keep it safe, we grab a list of peer pads to send EOS to with the lock taken, then send to the peer pads with the lock released. Also make sure the selection lock is taken for another call to this function Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/847 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/971>
2020-12-10playback: allow per feature registrationStéphane Cerveau18-332/+246
Split plugin into features including elements and device providers which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
2020-11-20decodebin3: Take into account decoder latency for interleave sizeEdward Hervey1-0/+75
Some decoders might introduce quite large latencies, which would result in multiqueue draining out on some streams. In order to avoid that, check the latency of decoders and adjust the minimum interleave time of multiqueue accordingly. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/800 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/931>
2020-11-19decodebin3: Don't leak filter capsEdward Hervey1-1/+3
Introduced by previous commit See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/934>
2020-11-19decodebin3: Properly handle caps query with no filterEdward Hervey1-0/+4
There's no guarantee that upstream elements will do queries with specified filter caps. If that's the case, just return GST_CAPS_ANY Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933>
2020-10-22urisourcebin: Fix crash caused by use after freeSeungha Yang1-2/+1
OutputSlotInfo doesn't hold ref of queue, so gst_bin_remove() will free the queue memory. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/888>
2020-10-19decodebin3: Store stream-start event on output pad before exposing itSeungha Yang2-0/+26
It's required for users to be able to figure out associated GstStream object with a pad on pad-added callback. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/880>
2020-10-14uridecodebin3: Forward upstream events to decodebin3 directlySeungha Yang1-0/+14
Otherwise default handler will try to forward it to sink element or srcpad which might not be available at that moment. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/867>
2020-10-10decodebin3: only force streams-selected seqnum after a select-streamsFrançois Laignel1-1/+3
The initial streams-selected message might not match any select-streams, in which case it is currently overriden with GST_SEQNUM_INVALID. Related to: - https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/601 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/860>
2020-07-07playback: Clarify flag usage for playbin3Edward Hervey1-1/+2
Forcing software-decoder has no effect on playbin3 now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/738>
2020-07-07Revert "playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS"Edward Hervey3-83/+9
This reverts commit f4bcf8290b3568690dacf0dac95af7f7036f7110. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/738>
2020-07-07decodebin3: Only override the selection if neededEdward Hervey3-3/+27
Whenever a new collection is calculated, the internal `select_streams_seqnum` variable is reset. This ensures that we reliably know whether a select-streams event has been received for that new collection. Use that to decide whether we should add previously un-selected streams or new streams in the current selection Fixes #784 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/733>
2020-06-22Don't call gst_ghost_pad_construct() anymoreSebastian Dröge2-2/+0
It's deprecated, unneeded and doesn't do anything anymore. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/717>
2020-06-11decodebin3: Lower error message to debugThibault Saunier1-1/+1
Debugging leftover Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/699>
2020-06-08uridecodebin3: Let decodebin do its stream selection if no one answersThibault Saunier1-0/+10
If no one answers our `select-stream` signal, uridecodebin3 should behave the same way as `decodebin3` and let decodebin do its own stream selection. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/666>
2020-06-08decodebin3: Avoid overriding explicit user selectionThibault Saunier1-10/+16
In case the user set a list of streams to select or answer explicitly to all 'select-stream' event, we should respect his choice and not try to add a stream per type. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/666>
2020-06-06playbin: Fix wrong AV element pair selection when rank is very large valueSeungha Yang2-8/+8
If user set very high rank to an element (e.g., integer max), integer overflow can happen while multiplication operation Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/690>
2020-06-06plugins: uddate gst_type_mark_as_plugin_api() callsMathieu Duponchelle3-3/+3
2020-06-05uridecodebin: Dont link random padsEdward Hervey1-2/+6
When linking source pads to decodebin, make sure we use the *specified* new source pad and not some random one. This avoids ending up with source pads being unlinked. Main cause of random timeouts with rtsp change_state_intensive validate tests Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/687>
2020-06-03plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin typesMathieu Duponchelle3-0/+6
2020-05-27decodebin: only emit 'drained' signal when top chain is draineduno200011-1/+1
Without this, decodebin emits 'drained' multiple times which then causes (uri)playbin to emit 'about-to-finish' multiple times for for file types. Fixes #751 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/673>
2020-04-10uridecodebin3: Activate suburi playback itemPhilippe Normand1-10/+34
The suburi playback item has to be activated after the main playback item so that playsink can properly enable text rendering. Fixes #451
2020-01-27decodebin3: Reset main group id on PAUSED->READY state changeDimitrios Katsaros1-0/+2
The main_input stream-id would not get reset when going to READY state. This would cause warnings when trying to reuse the same decodebin3, since you would get a new STREAM_START event with a new stream-id, which would collide with the now stale stream-id
2020-01-27decodebin3: Reduced logging level of messagesDimitrios Katsaros1-2/+2
The logging is set to warning for a drain event, which is part of the normal functionality of the parsebin.
2020-01-17uridecodebin3: Fixed defauts not being set on initializationDimitrios Katsaros1-2/+9
The default values were not being set on element initialization. This was a problem for buffer_duration and buffer_size since they would be zero initialized, rather then being set to -1. This would cause the underlaying queue2 element to have no limits and depending on the streamed file, could cause queue2 to allocate massive amounts of memory.
2020-01-09playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERSVíctor Manuel Jáquez Leal3-9/+83
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-09playbin2: handle GST_PLAY_FLAG_FORCE_SW_DECODERSVíctor Manuel Jáquez Leal3-7/+108
Added `force-sw-decoders` boolean property in decodebin2 and uridecodebin. By default the property is %FALSE and it bypass the new code. Otherwise the factory list is filtered removing decoders within 'Hardware' class. uridecodebin sets the `force-sw-decoders` property in its internal decodebin, and also filters out Hardware class in the autoplug-factories default signal handler. playbin2 adds by default GST_PLAY_FLAG_FORCE_SW_DECODERS it its flags property, and depending on it playbin2 sets the `force-sw-decoders` property on its internal uridecodebin, also filters out the Hardware class decoding decoders at the autoplug-factories signal handler.
2020-01-09playback: add GST_PLAY_FLAG_FORCE_SW_DECODERS enumVíctor Manuel Jáquez Leal2-0/+5
This flag would be common either for playbin2 and playbin3.
2019-12-31playbin3: Propagate sink contextPhilippe Normand1-0/+7
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-31playbin: Propagate sink contextSeungha Yang1-0/+30
Any contexts created by sink during activation need to be propagated to whole elements of playbin.