[pulseaudio-discuss] [PATCH 5/8] rtp: Hide RTP implementation details from module-rtp-*

Tanu Kaskinen tanuk at iki.fi
Thu Apr 14 17:08:40 UTC 2016


On Mon, 2016-02-29 at 15:46 +0530, arun at accosted.net wrote:
> -    pa_memblockq_seek(s->memblockq, delta * (int64_t) s->rtp_context.frame_size, PA_SEEK_RELATIVE, true);
> +    pa_memblockq_seek(s->memblockq, delta * (int64_t) pa_rtp_context_get_frame_size(s->rtp_context), PA_SEEK_RELATIVE,
> +            true);

The context's frame size is the same as
pa_frame_size(&s->sdp_info.sample_spec), so it's not really necessary
to query it from the context. To avoid the pa_frame_size() call too,
I'd add a frame_size variable to the session struct. (This is not a big
deal, though; I'm ok with the code as it is.)

> -    pa_rtp_context_destroy(&s->rtp_context);
> +    pa_rtp_context_destroy(s->rtp_context);

You renamed pa_rtp_context_init() to pa_rtp_context_new(). I think it
would be good to also rename pa_rtp_context_destroy() to
pa_rtp_context_free().

-- 
Tanu


More information about the pulseaudio-discuss mailing list