[Merge] lp:~phablet-team/media-hub/fix-1538703-take2 into lp:media-hub

Konrad Zapałowicz konrad.zapalowicz at canonical.com
Tue May 3 19:04:01 UTC 2016


Review: Needs Fixing code

Minor issue

Diff comments:

> 
> === modified file 'src/core/media/player_implementation.cpp'
> --- src/core/media/player_implementation.cpp	2016-04-06 15:28:29 +0000
> +++ src/core/media/player_implementation.cpp	2016-05-03 18:06:59 +0000
> @@ -322,6 +325,55 @@
>          parent->can_go_next().set(has_next);
>      }
>  
> +    bool pause_other_players(media::Player::PlayerKey key)
> +    {
> +        if (not config.parent.player_service)
> +            return false;
> +
> +        media::ServiceSkeleton* skel {
> +            reinterpret_cast<media::ServiceSkeleton*>(config.parent.player_service)
> +        };
> +        skel->pause_other_sessions(key);
> +        return true;
> +    }
> +
> +    bool update_current_player(media::Player::PlayerKey key)
> +    {
> +        if (not config.parent.player_service)
> +            return false;
> +
> +        media::ServiceSkeleton* skel {
> +            reinterpret_cast<media::ServiceSkeleton*>(config.parent.player_service)
> +        };
> +        skel->set_current_player(key);
> +        return true;
> +    }
> +
> +    bool is_current_player() const
> +    {

lacks checking if player_service is valid

> +        media::ServiceSkeleton* skel {
> +            reinterpret_cast<media::ServiceSkeleton*>(config.parent.player_service)
> +        };
> +        return skel->is_current_player(parent->key());
> +    }
> +
> +    bool is_multimedia_role() const
> +    {
> +        return parent->audio_stream_role() == media::Player::AudioStreamRole::multimedia;
> +    }
> +
> +    bool reset_current_player()
> +    {
> +        if (not config.parent.player_service)
> +            return false;
> +
> +        media::ServiceSkeleton* skel {
> +            reinterpret_cast<media::ServiceSkeleton*>(config.parent.player_service)
> +        };
> +        skel->reset_current_player();
> +        return true;
> +    }
> +
>      // Our link back to our parent.
>      media::PlayerImplementation<Parent>* parent;
>      // We just store the parameters passed on construction.


-- 
https://code.launchpad.net/~phablet-team/media-hub/fix-1538703-take2/+merge/292584
Your team Ubuntu Phablet Team is subscribed to branch lp:media-hub.



More information about the Ubuntu-reviews mailing list