mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Add h264 format
Improve format support Remove the type from the value because we can find that from the property info.
This commit is contained in:
parent
648e5a299b
commit
829adbab59
19 changed files with 363 additions and 309 deletions
|
|
@ -97,18 +97,28 @@ typedef enum {
|
|||
SPA_PROP_RANGE_TYPE_FLAGS,
|
||||
} SpaPropRangeType;
|
||||
|
||||
/**
|
||||
* SpaPropValue:
|
||||
* @size: the property size
|
||||
* @value: the property value.
|
||||
*
|
||||
* The structure to set and get properties.
|
||||
*/
|
||||
typedef struct {
|
||||
size_t size;
|
||||
const void *value;
|
||||
} SpaPropValue;
|
||||
|
||||
/**
|
||||
* SpaPropRangeInfo:
|
||||
* @name: name of this value
|
||||
* @description: user visible description of this value
|
||||
* @size: the size of value
|
||||
* @value: a possible value
|
||||
* @val: the value
|
||||
*/
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const char *description;
|
||||
size_t size;
|
||||
const void *value;
|
||||
SpaPropValue val;
|
||||
} SpaPropRangeInfo;
|
||||
|
||||
/**
|
||||
|
|
@ -139,20 +149,6 @@ typedef struct {
|
|||
const char **tags;
|
||||
} SpaPropInfo;
|
||||
|
||||
/**
|
||||
* SpaPropValue:
|
||||
* @type: a property type
|
||||
* @size: the property size
|
||||
* @value: the property value.
|
||||
*
|
||||
* The structure to set and get properties.
|
||||
*/
|
||||
typedef struct {
|
||||
SpaPropType type;
|
||||
size_t size;
|
||||
const void *value;
|
||||
} SpaPropValue;
|
||||
|
||||
/**
|
||||
* SpaProps:
|
||||
* @n_prop_info: number of elements in @prop_info
|
||||
|
|
|
|||
|
|
@ -24,11 +24,33 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _SpaVideoInfoH264 SpaVideoInfoH264;
|
||||
typedef struct _SpaVideoInfoMJPG SpaVideoInfoMJPG;
|
||||
|
||||
#include <spa/format.h>
|
||||
#include <spa/video/format.h>
|
||||
|
||||
typedef enum {
|
||||
SPA_H264_STREAM_FORMAT_UNKNOWN = 0,
|
||||
SPA_H264_STREAM_FORMAT_AVC,
|
||||
SPA_H264_STREAM_FORMAT_AVC3,
|
||||
SPA_H264_STREAM_FORMAT_BYTESTREAM
|
||||
} SpaH264StreamFormat;
|
||||
|
||||
typedef enum {
|
||||
SPA_H264_ALIGNMENT_UNKNOWN = 0,
|
||||
SPA_H264_ALIGNMENT_AU,
|
||||
SPA_H264_ALIGNMENT_NAL
|
||||
} SpaH264Alignment;
|
||||
|
||||
struct _SpaVideoInfoH264 {
|
||||
SpaRectangle size;
|
||||
SpaFraction framerate;
|
||||
SpaFraction max_framerate;
|
||||
SpaH264StreamFormat stream_format;
|
||||
SpaH264Alignment alignment;
|
||||
};
|
||||
|
||||
struct _SpaVideoInfoMJPG {
|
||||
SpaRectangle size;
|
||||
SpaFraction framerate;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ extern "C" {
|
|||
typedef struct _SpaFormatVideo SpaFormatVideo;
|
||||
|
||||
typedef enum {
|
||||
SPA_PROP_ID_VIDEO_FORMAT = SPA_PROP_ID_MEDIA_CUSTOM_START,
|
||||
SPA_PROP_ID_VIDEO_INFO = SPA_PROP_ID_MEDIA_CUSTOM_START,
|
||||
SPA_PROP_ID_VIDEO_FORMAT,
|
||||
SPA_PROP_ID_VIDEO_SIZE,
|
||||
SPA_PROP_ID_VIDEO_FRAMERATE,
|
||||
SPA_PROP_ID_VIDEO_MAX_FRAMERATE,
|
||||
|
|
@ -45,8 +46,10 @@ typedef enum {
|
|||
SPA_PROP_ID_VIDEO_COLOR_MATRIX,
|
||||
SPA_PROP_ID_VIDEO_TRANSFER_FUNCTION,
|
||||
SPA_PROP_ID_VIDEO_COLOR_PRIMARIES,
|
||||
SPA_PROP_ID_VIDEO_INFO_RAW,
|
||||
SPA_PROP_ID_VIDEO_INFO_MJPG,
|
||||
SPA_PROP_ID_VIDEO_PROFILE,
|
||||
SPA_PROP_ID_VIDEO_LEVEL,
|
||||
SPA_PROP_ID_VIDEO_STREAM_FORMAT,
|
||||
SPA_PROP_ID_VIDEO_ALIGNMENT,
|
||||
} SpaPropIdVideo;
|
||||
|
||||
SpaResult spa_prop_info_fill_video (SpaPropInfo *info,
|
||||
|
|
@ -63,6 +66,7 @@ struct _SpaFormatVideo {
|
|||
SpaFormat format;
|
||||
union {
|
||||
SpaVideoInfoRaw raw;
|
||||
SpaVideoInfoH264 h264;
|
||||
SpaVideoInfoMJPG mjpg;
|
||||
} info;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue