GNOME Bugzilla – Bug 770287
streams: Make construct only properties G_PARM_CONSTRUCTY_ONLY
Last modified: 2016-11-11 12:53:37 UTC
We should enforce the fact that those property are construct only instead of just document it.
Created attachment 334023 [details] [review] streams: Make construct only properties G_PARM_CONSTRUCTY_ONLY
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);
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.
Sounds like it's on purpose and there are good reasons to keep it as is.