mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
bluez5: tell the codec whether endpoint is sink or source
Add a flag A2DP_CODEC_FLAG_SINK to incidate a sink endpoint. Also enum_config and caps_preference_cmp may need to know whether the codec is being configured for SRC or SNK. Also add the flags argument to init_props. Bump codec API version.
This commit is contained in:
parent
8d66b2b2f7
commit
a8eb146d39
10 changed files with 63 additions and 34 deletions
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#define SPA_TYPE_INTERFACE_Bluez5CodecA2DP SPA_TYPE_INFO_INTERFACE_BASE "Bluez5:Codec:A2DP:Private"
|
||||
|
||||
#define SPA_VERSION_BLUEZ5_CODEC_A2DP 1
|
||||
#define SPA_VERSION_BLUEZ5_CODEC_A2DP 2
|
||||
|
||||
struct spa_bluez5_codec_a2dp {
|
||||
struct spa_interface iface;
|
||||
|
|
@ -62,6 +62,7 @@ extern const struct a2dp_codec * const * const codec_plugin_a2dp_codecs;
|
|||
extern const char *codec_plugin_factory_name;
|
||||
#endif
|
||||
|
||||
#define A2DP_CODEC_FLAG_SINK (1 << 0)
|
||||
|
||||
#define A2DP_CODEC_DEFAULT_RATE 48000
|
||||
#define A2DP_CODEC_DEFAULT_CHANNELS 2
|
||||
|
|
@ -97,7 +98,7 @@ struct a2dp_codec {
|
|||
const void *caps, size_t caps_size,
|
||||
const struct a2dp_codec_audio_info *info,
|
||||
const struct spa_dict *settings, uint8_t config[A2DP_MAX_CAPS_SIZE]);
|
||||
int (*enum_config) (const struct a2dp_codec *codec,
|
||||
int (*enum_config) (const struct a2dp_codec *codec, uint32_t flags,
|
||||
const void *caps, size_t caps_size, uint32_t id, uint32_t idx,
|
||||
struct spa_pod_builder *builder, struct spa_pod **param);
|
||||
int (*validate_config) (const struct a2dp_codec *codec, uint32_t flags,
|
||||
|
|
@ -109,10 +110,10 @@ struct a2dp_codec {
|
|||
* The caps handed in correspond to this codec_id, but are
|
||||
* otherwise not checked beforehand.
|
||||
*/
|
||||
int (*caps_preference_cmp) (const struct a2dp_codec *codec, const void *caps1, size_t caps1_size,
|
||||
int (*caps_preference_cmp) (const struct a2dp_codec *codec, uint32_t flags, const void *caps1, size_t caps1_size,
|
||||
const void *caps2, size_t caps2_size, const struct a2dp_codec_audio_info *info);
|
||||
|
||||
void *(*init_props) (const struct a2dp_codec *codec, const struct spa_dict *settings);
|
||||
void *(*init_props) (const struct a2dp_codec *codec, uint32_t flags, const struct spa_dict *settings);
|
||||
void (*clear_props) (void *);
|
||||
int (*enum_props) (void *props, const struct spa_dict *settings, uint32_t id, uint32_t idx,
|
||||
struct spa_pod_builder *builder, struct spa_pod **param);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue