GNOME Bugzilla – Bug 752883
vtdec: error on returning from iOS background
Last modified: 2018-11-03 13:39:06 UTC
Upon returning from iOS background during a running "vtdec" pipeline, we get: GST_VIDEO_DECODER_ERROR (vtdec, 1, STREAM, DECODE, (NULL), ("VTDecompressionSessionDecodeFrame returned %d", (int) status), ret); where status == kVTInvalidSessionErr == -12903. This produces a pipeline error and causes the source to stop. This is highly undesirable everywhere, and in particular in an RTC app where stopping the source task causes data loss. There's a similar Chromium bug. We can see what they did. https://code.google.com/p/chromium/issues/detail?id=477895
This is the relevant Chromium commit: https://chromium.googlesource.com/chromium/src.git/+/5f83e5beada49c0c18e2162478992098f4f3323d%5E%21/#F0 Here is Chromium's sample on how to intercept iOS power events: https://chromium.googlesource.com/chromium/src.git/+/5f83e5beada49c0c18e2162478992098f4f3323d/base/power_monitor/power_monitor_device_source_ios.mm
I didn't look in detail, but indeed it seems something we need to do. I believe this is the same for the EAGL issues, would be nice to mention this on the other bug too.
I'll fix this and the same issue as it arises in VTenc. The solution I've chosen is to mark the session as needing to be recreated when the vtenc/vtdec goes from PLAYING -> PAUSED. And then when it next goes from PAUSED -> PLAYING recreate the session. The user is then responsible for calling element_set_state(paused) and element_set_state(playing) in the app delegate.
(In reply to Nick Kallen from comment #3) > I'll fix this and the same issue as it arises in VTenc. > > The solution I've chosen is to mark the session as needing to be recreated > when the vtenc/vtdec goes from PLAYING -> PAUSED. And then when it next goes > from PAUSED -> PLAYING recreate the session. > > The user is then responsible for calling element_set_state(paused) and > element_set_state(playing) in the app delegate. Did you ever come up with a patch for that?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/288.