After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747534 - vp8dec: add deadline option
vp8dec: add deadline option
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-08 21:43 UTC by Cecill Etheredge (ijsf)
Modified: 2018-11-03 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that adds deadline option to gstvp8dec (3.71 KB, patch)
2015-04-08 21:43 UTC, Cecill Etheredge (ijsf)
needs-work Details | Review
rev 2 (3.92 KB, patch)
2015-04-09 10:11 UTC, Cecill Etheredge (ijsf)
none Details | Review

Description Cecill Etheredge (ijsf) 2015-04-08 21:43:50 UTC
Created attachment 301163 [details] [review]
Patch that adds deadline option to gstvp8dec

This patch adds support for a "deadline" option in vp8dec, similar to that in gstvp8dec.

This option is required to force the deadline to real-time (VPX_DL_REALTIME) in applications where real-time video is essential, e.g. in OpenWebRTC.

I have tested and verified that the calculated deadline is actually 0 in the case of OpenWebRTC, and should be 1. By adding this option, the deadline can be overruled from the application end.
Comment 1 Olivier Crête 2015-04-08 22:20:20 UTC
Review of attachment 301163 [details] [review]:

I'm curious why the default doesn't work? It should try to push it in time for the sink ?

::: ext/vpx/gstvp8dec.c
@@ +232,3 @@
+    case PROP_DEADLINE:
+      dec->deadline = g_value_get_int64 (value);
+      break;

Please also add the counterpart to get_property()

@@ +528,3 @@
 
+  if (dec->deadline) {
+    // Deadline is overwritten by property

Pleaser no C++ comment, use /* */ comments instead.

::: ext/vpx/gstvp8dec.h
@@ +39,3 @@
 #endif
 
+#include <vpx/vpx_encoder.h>

Why include the encoder header here ?!
Comment 2 Sebastian Dröge (slomo) 2015-04-09 02:02:00 UTC
Review of attachment 301163 [details] [review]:

::: ext/vpx/gstvp8dec.c
@@ +532,3 @@
   } else {
+    // Automatically determine deadline
+    deadline = gst_video_decoder_get_max_decode_time (decoder, frame);

Maybe this should be all automatic? If we're in a live pipeline, chances are good that we want realtime and nothing else. So maybe no need for a new property?
Comment 3 Olivier Crête 2015-04-09 02:31:47 UTC
@slomo: Using the qos events to get the deadline from the sink is already what it does? I assume for some reason it doesn't work well enough ?
Comment 4 Sebastian Dröge (slomo) 2015-04-09 02:40:49 UTC
QoS does not work very well for live pipelines in my experience, but didn't look closer into that.

But here it seemed to work well, it resulted in "0" as the deadline... but unfortunately 0 has a special meaning (no deadline IIRC, or something silly like that) in libvpx, and we want 1 (which has another special meaning: realtime). My suggestion was to use the live boolean from the LATENCY query here to always set 1 (aka REALTIME), but maybe we can also just to MAX(1, deadline) instead.
Comment 5 Olivier Crête 2015-04-09 03:05:01 UTC
when interpreting the QoS, possibly one needs to take the latency into account in a live pipeline? Or possibly, just ignore the QoS entirely and derive the deadline from the latency, timestamp and the clock?
Comment 6 Sebastian Dröge (slomo) 2015-04-09 03:22:28 UTC
Sounds sensible, yes. Someone needs to implement that and do some testing to see what actually works best :)
Comment 7 Tim-Philipp Müller 2015-04-09 08:45:44 UTC
Also see bug #640610 for latency and QoS events..
Comment 8 Cecill Etheredge (ijsf) 2015-04-09 10:11:53 UTC
Created attachment 301194 [details] [review]
rev 2

Patch has been updated.
Comment 9 Sebastian Dröge (slomo) 2015-04-26 18:25:43 UTC
See comment 4 and comment 5
Comment 10 GStreamer system administrator 2018-11-03 14:59:34 UTC
-- 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-good/issues/178.