diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/bluetooth/a2dp-codec-ldac-gst.c | 4 | ||||
-rw-r--r-- | src/modules/bluetooth/a2dp-codec-sbc.c | 12 | ||||
-rw-r--r-- | src/modules/bluetooth/rtp.h | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/bluetooth/a2dp-codec-ldac-gst.c b/src/modules/bluetooth/a2dp-codec-ldac-gst.c index 836ae37e9..a5e937aa9 100644 --- a/src/modules/bluetooth/a2dp-codec-ldac-gst.c +++ b/src/modules/bluetooth/a2dp-codec-ldac-gst.c @@ -403,7 +403,7 @@ static size_t reduce_encoder_bitrate(void *codec_info, size_t write_link_mtu) { static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) { struct gst_info *info = (struct gst_info *) codec_info; struct rtp_header *header; - struct rtp_sbc_payload *payload; + struct rtp_payload *payload; size_t written; if (PA_UNLIKELY(output_size < sizeof(*header) + sizeof(*payload))) { @@ -423,7 +423,7 @@ static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t header->sequence_number = htons(info->seq_num++); header->timestamp = htonl(timestamp); header->ssrc = htonl(1); - payload = (struct rtp_sbc_payload*) (output_buffer + sizeof(*header)); + payload = (struct rtp_payload*) (output_buffer + sizeof(*header)); payload->frame_count = get_ldac_num_frames(codec_info, info->codec_type); written += sizeof(*header) + sizeof(*payload); } diff --git a/src/modules/bluetooth/a2dp-codec-sbc.c b/src/modules/bluetooth/a2dp-codec-sbc.c index 5095a1b3c..d768075a0 100644 --- a/src/modules/bluetooth/a2dp-codec-sbc.c +++ b/src/modules/bluetooth/a2dp-codec-sbc.c @@ -704,7 +704,7 @@ static int reset(void *codec_info) { static size_t get_block_size(void *codec_info, size_t link_mtu) { struct sbc_info *sbc_info = (struct sbc_info *) codec_info; - size_t rtp_size = sizeof(struct rtp_header) + sizeof(struct rtp_sbc_payload); + size_t rtp_size = sizeof(struct rtp_header) + sizeof(struct rtp_payload); size_t frame_count = (link_mtu - rtp_size) / sbc_info->frame_length; /* frame_count is only 4 bit number */ @@ -716,7 +716,7 @@ static size_t get_block_size(void *codec_info, size_t link_mtu) { static size_t get_encoded_block_size(void *codec_info, size_t input_size) { struct sbc_info *sbc_info = (struct sbc_info *) codec_info; - size_t rtp_size = sizeof(struct rtp_header) + sizeof(struct rtp_sbc_payload); + size_t rtp_size = sizeof(struct rtp_header) + sizeof(struct rtp_payload); /* input size should be aligned to codec input block size */ pa_assert_fp(input_size % sbc_info->codesize == 0); @@ -753,14 +753,14 @@ static size_t increase_encoder_bitrate(void *codec_info, size_t write_link_mtu) static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t *input_buffer, size_t input_size, uint8_t *output_buffer, size_t output_size, size_t *processed) { struct sbc_info *sbc_info = (struct sbc_info *) codec_info; struct rtp_header *header; - struct rtp_sbc_payload *payload; + struct rtp_payload *payload; uint8_t *d; const uint8_t *p; size_t to_write, to_encode; uint8_t frame_count; header = (struct rtp_header*) output_buffer; - payload = (struct rtp_sbc_payload*) (output_buffer + sizeof(*header)); + payload = (struct rtp_payload*) (output_buffer + sizeof(*header)); frame_count = 0; @@ -836,14 +836,14 @@ static size_t decode_buffer(void *codec_info, const uint8_t *input_buffer, size_ struct sbc_info *sbc_info = (struct sbc_info *) codec_info; struct rtp_header *header; - struct rtp_sbc_payload *payload; + struct rtp_payload *payload; const uint8_t *p; uint8_t *d; size_t to_write, to_decode; uint8_t frame_count; header = (struct rtp_header *) input_buffer; - payload = (struct rtp_sbc_payload*) (input_buffer + sizeof(*header)); + payload = (struct rtp_payload*) (input_buffer + sizeof(*header)); frame_count = payload->frame_count; diff --git a/src/modules/bluetooth/rtp.h b/src/modules/bluetooth/rtp.h index 813d9e390..d72c08526 100644 --- a/src/modules/bluetooth/rtp.h +++ b/src/modules/bluetooth/rtp.h @@ -41,7 +41,7 @@ struct rtp_header { uint32_t csrc[0]; } __attribute__ ((packed)); -struct rtp_sbc_payload { +struct rtp_payload { uint8_t frame_count:4; uint8_t rfa0:1; uint8_t is_last_fragment:1; @@ -67,7 +67,7 @@ struct rtp_header { uint32_t csrc[0]; } __attribute__ ((packed)); -struct rtp_sbc_payload { +struct rtp_payload { uint8_t is_fragmented:1; uint8_t is_first_fragment:1; uint8_t is_last_fragment:1; |