mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-30 11:08:55 -05:00
video: add video format
start working on v4l2 source
This commit is contained in:
parent
3c029cba53
commit
beedb65f00
25 changed files with 1878 additions and 43 deletions
|
|
@ -25,6 +25,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include <spa/format.h>
|
||||
#include <spa/audio/raw.h>
|
||||
|
||||
typedef struct _SpaAudioRawFormat SpaAudioRawFormat;
|
||||
|
||||
typedef enum {
|
||||
SPA_PROP_ID_AUDIO_FORMAT = SPA_PROP_ID_MEDIA_CUSTOM_START,
|
||||
|
|
@ -36,6 +39,16 @@ typedef enum {
|
|||
SPA_PROP_ID_AUDIO_RAW_INFO,
|
||||
} SpaPropIdAudio;
|
||||
|
||||
struct _SpaAudioRawFormat {
|
||||
SpaFormat format;
|
||||
uint32_t unset_mask;
|
||||
SpaAudioRawInfo info;
|
||||
};
|
||||
|
||||
SpaResult spa_audio_raw_format_init (SpaAudioRawFormat *format);
|
||||
SpaResult spa_audio_raw_format_parse (const SpaFormat *format,
|
||||
SpaAudioRawFormat *rawformat);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
|
|
|||
|
|
@ -25,12 +25,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef struct _SpaAudioRawInfo SpaAudioRawInfo;
|
||||
typedef struct _SpaAudioRawFormat SpaAudioRawFormat;
|
||||
|
||||
#include <endian.h>
|
||||
|
||||
#include <spa/audio/format.h>
|
||||
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
#define _SPA_AUDIO_FORMAT_NE(fmt) SPA_AUDIO_FORMAT_ ## fmt ## BE
|
||||
#define _SPA_AUDIO_FORMAT_OE(fmt) SPA_AUDIO_FORMAT_ ## fmt ## LE
|
||||
|
|
@ -141,16 +138,6 @@ struct _SpaAudioRawInfo {
|
|||
uint32_t channel_mask;
|
||||
};
|
||||
|
||||
struct _SpaAudioRawFormat {
|
||||
SpaFormat format;
|
||||
uint32_t unset_mask;
|
||||
SpaAudioRawInfo info;
|
||||
};
|
||||
|
||||
SpaResult spa_audio_raw_format_init (SpaAudioRawFormat *format);
|
||||
SpaResult spa_audio_raw_format_parse (const SpaFormat *format,
|
||||
SpaAudioRawFormat *rawformat);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue