mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
examples: add video upload example
Add an example of a node that makes a video available. Improve buffer reuse in stream. Add more video formats
This commit is contained in:
parent
c7333c46cc
commit
db16de85bb
16 changed files with 466 additions and 93 deletions
|
|
@ -96,6 +96,19 @@ typedef struct
|
|||
uint32_t P010_10LE;
|
||||
uint32_t IYU2;
|
||||
uint32_t VYUY;
|
||||
uint32_t GBRA;
|
||||
uint32_t GBRA_10BE;
|
||||
uint32_t GBRA_10LE;
|
||||
uint32_t GBR_12BE;
|
||||
uint32_t GBR_12LE;
|
||||
uint32_t GBRA_12BE;
|
||||
uint32_t GBRA_12LE;
|
||||
uint32_t I420_12BE;
|
||||
uint32_t I420_12LE;
|
||||
uint32_t I422_12BE;
|
||||
uint32_t I422_12LE;
|
||||
uint32_t Y444_12BE;
|
||||
uint32_t Y444_12LE;
|
||||
} SpaTypeVideoFormat;
|
||||
|
||||
static inline void
|
||||
|
|
@ -167,6 +180,19 @@ spa_type_video_format_map (SpaTypeMap *map, SpaTypeVideoFormat *type)
|
|||
type->P010_10LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__P010_10LE);
|
||||
type->IYU2 = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__IYU2);
|
||||
type->VYUY = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__VYUY);
|
||||
type->GBRA = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBRA);
|
||||
type->GBRA_10BE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBRA_10BE);
|
||||
type->GBRA_10LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBRA_10LE);
|
||||
type->GBR_12BE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBR_12BE);
|
||||
type->GBR_12LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBR_12LE);
|
||||
type->GBRA_12BE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBRA_12BE);
|
||||
type->GBRA_12LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__GBRA_12LE);
|
||||
type->I420_12BE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__I420_12BE);
|
||||
type->I420_12LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__I420_12LE);
|
||||
type->I422_12BE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__I422_12BE);
|
||||
type->I422_12LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__I422_12LE);
|
||||
type->Y444_12BE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__Y444_12BE);
|
||||
type->Y444_12LE = spa_type_map_get_id (map, SPA_TYPE_VIDEO_FORMAT__Y444_12LE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,19 @@ typedef struct _SpaVideoInfoRaw SpaVideoInfoRaw;
|
|||
#define SPA_TYPE_VIDEO_FORMAT__P010_10LE SPA_TYPE_VIDEO_FORMAT_BASE "P010_10LE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__IYU2 SPA_TYPE_VIDEO_FORMAT_BASE "IYU2"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__VYUY SPA_TYPE_VIDEO_FORMAT_BASE "VYUY"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBRA SPA_TYPE_VIDEO_FORMAT_BASE "GBRA"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBRA_10BE SPA_TYPE_VIDEO_FORMAT_BASE "GBRA_10BE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBRA_10LE SPA_TYPE_VIDEO_FORMAT_BASE "GBRA_10LE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBR_12BE SPA_TYPE_VIDEO_FORMAT_BASE "GBR_12BE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBR_12LE SPA_TYPE_VIDEO_FORMAT_BASE "GBR_12LE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBRA_12BE SPA_TYPE_VIDEO_FORMAT_BASE "GBRA_12BE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__GBRA_12LE SPA_TYPE_VIDEO_FORMAT_BASE "GBRA_12LE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__I420_12BE SPA_TYPE_VIDEO_FORMAT_BASE "I420_12BE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__I420_12LE SPA_TYPE_VIDEO_FORMAT_BASE "I420_12LE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__I422_12BE SPA_TYPE_VIDEO_FORMAT_BASE "I422_12BE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__I422_12LE SPA_TYPE_VIDEO_FORMAT_BASE "I422_12LE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__Y444_12BE SPA_TYPE_VIDEO_FORMAT_BASE "Y444_12BE"
|
||||
#define SPA_TYPE_VIDEO_FORMAT__Y444_12LE SPA_TYPE_VIDEO_FORMAT_BASE "Y444_12LE"
|
||||
|
||||
/**
|
||||
* SpaVideoFlags:
|
||||
|
|
|
|||
|
|
@ -151,16 +151,16 @@ reset_videotestsrc_props (SpaVideoTestSrc *this, SpaVideoTestSrcProps *props)
|
|||
props->pattern = this->type. DEFAULT_PATTERN;
|
||||
}
|
||||
|
||||
#define PROP(f,key,type,...) \
|
||||
#define PROP(f,key,type,...) \
|
||||
SPA_POD_PROP (f,key,0,type,1,__VA_ARGS__)
|
||||
#define PROP_MM(f,key,type,...) \
|
||||
#define PROP_MM(f,key,type,...) \
|
||||
SPA_POD_PROP (f,key,SPA_POD_PROP_RANGE_MIN_MAX,type,3,__VA_ARGS__)
|
||||
#define PROP_U_MM(f,key,type,...) \
|
||||
#define PROP_U_MM(f,key,type,...) \
|
||||
SPA_POD_PROP (f,key,SPA_POD_PROP_FLAG_UNSET | \
|
||||
SPA_POD_PROP_RANGE_MIN_MAX,type,3,__VA_ARGS__)
|
||||
#define PROP_EN(f,key,type,n,...) \
|
||||
#define PROP_EN(f,key,type,n,...) \
|
||||
SPA_POD_PROP (f,key, SPA_POD_PROP_RANGE_ENUM,type,n,__VA_ARGS__)
|
||||
#define PROP_U_EN(f,key,type,n,...) \
|
||||
#define PROP_U_EN(f,key,type,n,...) \
|
||||
SPA_POD_PROP (f,key,SPA_POD_PROP_FLAG_UNSET | \
|
||||
SPA_POD_PROP_RANGE_ENUM,type,n,__VA_ARGS__)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue