Music Hub
..
A session-wide music playback service
recorder_observer.cpp
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by: Thomas Voß <thomas.voss@canonical.com>
17
*/
18
19
#include "
core/media/logger/logger.h
"
20
21
#include <
core/media/player.h
>
22
#include <
core/media/recorder_observer.h
>
23
24
#include <
core/media/hybris_recorder_observer.h
>
25
#include <
core/media/stub_recorder_observer.h
>
26
27
namespace
media
=
core::ubuntu::media
;
28
29
media::RecorderObserver::Ptr
media::make_platform_default_recorder_observer
()
30
{
31
const
media::AVBackend::Backend
b {
media::AVBackend::get_backend_type
()};
32
switch
(b)
33
{
34
case
media::AVBackend::Backend::hybris:
35
return
media::HybrisRecorderObserver::create
();
36
case
media::AVBackend::Backend::none:
37
MH_WARNING
(
38
"No video backend selected. Video recording functionality won't work."
39
);
40
return
media::StubRecorderObserver::create
();
41
default
:
42
MH_INFO
(
"Invalid or no A/V backend specified, using \"hybris\" as a default."
);
43
return
media::HybrisRecorderObserver::create
();
44
}
45
}
player.h
core::ubuntu::media::HybrisRecorderObserver::create
static RecorderObserver::Ptr create()
Definition:
hybris_recorder_observer.cpp:92
MH_INFO
#define MH_INFO(...)
Definition:
logger.h:125
stub_recorder_observer.h
MH_WARNING
#define MH_WARNING(...)
Definition:
logger.h:127
core::ubuntu::media::AVBackend::get_backend_type
static Backend get_backend_type()
Returns the type of audio/video decoding/encoding backend being used.
Definition:
backend.cpp:26
core::ubuntu::media
Definition:
player.h:37
core::ubuntu::media::make_platform_default_recorder_observer
RecorderObserver::Ptr make_platform_default_recorder_observer()
Definition:
recorder_observer.cpp:29
logger.h
hybris_recorder_observer.h
core::ubuntu::media::RecorderObserver::Ptr
std::shared_ptr< RecorderObserver > Ptr
Definition:
recorder_observer.h:46
core::ubuntu::media::StubRecorderObserver::create
static RecorderObserver::Ptr create()
Definition:
stub_recorder_observer.cpp:37
recorder_observer.h
core::ubuntu::media::AVBackend::Backend
Backend
Definition:
player.h:44
src
core
media
recorder_observer.cpp
Generated on Tue Nov 1 2016 16:29:26 for Music Hub by
1.8.11