mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
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:
parent
514528f2c7
commit
ff6a244d8f
45 changed files with 151 additions and 124 deletions
|
|
@ -201,7 +201,7 @@ static void update_props(struct data *data)
|
|||
|
||||
#if 1
|
||||
pod = spa_pod_builder_sequence(&b, 0,
|
||||
".", 0, SPA_CONTROL_properties,
|
||||
".", 0, SPA_CONTROL_Properties,
|
||||
SPA_POD_OBJECT(SPA_TYPE_OBJECT_Props, 0,
|
||||
":", SPA_PROP_frequency, "d", ((sin(data->freq_accum) + 1.0) * 200.0) + 440.0,
|
||||
":", SPA_PROP_volume, "d", (sin(data->volume_accum) / 2.0) + 0.5));
|
||||
|
|
|
|||
|
|
@ -360,8 +360,8 @@ static int negotiate_formats(struct data *data)
|
|||
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||
format = spa_pod_builder_object(&b,
|
||||
SPA_TYPE_OBJECT_Format, 0,
|
||||
"I", SPA_MEDIA_TYPE_binary,
|
||||
"I", SPA_MEDIA_SUBTYPE_raw);
|
||||
":", SPA_FORMAT_mediaType, "I", SPA_MEDIA_TYPE_binary,
|
||||
":", SPA_FORMAT_mediaSubtype, "I", SPA_MEDIA_SUBTYPE_raw);
|
||||
|
||||
if ((res = spa_node_port_set_param(data->sink,
|
||||
SPA_DIRECTION_INPUT, 0,
|
||||
|
|
|
|||
|
|
@ -300,8 +300,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
fmt = spa_pod_builder_object(&b,
|
||||
SPA_TYPE_OBJECT_Format, 0,
|
||||
"I", SPA_MEDIA_TYPE_video,
|
||||
"I", SPA_MEDIA_SUBTYPE_raw,
|
||||
":", SPA_FORMAT_mediaType, "I", SPA_MEDIA_TYPE_video,
|
||||
":", SPA_FORMAT_mediaSubtype, "I", SPA_MEDIA_SUBTYPE_raw,
|
||||
":", SPA_FORMAT_VIDEO_format, "Ieu", SPA_VIDEO_FORMAT_I420,
|
||||
2, SPA_VIDEO_FORMAT_I420,
|
||||
SPA_VIDEO_FORMAT_YUY2,
|
||||
|
|
@ -329,8 +329,8 @@ int main(int argc, char *argv[])
|
|||
*/
|
||||
fmt = spa_pod_builder_add(&b,
|
||||
"<", SPA_TYPE_OBJECT_Format, 0,
|
||||
"I", SPA_MEDIA_TYPE_video,
|
||||
"I", SPA_MEDIA_SUBTYPE_raw,
|
||||
":", SPA_FORMAT_mediaType, "I", SPA_MEDIA_TYPE_video,
|
||||
":", SPA_FORMAT_mediaSubtype, "I", SPA_MEDIA_SUBTYPE_raw,
|
||||
":", SPA_FORMAT_VIDEO_format, "Ieu", SPA_VIDEO_FORMAT_I420,
|
||||
2, SPA_VIDEO_FORMAT_I420,
|
||||
SPA_VIDEO_FORMAT_YUY2,
|
||||
|
|
@ -348,9 +348,9 @@ int main(int argc, char *argv[])
|
|||
do_static_struct();
|
||||
|
||||
#if 0
|
||||
printf("media type is enum %d\n", spa_type_is_a(SPA_TYPE__MediaType, SPA_TYPE_ENUM_BASE));
|
||||
printf("media type is enum %d\n", spa_type_is_a(SPA_TYPE__mediaType, SPA_TYPE_ENUM_BASE));
|
||||
printf("media sybtype is enum %d\n",
|
||||
spa_type_is_a(SPA_TYPE__MediaSubtype, SPA_TYPE_ENUM_BASE));
|
||||
spa_type_is_a(SPA_TYPE__mediaSubtype, SPA_TYPE_ENUM_BASE));
|
||||
printf("format is enum %d\n", spa_type_is_a(SPA_TYPE__Format, SPA_TYPE_ENUM_BASE));
|
||||
printf("format is pod %d\n", spa_type_is_a(SPA_TYPE__Format, SPA_TYPE_POD_BASE));
|
||||
printf("format is object %d\n", spa_type_is_a(SPA_TYPE__Format, SPA_TYPE_POD_OBJECT_BASE));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue