mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Make new USE_BUFFERS command
Make a new USE_BUFFERS command to atomically send a buffer array to the remote client. We can use this to then clean up an old array and go to the PAUSED state if possible. Work on formats. Make one structure that can hold all video formats. Work on pipeline suspend and resume. Add jpeg support to v4l2. Work on enum_formats with a filter in v4l2.
This commit is contained in:
parent
7e858ff694
commit
b67c216a04
24 changed files with 688 additions and 514 deletions
|
|
@ -76,7 +76,7 @@ struct _SpaXvSink {
|
|||
SpaEventCallback event_cb;
|
||||
void *user_data;
|
||||
|
||||
SpaVideoRawFormat raw_format[2];
|
||||
SpaFormatVideo format[2];
|
||||
SpaFormat *current_format;
|
||||
|
||||
SpaXvState state;
|
||||
|
|
@ -97,24 +97,24 @@ enum {
|
|||
|
||||
static const SpaPropInfo prop_info[] =
|
||||
{
|
||||
{ PROP_ID_DEVICE, "device", "Xv device location",
|
||||
{ PROP_ID_DEVICE, offsetof (SpaXvSinkProps, device),
|
||||
"device", "Xv device location",
|
||||
SPA_PROP_FLAG_READWRITE,
|
||||
SPA_PROP_TYPE_STRING, 63,
|
||||
SPA_PROP_RANGE_TYPE_NONE, 0, NULL,
|
||||
NULL,
|
||||
offsetof (SpaXvSinkProps, device) },
|
||||
{ PROP_ID_DEVICE_NAME, "device-name", "Human-readable name of the device",
|
||||
NULL },
|
||||
{ PROP_ID_DEVICE_NAME, offsetof (SpaXvSinkProps, device_name),
|
||||
"device-name", "Human-readable name of the device",
|
||||
SPA_PROP_FLAG_READABLE,
|
||||
SPA_PROP_TYPE_STRING, 127,
|
||||
SPA_PROP_RANGE_TYPE_NONE, 0, NULL,
|
||||
NULL,
|
||||
offsetof (SpaXvSinkProps, device_name) },
|
||||
{ PROP_ID_DEVICE_FD, "device-fd", "Device file descriptor",
|
||||
NULL },
|
||||
{ PROP_ID_DEVICE_FD, offsetof (SpaXvSinkProps, device_fd),
|
||||
"device-fd", "Device file descriptor",
|
||||
SPA_PROP_FLAG_READABLE,
|
||||
SPA_PROP_TYPE_UINT32, sizeof (uint32_t),
|
||||
SPA_PROP_RANGE_TYPE_NONE, 0, NULL,
|
||||
NULL,
|
||||
offsetof (SpaXvSinkProps, device_fd) },
|
||||
NULL },
|
||||
};
|
||||
|
||||
static SpaResult
|
||||
|
|
@ -308,12 +308,14 @@ spa_xv_sink_node_port_enum_formats (SpaNode *node,
|
|||
|
||||
switch (index) {
|
||||
case 0:
|
||||
spa_video_raw_format_init (&this->raw_format[0]);
|
||||
spa_format_video_init (SPA_MEDIA_TYPE_VIDEO,
|
||||
SPA_MEDIA_SUBTYPE_RAW,
|
||||
&this->format[0]);
|
||||
break;
|
||||
default:
|
||||
return SPA_RESULT_ENUM_END;
|
||||
}
|
||||
*format = &this->raw_format[0].format;
|
||||
*format = &this->format[0].format;
|
||||
*(int*)state = ++index;
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
|
|
@ -345,12 +347,12 @@ spa_xv_sink_node_port_set_format (SpaNode *node,
|
|||
|
||||
if (format->media_type == SPA_MEDIA_TYPE_VIDEO) {
|
||||
if (format->media_subtype == SPA_MEDIA_SUBTYPE_RAW) {
|
||||
if ((res = spa_video_raw_format_parse (format, &this->raw_format[0]) < 0))
|
||||
if ((res = spa_format_video_parse (format, &this->format[0]) < 0))
|
||||
return res;
|
||||
|
||||
f = &this->raw_format[0].format;
|
||||
tf = &this->raw_format[1].format;
|
||||
fs = sizeof (SpaVideoRawFormat);
|
||||
f = &this->format[0].format;
|
||||
tf = &this->format[1].format;
|
||||
fs = sizeof (SpaVideoFormat);
|
||||
} else
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue