mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
bluez: Add specific codec types.
Add specific codec types for a2dp sources and sinks so clients are able to differ between them.
This commit is contained in:
parent
c4f094da7d
commit
86ea471beb
1 changed files with 6 additions and 6 deletions
|
@ -275,7 +275,7 @@ gst_avdtp_sink_init_sbc_pkt_conf (GstAvdtpSink * sink,
|
||||||
gint rate, subbands, blocks;
|
gint rate, subbands, blocks;
|
||||||
GstStructure *structure = gst_caps_get_structure (caps, 0);
|
GstStructure *structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
cfg = (void *) gst_avdtp_find_caps (sink, BT_A2DP_CODEC_SBC);
|
cfg = (void *) gst_avdtp_find_caps (sink, BT_A2DP_SBC_SINK);
|
||||||
name = gst_structure_get_name (structure);
|
name = gst_structure_get_name (structure);
|
||||||
|
|
||||||
if (!(IS_SBC (name))) {
|
if (!(IS_SBC (name))) {
|
||||||
|
@ -734,8 +734,8 @@ gst_avdtp_sink_update_caps (GstAvdtpSink * self)
|
||||||
|
|
||||||
GST_LOG_OBJECT (self, "updating device caps");
|
GST_LOG_OBJECT (self, "updating device caps");
|
||||||
|
|
||||||
sbc = (void *) gst_avdtp_find_caps (self, BT_A2DP_CODEC_SBC);
|
sbc = (void *) gst_avdtp_find_caps (self, BT_A2DP_SBC_SINK);
|
||||||
mpeg = (void *) gst_avdtp_find_caps (self, BT_A2DP_CODEC_MPEG12);
|
mpeg = (void *) gst_avdtp_find_caps (self, BT_A2DP_MPEG12_SINK);
|
||||||
|
|
||||||
sbc_structure = gst_avdtp_sink_parse_sbc_caps (self, sbc);
|
sbc_structure = gst_avdtp_sink_parse_sbc_caps (self, sbc);
|
||||||
mpeg_structure = gst_avdtp_sink_parse_mpeg_caps (self, mpeg);
|
mpeg_structure = gst_avdtp_sink_parse_mpeg_caps (self, mpeg);
|
||||||
|
@ -1042,9 +1042,9 @@ gst_avdtp_sink_configure (GstAvdtpSink * self, GstCaps * caps)
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
|
|
||||||
if (gst_structure_has_name (structure, "audio/x-sbc"))
|
if (gst_structure_has_name (structure, "audio/x-sbc"))
|
||||||
codec = (void *) gst_avdtp_find_caps (self, BT_A2DP_CODEC_SBC);
|
codec = (void *) gst_avdtp_find_caps (self, BT_A2DP_SBC_SINK);
|
||||||
else if (gst_structure_has_name (structure, "audio/mpeg"))
|
else if (gst_structure_has_name (structure, "audio/mpeg"))
|
||||||
codec = (void *) gst_avdtp_find_caps (self, BT_A2DP_CODEC_MPEG12);
|
codec = (void *) gst_avdtp_find_caps (self, BT_A2DP_MPEG12_SINK);
|
||||||
|
|
||||||
if (codec == NULL) {
|
if (codec == NULL) {
|
||||||
GST_ERROR_OBJECT (self, "Couldn't parse caps " "to packet configuration");
|
GST_ERROR_OBJECT (self, "Couldn't parse caps " "to packet configuration");
|
||||||
|
@ -1078,7 +1078,7 @@ gst_avdtp_sink_configure (GstAvdtpSink * self, GstCaps * caps)
|
||||||
req->h.name = BT_SET_CONFIGURATION;
|
req->h.name = BT_SET_CONFIGURATION;
|
||||||
req->h.length = sizeof (*req);
|
req->h.length = sizeof (*req);
|
||||||
|
|
||||||
if (codec->type == BT_A2DP_CODEC_SBC)
|
if (codec->type == BT_A2DP_SBC_SINK)
|
||||||
ret = gst_avdtp_sink_init_sbc_pkt_conf (self, caps, (void *) &req->codec);
|
ret = gst_avdtp_sink_init_sbc_pkt_conf (self, caps, (void *) &req->codec);
|
||||||
else
|
else
|
||||||
ret = gst_avdtp_sink_init_mp3_pkt_conf (self, caps, (void *) &req->codec);
|
ret = gst_avdtp_sink_init_mp3_pkt_conf (self, caps, (void *) &req->codec);
|
||||||
|
|
Loading…
Reference in a new issue