module-rtp: add opus encoding

This commit is contained in:
Wim Taymans 2023-03-10 17:39:51 +01:00
parent bcc052f5f1
commit 345582dd15
10 changed files with 452 additions and 4 deletions

View file

@ -28,6 +28,7 @@ extern "C" {
#include <spa/param/audio/alac.h>
#include <spa/param/audio/flac.h>
#include <spa/param/audio/ape.h>
#include <spa/param/audio/opus.h>
struct spa_audio_info {
uint32_t media_type;
@ -46,6 +47,7 @@ struct spa_audio_info {
struct spa_audio_info_alac alac;
struct spa_audio_info_flac flac;
struct spa_audio_info_ape ape;
struct spa_audio_info_ape opus;
} info;
};

View file

@ -0,0 +1,29 @@
/* Simple Plugin API */
/* SPDX-FileCopyrightText: Copyright © 2023 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef SPA_AUDIO_OPUS_H
#define SPA_AUDIO_OPUS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <spa/param/audio/raw.h>
struct spa_audio_info_opus {
uint32_t rate; /*< sample rate */
uint32_t channels; /*< number of channels */
};
#define SPA_AUDIO_INFO_OPUS_INIT(...) ((struct spa_audio_info_opus) { __VA_ARGS__ })
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* SPA_AUDIO_OPUS_H */