mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
spa: Add SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED
This flags allows clients to use the parse_format functions and determine from their result directly if the modifer was fixated yet.
This commit is contained in:
parent
abe8c3581f
commit
0a13d37e5c
3 changed files with 14 additions and 7 deletions
|
|
@ -23,8 +23,11 @@ spa_format_video_dsp_parse(const struct spa_pod *format,
|
|||
struct spa_video_info_dsp *info)
|
||||
{
|
||||
info->flags = SPA_VIDEO_FLAG_NONE;
|
||||
if (spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) {
|
||||
const struct spa_pod_prop *mod_prop;
|
||||
if ((mod_prop = spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) != NULL) {
|
||||
info->flags |= SPA_VIDEO_FLAG_MODIFIER;
|
||||
if ((mod_prop->flags & SPA_POD_PROP_FLAG_DONT_FIXATE) == SPA_POD_PROP_FLAG_DONT_FIXATE)
|
||||
info->flags |= SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED;
|
||||
}
|
||||
|
||||
return spa_pod_parse_object(format,
|
||||
|
|
|
|||
|
|
@ -23,8 +23,11 @@ spa_format_video_raw_parse(const struct spa_pod *format,
|
|||
struct spa_video_info_raw *info)
|
||||
{
|
||||
info->flags = SPA_VIDEO_FLAG_NONE;
|
||||
if (spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) {
|
||||
const struct spa_pod_prop *mod_prop;
|
||||
if ((mod_prop = spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) != NULL) {
|
||||
info->flags |= SPA_VIDEO_FLAG_MODIFIER;
|
||||
if ((mod_prop->flags & SPA_POD_PROP_FLAG_DONT_FIXATE) == SPA_POD_PROP_FLAG_DONT_FIXATE)
|
||||
info->flags |= SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED;
|
||||
}
|
||||
|
||||
return spa_pod_parse_object(format,
|
||||
|
|
|
|||
|
|
@ -134,11 +134,12 @@ enum spa_video_format {
|
|||
* Extra video flags
|
||||
*/
|
||||
enum spa_video_flags {
|
||||
SPA_VIDEO_FLAG_NONE = 0, /**< no flags */
|
||||
SPA_VIDEO_FLAG_VARIABLE_FPS = (1 << 0), /**< a variable fps is selected, fps_n and fps_d
|
||||
* denote the maximum fps of the video */
|
||||
SPA_VIDEO_FLAG_PREMULTIPLIED_ALPHA = (1 << 1), /**< Each color has been scaled by the alpha value. */
|
||||
SPA_VIDEO_FLAG_MODIFIER = (1 << 2), /**< use the format modifier */
|
||||
SPA_VIDEO_FLAG_NONE = 0, /**< no flags */
|
||||
SPA_VIDEO_FLAG_VARIABLE_FPS = (1 << 0), /**< a variable fps is selected, fps_n and fps_d
|
||||
* denote the maximum fps of the video */
|
||||
SPA_VIDEO_FLAG_PREMULTIPLIED_ALPHA = (1 << 1), /**< Each color has been scaled by the alpha value. */
|
||||
SPA_VIDEO_FLAG_MODIFIER = (1 << 2), /**< use the format modifier */
|
||||
SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED = (1 << 3), /**< format modifier was not fixated yet */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue