[Merge] lp:~phablet-team/media-hub/media-hub-desktop into lp:media-hub

Alfonso Sanchez-Beato alfonso.sanchez-beato at canonical.com
Fri Aug 12 07:03:31 UTC 2016


Review: Needs Information

We need to decide how to detect the platform, see comment below.

Diff comments:

> 
> === added file 'src/core/media/backend.cpp'
> --- src/core/media/backend.cpp	1970-01-01 00:00:00 +0000
> +++ src/core/media/backend.cpp	2016-08-11 19:37:36 +0000
> @@ -0,0 +1,43 @@
> +/*
> + * Copyright (C) 2016 Canonical Ltd
> + *
> + * Licensed under the Apache License, Version 2.0 (the "License");
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + *
> + * Authored by: Jim Hodapp <jim.hodapp at canonical.com>
> + */
> +
> +#include "backend.h"
> +#include "core/media/logger/logger.h"
> +
> +#include <core/posix/signal.h>
> +
> +#include <cstring>
> +
> +namespace media = core::ubuntu::media;
> +
> +media::AVBackend::Backend media::AVBackend::get_backend_type()
> +{
> +    const char *backend = ::getenv("MH_BACKEND");

We will have to define this in all touch devices. Which is your plan for this? In ofono we have an upstart job override to define such variables in lxc-android-config. However I think we should start to try to avoid such approaches and try to auto-detect capabilities instead. In the case of media-hub this is quite doable by checking using gstreamer whether the androidmedia plugin/codecs is/are available or not.

> +    if (backend)
> +    {
> +        MH_DEBUG("MH_BACKEND: %s", backend);
> +        if (strcmp(backend, "hybris") == 0)
> +            return media::AVBackend::Backend::hybris;
> +        else
> +            return media::AVBackend::Backend::none;
> +    }
> +    else
> +    {
> +        return media::AVBackend::Backend::none;
> +    }
> +}


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



More information about the Ubuntu-reviews mailing list