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 770287 - streams: Make construct only properties G_PARM_CONSTRUCTY_ONLY
streams: Make construct only properties G_PARM_CONSTRUCTY_ONLY
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-23 16:40 UTC by Thibault Saunier
Modified: 2016-11-11 12:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
streams: Make construct only properties G_PARM_CONSTRUCTY_ONLY (2.07 KB, patch)
2016-08-23 16:40 UTC, Thibault Saunier
none Details | Review

Description Thibault Saunier 2016-08-23 16:40:05 UTC
We should enforce the fact that those property are construct only instead of
just document it.
Comment 1 Thibault Saunier 2016-08-23 16:40:09 UTC
Created attachment 334023 [details] [review]
streams: Make construct only properties G_PARM_CONSTRUCTY_ONLY
Comment 2 Tim-Philipp Müller 2016-08-23 16:55:46 UTC
In that case we should probably get rid of these two functions as well?

void gst_stream_set_stream_flags (GstStream *stream, GstStreamFlags flags);

void gst_stream_set_stream_type (GstStream *stream, GstStreamType stream_type);
Comment 3 Edward Hervey 2016-08-24 06:23:57 UTC
There are actually cases where it helps for them to not be immutable.

Until an element actually "pushes out" the GstStream object (via messages or events), it can still change its properties.

An example is creating the GstStream object very early on, and then refining the information as you discover it (which might be in a later stage in that element).

Furthermore, you can (as an element) subclass GstStream (avoiding duplicating all the information present in it). Making those properties construct-only might make life harder in those cases.
Comment 4 Tim-Philipp Müller 2016-11-11 12:53:37 UTC
Sounds like it's on purpose and there are good reasons to keep it as is.