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 754819 - opusenc: critical/warning when dumping dots
opusenc: critical/warning when dumping dots
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.5.90
Other Linux
: Normal normal
: 1.5.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-10 09:04 UTC by Miguel París Díaz
Modified: 2015-09-11 21:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
opusenc: do not throw g_warning when getting deprecated properties (2.12 KB, patch)
2015-09-11 09:15 UTC, Miguel París Díaz
committed Details | Review
opusenc: improve deprecated properties doc (2.81 KB, patch)
2015-09-11 09:23 UTC, Miguel París Díaz
committed Details | Review

Description Miguel París Díaz 2015-09-10 09:04:08 UTC
Hello,
I have noticed that opusenc breaks (eg: when testing) if dumping dots (setting GST_DEBUG_DUMP_DOT_DIR env var).
This is caused because when dumping dots all properties are got and for deprecated ones g_warning is used.

Example:
Unexpected critical/warning: cbr property is deprecated; use bitrate-type instead

Source ref:
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/opus/gstopusenc.c?id=1.5.90#n1038
Comment 1 Sebastian Dröge (slomo) 2015-09-10 11:32:55 UTC
Same happens with gst-inspect of course, not sure what to do about that. Not printing the deprecated properties seems not ideal either.
Comment 2 Miguel París Díaz 2015-09-10 12:59:02 UTC
We could check if G_PARAM_DEPRECATED flag is set after getting the property.
@sebastian, what do you think about this solution?

opusenc uses this flag:
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/opus/gstopusenc.c?id=1.5.90#n316

Check the flag in debug_dump_get_element_params (the same for gst-inspect)
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstdebugutils.c?id=1.5.90#n117
Comment 3 Sebastian Dröge (slomo) 2015-09-10 18:54:05 UTC
And then do what based on that flag? Ignoring the property is not a good idea as it might contain useful information if still used by the application...
Comment 4 Jose Antonio Santos Cadenas 2015-09-10 19:27:07 UTC
Other plugins like rtpbin just notify that property is deprecated in the description, for example:

use-pipeline-clock  : Use the pipeline running-time to set the NTP time in the RTCP SR messages (DEPRECATED: Use ntp-time-source property)
                        flags: legible, escribible, deprecated
                        Boolean. Default: false

Adding a critical warning may make test fail, for example generating a dot as Miguel says.
Comment 5 Miguel París Díaz 2015-09-11 08:17:24 UTC
Taking into account all comments, I think that a good solution would be using only g_warning for set_property and not for get_property.

Why?
From my point of view, the warning makes sense only when the property is set by a user, because he wants deliberately modify the behaviour of the element.
A user that only reads the property, does not want to change de behaviour, only see the current value.
In the case of plugins description (related with reading properties), I agree with Jose, and a "deprecated" comment should be shown.

Maybe, it is not an ideal solution but is better that the current one.
Comment 6 Sebastian Dröge (slomo) 2015-09-11 08:22:13 UTC
Oh I thought the warning comes from GLib. Yes, only do a g_warning() when setting the property. There are more properties like this in opusenc IIRC.

Want to provide a patch?
Comment 7 Miguel París Díaz 2015-09-11 09:14:34 UTC
There are 2 properties:
 - constrained-vbr
 - cbr

I am attaching a patch ;)
Comment 8 Miguel París Díaz 2015-09-11 09:15:05 UTC
Created attachment 311121 [details] [review]
opusenc: do not throw g_warning when getting deprecated properties
Comment 9 Miguel París Díaz 2015-09-11 09:23:19 UTC
Created attachment 311122 [details] [review]
opusenc: improve deprecated properties doc
Comment 10 Sebastian Dröge (slomo) 2015-09-11 21:33:35 UTC
commit 25f0787c1c09757799f7f3dcc6a8cf09d69b9298
Author: Miguel París Díaz <mparisdiaz@gmail.com>
Date:   Fri Sep 11 11:22:35 2015 +0200

    opusenc: improve deprecated properties docs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754819

commit f000cd4963b810b66aa7b8969b40fcf697a05259
Author: Miguel París Díaz <mparisdiaz@gmail.com>
Date:   Fri Sep 11 11:11:09 2015 +0200

    opusenc: do not throw g_warning when getting deprecated properties
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754819