Re: [PATCH BlueZ] AVRCP: Handler player features as a byte array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On Mon, Feb 4, 2013 at 3:27 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> Hi Luiz,
>
>> >> --- a/profiles/audio/player.c
>> >> +++ b/profiles/audio/player.c
>> >> @@ -67,7 +67,7 @@ struct media_player {
>> >>       char                    *name;          /* Player name */
>> >>       char                    *type;          /* Player type */
>> >>       char                    *subtype;       /* Player subtype */
>> >> -     uint64_t                features[2];    /* Player features */
>> >> +     uint8_t                 *features;      /* Player features */
>> >
>> > Why not just have this as features[16] here as well so you don't need to
>> > do g_memdup and g_free?
>>
>> I was planning to have a NULL check if the features are valid.
>
> actually I like to decrease the number of extra memory allocations. So
> what benefit is the test for features giving you actually.

I would use it to differentiate players which can provide this
information from those who don't, for certain commands we can reject
based on the features but it has to be valid otherwise we just don't
know if it is supported and should send the command anyway.


--
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux