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 786135 - vpxenc: negotiate once, from handle_frame.
vpxenc: negotiate once, from handle_frame.
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-10 23:52 UTC by Mathieu Duponchelle
Modified: 2017-08-11 19:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vpxenc: negotiate once, from handle_frame. (2.93 KB, patch)
2017-08-10 23:52 UTC, Mathieu Duponchelle
none Details | Review
vpxenc: negotiate once, from handle_frame. (2.98 KB, patch)
2017-08-11 01:46 UTC, Mathieu Duponchelle
none Details | Review

Description Mathieu Duponchelle 2017-08-10 23:52:19 UTC
Negotiating the output format whenever set_format was called
was causing not negotiated errors in gst-validate tests:

https://ci.gstreamer.net/job/GStreamer-master-meson-validate/1498/#showFailuresLink
Comment 1 Mathieu Duponchelle 2017-08-10 23:52:23 UTC
Created attachment 357364 [details] [review]
vpxenc: negotiate once, from handle_frame.
Comment 2 Thibault Saunier 2017-08-11 00:31:05 UTC
Review of attachment 357364 [details] [review]:

Why do you need to move that code to handle_frame?

::: ext/vpx/gstvpxenc.c
@@ +1881,3 @@
+    gst_video_codec_state_unref (output_state);
+
+    vpx_enc_class->set_stream_info (encoder, caps, &encoder->input_state->info);

encoder->negotiated = gst_video_encoder_negotiate (GST_VIDEO_ENCODER (encoder)); ?
Comment 3 Mathieu Duponchelle 2017-08-11 00:40:14 UTC
(In reply to Thibault Saunier from comment #2)
> Review of attachment 357364 [details] [review] [review]:
> 
> Why do you need to move that code to handle_frame?
> 

I don't think it's really necessary, to be honest I just looked at theoraenc, which I knew didn't exhibit the issue, and emulated its negotiation mechanism.
Comment 4 Mathieu Duponchelle 2017-08-11 01:46:54 UTC
Created attachment 357374 [details] [review]
vpxenc: negotiate once, from handle_frame.

Negotiating the output format whenever set_format was called
was causing not negotiated errors in gst-validate tests:

https://ci.gstreamer.net/job/GStreamer-master-meson-validate/1498/#showFailuresLink
Comment 5 Sebastian Dröge (slomo) 2017-08-11 07:29:59 UTC
Why was it causing not-negotiated errors and why was set_format() called multiple times? That seems to be the real problem here :)
Comment 6 Mathieu Duponchelle 2017-08-11 13:39:43 UTC
(In reply to Sebastian Dröge (slomo) from comment #5)
> Why was it causing not-negotiated errors and why was set_format() called
> multiple times? That seems to be the real problem here :)

Valid questions, I'll look into a definite explanation later today, the pipeline that allows reproducing this is pretty large and dynamic so the exact chain of events isn't yet entirely clear to me
Comment 7 Mathieu Duponchelle 2017-08-11 19:01:07 UTC
The issue I had was actually caused by https://bugzilla.gnome.org/show_bug.cgi?id=786172 . set_format was called multiple times because upstream was led into thinking that it could pick whatever colorimetry / chroma-site it wanted, even though there was a capsfilter downstream with its video caps fully specified (encodebin->outfilter).

Closing as NOTABUG.