mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: mark constant parameters as such
The info parameter is never modified, communicate this to users. This align format-utils.h with latency-utils.h.
This commit is contained in:
parent
490558f3de
commit
4034e8f3c5
19 changed files with 34 additions and 19 deletions
|
|
@ -34,7 +34,8 @@ spa_format_audio_aac_parse(const struct spa_pod *format, struct spa_audio_info_a
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_aac_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_aac *info)
|
||||
spa_format_audio_aac_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_aac *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_alac_parse(const struct spa_pod *format, struct spa_audio_info_
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_alac_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_alac *info)
|
||||
spa_format_audio_alac_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_alac *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ spa_format_audio_amr_parse(const struct spa_pod *format, struct spa_audio_info_a
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_amr_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_amr *info)
|
||||
spa_format_audio_amr_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_amr *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_ape_parse(const struct spa_pod *format, struct spa_audio_info_a
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_ape_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_ape *info)
|
||||
spa_format_audio_ape_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_ape *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ spa_format_audio_dsd_parse(const struct spa_pod *format, struct spa_audio_info_d
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_dsd_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_dsd *info)
|
||||
spa_format_audio_dsd_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_dsd *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ spa_format_audio_dsp_parse(const struct spa_pod *format, struct spa_audio_info_d
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_dsp_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_dsp *info)
|
||||
spa_format_audio_dsp_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_dsp *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_flac_parse(const struct spa_pod *format, struct spa_audio_info_
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_flac_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_flac *info)
|
||||
spa_format_audio_flac_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_flac *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ spa_format_audio_parse(const struct spa_pod *format, struct spa_audio_info *info
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info *info)
|
||||
spa_format_audio_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info *info)
|
||||
{
|
||||
switch (info->media_subtype) {
|
||||
case SPA_MEDIA_SUBTYPE_raw:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_iec958_parse(const struct spa_pod *format, struct spa_audio_inf
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_iec958_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_iec958 *info)
|
||||
spa_format_audio_iec958_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_iec958 *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_mp3_parse(const struct spa_pod *format, struct spa_audio_info_m
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_mp3_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_mp3 *info)
|
||||
spa_format_audio_mp3_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_mp3 *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_ra_parse(const struct spa_pod *format, struct spa_audio_info_ra
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_ra_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_ra *info)
|
||||
spa_format_audio_ra_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_ra *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ spa_format_audio_raw_parse(const struct spa_pod *format, struct spa_audio_info_r
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_raw_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_raw *info)
|
||||
spa_format_audio_raw_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_raw *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ spa_format_audio_vorbis_parse(const struct spa_pod *format, struct spa_audio_inf
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_vorbis_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_vorbis *info)
|
||||
spa_format_audio_vorbis_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_vorbis *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ spa_format_audio_wma_parse(const struct spa_pod *format, struct spa_audio_info_w
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_audio_wma_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_wma *info)
|
||||
spa_format_audio_wma_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_audio_info_wma *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ spa_format_video_dsp_parse(const struct spa_pod *format,
|
|||
|
||||
static inline struct spa_pod *
|
||||
spa_format_video_dsp_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
struct spa_video_info_dsp *info)
|
||||
const struct spa_video_info_dsp *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ spa_format_video_parse(const struct spa_pod *format, struct spa_video_info *info
|
|||
}
|
||||
|
||||
static inline struct spa_pod *
|
||||
spa_format_video_build(struct spa_pod_builder *builder, uint32_t id, struct spa_video_info *info)
|
||||
spa_format_video_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
const struct spa_video_info *info)
|
||||
{
|
||||
switch (info->media_subtype) {
|
||||
case SPA_MEDIA_SUBTYPE_raw:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ spa_format_video_h264_parse(const struct spa_pod *format,
|
|||
|
||||
static inline struct spa_pod *
|
||||
spa_format_video_h264_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
struct spa_video_info_h264 *info)
|
||||
const struct spa_video_info_h264 *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ spa_format_video_mjpg_parse(const struct spa_pod *format,
|
|||
|
||||
static inline struct spa_pod *
|
||||
spa_format_video_mjpg_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
struct spa_video_info_mjpg *info)
|
||||
const struct spa_video_info_mjpg *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ spa_format_video_raw_parse(const struct spa_pod *format,
|
|||
|
||||
static inline struct spa_pod *
|
||||
spa_format_video_raw_build(struct spa_pod_builder *builder, uint32_t id,
|
||||
struct spa_video_info_raw *info)
|
||||
const struct spa_video_info_raw *info)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
spa_pod_builder_push_object(builder, &f, SPA_TYPE_OBJECT_Format, id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue