[pulseaudio-discuss] [PATCH next v0 07/10] bluetooth: Abstract transport access types inside bluetooth-util

Tanu Kaskinen tanuk at iki.fi
Fri Dec 14 03:58:51 PST 2012


On Fri, 2012-12-14 at 10:49 +0100, Mikel Astiz wrote:
> On Fri, Dec 14, 2012 at 10:15 AM, Tanu Kaskinen <tanuk at iki.fi> wrote:
> > The start parameter could be changed from "start" to "optional" to be
> > consistent with pa_bluetooth_transport_acquire(). On the other hand,
> > "start" describes better the behavior regarding whether setup_stream()
> > will be called or not. On the third hand, does setup_stream() really
> > belong in this function? Could it be moved out? In that case, could this
> > whole function be removed in favor of using
> > pa_bluetooth_transport_acquire() directly?
> 
> This is indeed quite tricky. The reason I was trying to leave this
> unmodified is the second argument you mention: "start" describes
> whether setup_stream() gets called. Another option would be to split
> the parameter and have both "optional" and "start", but I'd rather
> avoid this.
> 
> Regarding your third point, I agree that splitting the functions
> acquire()/setup_stream() would be the cleanest solution, with the
> drawback of adding duplicated code since most of the times both
> functions need to be called.
> 
> So I would vote in favor of this last option. Any preference from your side?

I'd prefer the last option too.

-- 
Tanu



More information about the pulseaudio-discuss mailing list