GstBus not getting EOS Event
Luca Bacci
luca.bacci982 at gmail.com
Wed Nov 20 22:28:23 UTC 2019
I think that the problem is the on_new_sample() callback. You have to call
appsink.pull_sample() otherwise appsink accumulates all buffers passed to
it, and also accumulates the EOS event. Try changing to:
def on_new_sample(self, appsink):
sample = appsink.pull_sample()
return Gst.FlowReturn.OK
That way you are actually consuming the buffers. Then appsink can empty its
queue of buffers and process the EOS
*Note:* remember to remove the call to set_state(Gst.State.NULL):
def stopFetching(self):
print("AT THE START OF STOP FETCHING")
self._pipeline.send_event(Gst.Event.new_eos())
print("AT THE END OF STOP FETCHING")
Il giorno mer 20 nov 2019 alle ore 22:46 Luca Bacci <luca.bacci982 at gmail.com>
ha scritto:
> Uhm, sorry! I read now that the callbacks are never called even if you
> send en EOS event yourself. I'll look at it
>
> Il giorno mer 20 nov 2019 alle ore 21:54 Luca Bacci <
> luca.bacci982 at gmail.com> ha scritto:
>
>> Setting a pipeline from playing to paused, ready, or null does not send
>> an EOS event at all. If you read the documentation about states
>> <https://gstreamer.freedesktop.org/documentation/additional/design/states.html?gi-language=c>,
>> when changing from playing to paused, to ready, to null, it does not
>> mention sending a synthesized EOS event.
>>
>> The EOS event is sent, for example, when a filesrc has read all the
>> content of a file, but has nothing to do with setting a pipeline to NULL
>>
>> Hope it helps! :)
>> Luca
>>
>> Il giorno mer 20 nov 2019 alle ore 21:31 Luca Bacci <
>> luca.bacci982 at gmail.com> ha scritto:
>>
>>> Hi! What you are experiencing is expected, it's by design. Should be
>>> documented better though, because it's not really intuitive
>>>
>>> See:
>>>
>>> http://gstreamer-devel.966125.n4.nabble.com/State-changes-to-GST-STATE-NULL-not-being-communicated-td4659327.html
>>>
>>> http://gstreamer-devel.966125.n4.nabble.com/fail-to-receive-GST-MESSAGE-STATE-CHANGED-GST-STATE-NULL-of-pipeline-but-all-receive-the-msg-for-alln-td4690532.html#a4690534
>>>
>>> Il giorno mer 20 nov 2019 alle ore 15:54 ravi.modha <
>>> ravi.modha at tudip.com> ha scritto:
>>>
>>>> Could someone please help me on this as I am still stuck on it
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191120/dddcb896/attachment.html>
More information about the gstreamer-devel
mailing list