mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	
							parent
							
								
									fccb4bd29d
								
							
						
					
					
						commit
						7b8afb3024
					
				
					 107 changed files with 51641 additions and 35 deletions
				
			
		| 
						 | 
				
			
			@ -46,6 +46,16 @@ static bool can_be_supported(bool for_encoding) {
 | 
			
		|||
    }
 | 
			
		||||
    gst_object_unref(element_factory);
 | 
			
		||||
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    element_factory = gst_element_factory_find("rtpldacpay");
 | 
			
		||||
    if (element_factory == NULL) {
 | 
			
		||||
        pa_log_info("LDAC RTP payloader element `rtpldacpay` not found");
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    gst_object_unref(element_factory);
 | 
			
		||||
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -199,6 +209,10 @@ static uint8_t fill_preferred_configuration(const pa_sample_spec *default_sample
 | 
			
		|||
 | 
			
		||||
GstElement *gst_init_ldac(struct gst_info *info, pa_sample_spec *ss, bool for_encoding) {
 | 
			
		||||
    GstElement *bin;
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    GstElement *rtpldacpay;
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    GstElement *enc;
 | 
			
		||||
    GstPad *pad;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -262,16 +276,39 @@ GstElement *gst_init_ldac(struct gst_info *info, pa_sample_spec *ss, bool for_en
 | 
			
		|||
            goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    rtpldacpay = gst_element_factory_make("rtpldacpay", "rtp_ldac_pay");
 | 
			
		||||
    if (!rtpldacpay) {
 | 
			
		||||
        pa_log_error("Could not create RTP LDAC payloader element");
 | 
			
		||||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bin = gst_bin_new("ldac_enc_bin");
 | 
			
		||||
    pa_assert(bin);
 | 
			
		||||
 | 
			
		||||
    gst_bin_add_many(GST_BIN(bin), enc, rtpldacpay, NULL);
 | 
			
		||||
 | 
			
		||||
    if (!gst_element_link(enc, rtpldacpay)) {
 | 
			
		||||
        pa_log_error("Failed to link LDAC encoder to LDAC RTP payloader");
 | 
			
		||||
        gst_object_unref(bin);
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
=======
 | 
			
		||||
    bin = gst_bin_new("ldac_enc_bin");
 | 
			
		||||
    pa_assert(bin);
 | 
			
		||||
 | 
			
		||||
    gst_bin_add_many(GST_BIN(bin), enc, NULL);
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
 | 
			
		||||
    pad = gst_element_get_static_pad(enc, "sink");
 | 
			
		||||
    pa_assert_se(gst_element_add_pad(bin, gst_ghost_pad_new("sink", pad)));
 | 
			
		||||
    gst_object_unref(GST_OBJECT(pad));
 | 
			
		||||
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    pad = gst_element_get_static_pad(rtpldacpay, "src");
 | 
			
		||||
=======
 | 
			
		||||
    pad = gst_element_get_static_pad(enc, "src");
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    pa_assert_se(gst_element_add_pad(bin, gst_ghost_pad_new("src", pad)));
 | 
			
		||||
    gst_object_unref(GST_OBJECT(pad));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -401,6 +438,14 @@ 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) {
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    size_t written;
 | 
			
		||||
 | 
			
		||||
    written = gst_transcode_buffer(codec_info, input_buffer, input_size, output_buffer, output_size, processed);
 | 
			
		||||
    if (PA_UNLIKELY(*processed != input_size))
 | 
			
		||||
        pa_log_error("LDAC encoding error");
 | 
			
		||||
 | 
			
		||||
=======
 | 
			
		||||
    struct gst_info *info = (struct gst_info *) codec_info;
 | 
			
		||||
    struct rtp_header *header;
 | 
			
		||||
    struct rtp_payload *payload;
 | 
			
		||||
| 
						 | 
				
			
			@ -428,11 +473,16 @@ static size_t encode_buffer(void *codec_info, uint32_t timestamp, const uint8_t
 | 
			
		|||
        written += sizeof(*header) + sizeof(*payload);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    return written;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_hq = {
 | 
			
		||||
    .id = { A2DP_CODEC_VENDOR, LDAC_VENDOR_ID, LDAC_CODEC_ID },
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    .support_backchannel = false,
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    .can_be_supported = can_be_supported,
 | 
			
		||||
    .can_accept_capabilities = can_accept_capabilities,
 | 
			
		||||
    .choose_remote_endpoint = choose_remote_endpoint,
 | 
			
		||||
| 
						 | 
				
			
			@ -455,6 +505,10 @@ const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_hq = {
 | 
			
		|||
 | 
			
		||||
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_sq = {
 | 
			
		||||
    .id = { A2DP_CODEC_VENDOR, LDAC_VENDOR_ID, LDAC_CODEC_ID },
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    .support_backchannel = false,
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    .can_be_supported = can_be_supported,
 | 
			
		||||
    .can_accept_capabilities = can_accept_capabilities,
 | 
			
		||||
    .choose_remote_endpoint = choose_remote_endpoint,
 | 
			
		||||
| 
						 | 
				
			
			@ -477,6 +531,10 @@ const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_sq = {
 | 
			
		|||
 | 
			
		||||
const pa_a2dp_endpoint_conf pa_a2dp_endpoint_conf_ldac_eqmid_mq = {
 | 
			
		||||
    .id = { A2DP_CODEC_VENDOR, LDAC_VENDOR_ID, LDAC_CODEC_ID },
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
    .support_backchannel = false,
 | 
			
		||||
=======
 | 
			
		||||
>>>>>>> c1990dd02647405b0c13aab59f75d05cbb202336
 | 
			
		||||
    .can_be_supported = can_be_supported,
 | 
			
		||||
    .can_accept_capabilities = can_accept_capabilities,
 | 
			
		||||
    .choose_remote_endpoint = choose_remote_endpoint,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue