mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-26 07:00:13 -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
|
|
@ -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