Make media type and subtype properties

This is easier to debug and we only want properties in objects
in the future.
This commit is contained in:
Wim Taymans 2018-08-29 18:08:52 +02:00
parent 514528f2c7
commit ff6a244d8f
45 changed files with 151 additions and 124 deletions

View file

@ -101,7 +101,7 @@ static void fill_item(struct impl *this, struct item *item, struct udev_device *
"<", SPA_TYPE_OBJECT_MonitorItem, 0,
":", SPA_MONITOR_ITEM_id, "s", udev_device_get_syspath(item->udevice),
":", SPA_MONITOR_ITEM_flags, "I", SPA_MONITOR_ITEM_FLAG_NONE,
":", SPA_MONITOR_ITEM_state, "I", SPA_MONITOR_ITEM_STATE_AVAILABLE,
":", SPA_MONITOR_ITEM_state, "I", SPA_MONITOR_ITEM_STATE_Available,
":", SPA_MONITOR_ITEM_name, "s", name,
":", SPA_MONITOR_ITEM_class, "s", "Video/Source",
":", SPA_MONITOR_ITEM_factory, "p", SPA_TYPE_INTERFACE_HandleFactory, &spa_v4l2_source_factory,

View file

@ -395,8 +395,8 @@ static int port_get_format(struct spa_node *node,
spa_pod_builder_push_object(builder, SPA_TYPE_OBJECT_Format, SPA_PARAM_Format);
spa_pod_builder_add(builder,
"I", port->current_format.media_type,
"I", port->current_format.media_subtype, 0);
":", SPA_FORMAT_mediaType, "I", port->current_format.media_type,
":", SPA_FORMAT_mediaSubtype, "I", port->current_format.media_subtype, 0);
switch (port->current_format.media_subtype) {
case SPA_MEDIA_SUBTYPE_raw:

View file

@ -676,8 +676,8 @@ spa_v4l2_enum_format(struct impl *this,
spa_pod_builder_push_object(builder, SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat);
spa_pod_builder_add(builder,
"I", info->media_type,
"I", info->media_subtype, 0);
":", SPA_FORMAT_mediaType, "I", info->media_type,
":", SPA_FORMAT_mediaSubtype, "I", info->media_subtype, 0);
if (info->media_subtype == SPA_MEDIA_SUBTYPE_raw) {
spa_pod_builder_add(builder,