Description
PipelineManager::get_element_property in gst/pipeline/properties.rs dispatches on the property's GType name, and its enum arm matches the literal string "GEnum":
let type_name = pspec.value_type().name();
let value = match type_name.to_string().as_str() {
"gchararray" => { ... }
"gboolean" => { ... }
...
"GEnum" => {
// Get enum as string
...
}
_ => {
return Err(PipelineError::InvalidProperty {
...
reason: format!("Unsupported property type: {}", type_name),
});
}
};
An element's enum property reports its own GType name — GstVideoTestSrcPattern, GstDeinterlaceModes, GstRTSPLowerTrans — never "GEnum". So the arm is dead and every enum property falls through to the _ arm.
The pad version of the same function, a few hundred lines down in the same file, gets it right:
_ => {
// Check if it's an enum type
if pspec.value_type().is_a(glib::Type::ENUM) {
Expected Behavior
GET /api/flows/{flow_id}/elements/{element_id}/properties returns enum properties (as their nick string, matching the pad path), and .../properties/{name} for a single enum property returns its value.
Actual Behavior
get_element_property returns InvalidProperty { reason: "Unsupported property type: GstVideoTestSrcPattern" }. get_element_properties swallows that — it does if let Ok(value) = self.get_element_property(...) — so enum properties are silently absent from the response rather than reported as an error. A client reading back videotestsrc's pattern gets a map that simply does not contain it.
Steps to Reproduce
- Start a flow containing a
videotestsrc.
GET /api/flows/{flow_id}/elements/{element_id}/properties.
pattern is missing from the returned map, while num-buffers, is-live and the rest are present.
Additional Context
Read-path only — there is no panic in it, which is why #724 deliberately left it alone (it would change what the API returns, so it wants its own PR and its own openapi/contract consideration). Filed so it does not get lost.
The fix is presumably to replace the "GEnum" arm with the value_type().is_a(glib::Type::ENUM) check the pad path already uses. Note the two paths currently disagree on the representation — the element path's dead arm was written to return enum_value.name() (e.g. GST_VIDEO_TEST_SRC_SNOW), the pad path returns enum_val.nick() (e.g. snow). Nicks are what the write path accepts, so they are the ones worth converging on.
Environment
- OS: macOS 26.6.2 (arm64)
- Strom version: 0.6.8
- GStreamer version: 1.28.6
Description
PipelineManager::get_element_propertyingst/pipeline/properties.rsdispatches on the property's GType name, and its enum arm matches the literal string"GEnum":An element's enum property reports its own GType name —
GstVideoTestSrcPattern,GstDeinterlaceModes,GstRTSPLowerTrans— never"GEnum". So the arm is dead and every enum property falls through to the_arm.The pad version of the same function, a few hundred lines down in the same file, gets it right:
Expected Behavior
GET /api/flows/{flow_id}/elements/{element_id}/propertiesreturns enum properties (as their nick string, matching the pad path), and.../properties/{name}for a single enum property returns its value.Actual Behavior
get_element_propertyreturnsInvalidProperty { reason: "Unsupported property type: GstVideoTestSrcPattern" }.get_element_propertiesswallows that — it doesif let Ok(value) = self.get_element_property(...)— so enum properties are silently absent from the response rather than reported as an error. A client reading backvideotestsrc'spatterngets a map that simply does not contain it.Steps to Reproduce
videotestsrc.GET /api/flows/{flow_id}/elements/{element_id}/properties.patternis missing from the returned map, whilenum-buffers,is-liveand the rest are present.Additional Context
Read-path only — there is no panic in it, which is why #724 deliberately left it alone (it would change what the API returns, so it wants its own PR and its own openapi/contract consideration). Filed so it does not get lost.
The fix is presumably to replace the
"GEnum"arm with thevalue_type().is_a(glib::Type::ENUM)check the pad path already uses. Note the two paths currently disagree on the representation — the element path's dead arm was written to returnenum_value.name()(e.g.GST_VIDEO_TEST_SRC_SNOW), the pad path returnsenum_val.nick()(e.g.snow). Nicks are what the write path accepts, so they are the ones worth converging on.Environment