Re: [PATCH v2 3/3] AVRCP: Add support to changing active player

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

 



Hi Michal,

On Wed, Apr 11, 2012 at 12:12 PM, Michal Labedzki
<michal.labedzki@xxxxxxxxx> wrote:

>  static GDBusMethodTable media_methods[] = {
>        { "RegisterEndpoint",   "oa{sv}",       "",     register_endpoint },
>        { "UnregisterEndpoint", "o",            "",     unregister_endpoint },
>        { "RegisterPlayer",     "oa{sv}a{sv}","",       register_player },
>        { "UnregisterPlayer",   "o",            "",     unregister_player },
> +       { "SetActivePlayer",    "o",            "",     set_active_player },
>        { },
>  };
>
> diff --git a/doc/media-api.txt b/doc/media-api.txt
> index c53ab7b..c64d1f5 100644
> --- a/doc/media-api.txt
> +++ b/doc/media-api.txt
> @@ -123,6 +123,11 @@ Methods            void RegisterEndpoint(object endpoint, dict properties)
>
>                        Unregister sender media player.
>
> +               void SetActivePlayer(object player)
> +
> +                       Set active media player. Only one active player may be used
> +                       by remote controller.
> +

The use case here seems to be incorrect or Im missing something, I
remember commenting that such method is not really desirable since the
controlling point, at least for the current role, is the remote device
so having the players or a external component to control that will
only complicate things. Also this creates a limitation since only one
player can be marked as active at time, IMO the Active property should
only tell if the player can be addressed by the remote device so the
application can keep itself registered but idle (player out of
focus/minimized).

>  MediaPlayer hierarchy
>  =====================
>
> @@ -188,6 +193,15 @@ Signals            PropertyChanged(string setting, variant value)
>
>                                        Track duration in milliseconds
>
> +               Activated()
> +
> +                       This signal indicates one player to be currently used.
> +
> +               Deactivated()
> +
> +                       This signal sends to all non-active players and indicates that
> +                       player lose focus.
> +

I would make it a boolean property called Active, 2 signal is a pretty
bad since you actually have to emit both everytime.


-- 
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