Merge lp:~thomas-voss/media-hub/introduce-video-sink-interface into lp:media-hub

Proposed by Thomas Voß
Status: Merged
Approved by: Ricardo Mendoza
Approved revision: 109
Merged at revision: 114
Proposed branch: lp:~thomas-voss/media-hub/introduce-video-sink-interface
Merge into: lp:media-hub
Diff against target: 970 lines (+480/-142)
19 files modified
CMakeLists.txt (+3/-1)
debian/changelog (+6/-0)
debian/control (+4/-4)
debian/libmedia-hub-common3.symbols (+1/-1)
include/core/media/player.h (+12/-10)
include/core/media/video/sink.h (+76/-0)
src/core/media/CMakeLists.txt (+10/-1)
src/core/media/engine.h (+3/-1)
src/core/media/mpris/player.h (+11/-0)
src/core/media/player.cpp (+5/-0)
src/core/media/player_implementation.cpp (+6/-23)
src/core/media/player_implementation.h (+2/-4)
src/core/media/player_skeleton.cpp (+23/-3)
src/core/media/player_stub.cpp (+16/-89)
src/core/media/player_stub.h (+2/-5)
src/core/media/video/hybris_gl_sink.cpp (+116/-0)
src/core/media/video/hybris_gl_sink.h (+72/-0)
src/core/media/video/platform_default_sink.cpp (+68/-0)
src/core/media/video/platform_default_sink.h (+44/-0)
To merge this branch: bzr merge lp:~thomas-voss/media-hub/introduce-video-sink-interface
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Jim Hodapp (community) code Approve
Review via email: mp+242872@code.launchpad.net

Commit message

Refactor client-facing interfaces to pull out explicit dependency on hybris-based media layer.
Introduce interface media::video::Sink, and expose it in interfaces
Adjust implementation to account for interface changes.
Introduce an implementation of media::video::Sink relying on Hybris.

Description of the change

Refactor client-facing interfaces to pull out explicit dependency on hybris-based media layer.
Introduce interface media::video::Sink, and expose it in interfaces
Adjust implementation to account for interface changes.
Introduce an implementation of media::video::Sink relying on Hybris.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
100. By Thomas Voß

Adjust debian/*.install and debian/*.symbols to account for major version bump.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good, just 1 inline comment below. Also, make sure to rebase with trunk changes. This would be the very first MR I'd like to see get put into a silo so that I can test it well. This is a nice limited-scope MR but still is important. I want to try to avoid having to test all of the MRs combined in one silo, but instead would like to incrementally test one or 2 MRs at a time and land, then test 1 or two more and land, etc.

review: Needs Fixing (code)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

> Looks good, just 1 inline comment below. Also, make sure to rebase with trunk
> changes.

They should be up to date, and the train takes care of remerging with trunk.

> This would be the very first MR I'd like to see get put into a silo
> so that I can test it well. This is a nice limited-scope MR but still is
> important. I want to try to avoid having to test all of the MRs combined in
> one silo, but instead would like to incrementally test one or 2 MRs at a time
> and land, then test 1 or two more and land, etc.

Well, I wonder if we could at least group together the introduce-MRs into one silo and collectively test them to avoid retesting the same thing over and over again.

101. By Thomas Voß

Adjust comment according to review.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
102. By Thomas Voß

[ Jim Hodapp ]
* Resubmitting with prerequisite branch (LP: #1331041)
[ Justin McPherson ]
* Resubmitting with prerequisite branch (LP: #1331041)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
103. By Thomas Voß

Adjust major version in CMake setup.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good

review: Approve (code)
104. By Thomas Voß

Default to Hybris based implemenations.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
105. By Thomas Voß

[ Jim Hodapp ]
* Error reporting all the way up to the app level from the playbin
  pipeline.
[ Ubuntu daily release ]
* New rebuild forced
[ Jim Hodapp ]
* Don't auto-resume playback of videos after a phone call ends. (LP:
  #1411273)
[ Ubuntu daily release ]
* New rebuild forced
[ Ricardo Salveti de Araujo ]
* service_implementation: adding debug for call started/ended signals.
  Make sure account and connection are available when setting up
  account manager (patch from Gustavo Boiko). call_monitor: don't
  check caps when hooking up on/off signals, until bug 1409125 is
  fixed. Enable parallel building . (LP: #1409125)
[ Jim Hodapp ]
* Pause playback when recording begins. (LP: #1398047)
[ Ricardo Salveti de Araujo ]
* call_monitor.cpp: waiting for bridge to be up, and also protecting
  the on_change call (LP: #1408137)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
106. By Thomas Voß

Fix FTBFS.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
107. By Thomas Voß

Funnel creation of video::Sink instances via a factory to allow for early initialization
tasks that should/have to be carried out as soon as the player's identity on the service
side is established and the respective key is known.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
108. By Thomas Voß

* debian/control:
  - Removing pre-depends that are not required
  - Bumping standards-version to 3.9.6
[ Ricardo Salveti de Araujo ]
* Migrating tests to use ogg instead of mp3/avi removed:
  tests/h264.avi tests/test.mp3 added: tests/test-audio-1.ogg
  tests/test-video.ogg tests/test.mp3 renamed: tests/test.ogg =>
  tests/test-audio.ogg

109. By Thomas Voß

Remove Pre-Depends as trunk suggests.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-11-13 23:50:01 +0000
+++ CMakeLists.txt 2015-03-12 11:38:55 +0000
@@ -2,7 +2,7 @@
22
3project(ubuntu-media-hub)3project(ubuntu-media-hub)
44
5set(UBUNTU_MEDIA_HUB_VERSION_MAJOR 2)5set(UBUNTU_MEDIA_HUB_VERSION_MAJOR 3)
6set(UBUNTU_MEDIA_HUB_VERSION_MINOR 0)6set(UBUNTU_MEDIA_HUB_VERSION_MINOR 0)
7set(UBUNTU_MEDIA_HUB_VERSION_PATCH 0)7set(UBUNTU_MEDIA_HUB_VERSION_PATCH 0)
88
@@ -30,6 +30,8 @@
30pkg_check_modules(GIO gio-2.0 REQUIRED)30pkg_check_modules(GIO gio-2.0 REQUIRED)
31pkg_check_modules(HYBRIS_MEDIA libmedia REQUIRED)31pkg_check_modules(HYBRIS_MEDIA libmedia REQUIRED)
3232
33add_definitions(-DMEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER)
34
33#####################################################################35#####################################################################
34# Enable code coverage calculation with gcov/gcovr/lcov36# Enable code coverage calculation with gcov/gcovr/lcov
35# Usage:37# Usage:
3638
=== modified file 'debian/changelog'
--- debian/changelog 2015-03-12 03:06:40 +0000
+++ debian/changelog 2015-03-12 11:38:55 +0000
@@ -1,3 +1,9 @@
1media-hub (3.0.0) UNRELEASED; urgency=medium
2
3 * Refactor client-facing interfaces to pull out explicit dependency on hybris-based media layer.
4
5 -- Thomas Voss <thomas.voss@canonical.com> Tue, 11 Nov 2014 17:15:52 +0100
6
1media-hub (2.0.0+15.04.20150303-0ubuntu2) vivid; urgency=medium7media-hub (2.0.0+15.04.20150303-0ubuntu2) vivid; urgency=medium
28
3 * debian/control:9 * debian/control:
410
=== modified file 'debian/control'
--- debian/control 2015-03-12 03:06:29 +0000
+++ debian/control 2015-03-12 11:38:55 +0000
@@ -39,8 +39,8 @@
39Section: libdevel39Section: libdevel
40Architecture: any40Architecture: any
41Multi-Arch: same41Multi-Arch: same
42Depends: libmedia-hub-common2 (= ${binary:Version}),42Depends: libmedia-hub-common3 (= ${binary:Version}),
43 libmedia-hub-client2 (= ${binary:Version}),43 libmedia-hub-client3 (= ${binary:Version}),
44 ${misc:Depends},44 ${misc:Depends},
45 libproperties-cpp-dev,45 libproperties-cpp-dev,
46Suggests: libmedia-hub-doc46Suggests: libmedia-hub-doc
@@ -61,7 +61,7 @@
61 .61 .
62 This package contains the runtime.62 This package contains the runtime.
6363
64Package: libmedia-hub-common264Package: libmedia-hub-common3
65Architecture: any65Architecture: any
66Multi-Arch: same66Multi-Arch: same
67Depends: ${misc:Depends},67Depends: ${misc:Depends},
@@ -72,7 +72,7 @@
72 .72 .
73 This package contains the common libraries.73 This package contains the common libraries.
7474
75Package: libmedia-hub-client275Package: libmedia-hub-client3
76Architecture: any76Architecture: any
77Multi-Arch: same77Multi-Arch: same
78Depends: ${misc:Depends},78Depends: ${misc:Depends},
7979
=== renamed file 'debian/libmedia-hub-client2.install' => 'debian/libmedia-hub-client3.install'
=== renamed file 'debian/libmedia-hub-common2.install' => 'debian/libmedia-hub-common3.install'
=== renamed file 'debian/libmedia-hub-common2.symbols' => 'debian/libmedia-hub-common3.symbols'
--- debian/libmedia-hub-common2.symbols 2014-09-10 21:11:00 +0000
+++ debian/libmedia-hub-common3.symbols 2015-03-12 11:38:55 +0000
@@ -1,2 +1,2 @@
1libmedia-hub-common.so.2 libmedia-hub-common2 #MINVER#1libmedia-hub-common.so.3 libmedia-hub-common3 #MINVER#
2 (c++)"core::ubuntu::media::the_session_bus()@Base" 2.0.0+14.10.20140910.22 (c++)"core::ubuntu::media::the_session_bus()@Base" 2.0.0+14.10.20140910.2
33
=== modified file 'include/core/media/player.h'
--- include/core/media/player.h 2015-01-19 21:48:01 +0000
+++ include/core/media/player.h 2015-03-12 11:38:55 +0000
@@ -20,6 +20,7 @@
20#define CORE_UBUNTU_MEDIA_PLAYER_H_20#define CORE_UBUNTU_MEDIA_PLAYER_H_
2121
22#include <core/media/track.h>22#include <core/media/track.h>
23#include <core/media/video/sink.h>
2324
24#include <core/property.h>25#include <core/property.h>
2526
@@ -44,10 +45,15 @@
44 typedef void* GLConsumerWrapperHybris;45 typedef void* GLConsumerWrapperHybris;
45 typedef std::map<std::string, std::string> HeadersType;46 typedef std::map<std::string, std::string> HeadersType;
4647
47 /** Used to set a callback function to be called when a frame is ready to be rendered **/48 struct Errors
48 typedef void (*FrameAvailableCbHybris)(GLConsumerWrapperHybris wrapper, void *context);49 {
49 typedef void (*FrameAvailableCb)(void *context);50 Errors() = delete;
50 typedef void (*PlaybackCompleteCb)(void *context);51
52 struct OutOfProcessBufferStreamingNotSupported : public std::runtime_error
53 {
54 OutOfProcessBufferStreamingNotSupported();
55 };
56 };
5157
52 struct Configuration;58 struct Configuration;
5359
@@ -120,10 +126,10 @@
120 virtual std::shared_ptr<TrackList> track_list() = 0;126 virtual std::shared_ptr<TrackList> track_list() = 0;
121 virtual PlayerKey key() const = 0;127 virtual PlayerKey key() const = 0;
122128
129 virtual video::Sink::Ptr create_gl_texture_video_sink(std::uint32_t texture_id) = 0;
130
123 virtual bool open_uri(const Track::UriType& uri) = 0;131 virtual bool open_uri(const Track::UriType& uri) = 0;
124 virtual bool open_uri(const Track::UriType& uri, const HeadersType&) = 0;132 virtual bool open_uri(const Track::UriType& uri, const HeadersType&) = 0;
125 virtual void create_video_sink(uint32_t texture_id) = 0;
126 virtual GLConsumerWrapperHybris gl_consumer() const = 0;
127 virtual void next() = 0;133 virtual void next() = 0;
128 virtual void previous() = 0;134 virtual void previous() = 0;
129 virtual void play() = 0;135 virtual void play() = 0;
@@ -131,10 +137,6 @@
131 virtual void stop() = 0;137 virtual void stop() = 0;
132 virtual void seek_to(const std::chrono::microseconds& offset) = 0;138 virtual void seek_to(const std::chrono::microseconds& offset) = 0;
133139
134 // TODO: Convert this to be a signal
135 virtual void set_frame_available_callback(FrameAvailableCb cb, void *context) = 0;
136 virtual void set_playback_complete_callback(PlaybackCompleteCb cb, void *context) = 0;
137
138 virtual const core::Property<bool>& can_play() const = 0;140 virtual const core::Property<bool>& can_play() const = 0;
139 virtual const core::Property<bool>& can_pause() const = 0;141 virtual const core::Property<bool>& can_pause() const = 0;
140 virtual const core::Property<bool>& can_seek() const = 0;142 virtual const core::Property<bool>& can_seek() const = 0;
141143
=== added directory 'include/core/media/video'
=== added file 'include/core/media/video/sink.h'
--- include/core/media/video/sink.h 1970-01-01 00:00:00 +0000
+++ include/core/media/video/sink.h 2015-03-12 11:38:55 +0000
@@ -0,0 +1,76 @@
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#ifndef CORE_UBUNTU_MEDIA_VIDEO_SINK_H_
19#define CORE_UBUNTU_MEDIA_VIDEO_SINK_H_
20
21#include <core/signal.h>
22
23#include <memory>
24
25namespace core
26{
27namespace ubuntu
28{
29namespace media
30{
31namespace video
32{
33/** @brief A video sink abstracts a queue of buffers, that receives
34 * a stream of decoded video buffers from an arbitrary source.
35 */
36struct Sink
37{
38 /** @brief To save us some typing. */
39 typedef std::shared_ptr<Sink> Ptr;
40
41 /** @cond */
42 Sink() = default;
43 Sink(const Sink&) = delete;
44 virtual ~Sink() = default;
45
46 Sink& operator=(const Sink&) = delete;
47 /** @endcond */
48
49 /**
50 * @brief The signal is emitted whenever a new frame is available and a subsequent
51 * call to swap_buffers will not block and return true.
52 */
53 virtual const core::Signal<void>& frame_available() const = 0;
54
55 /**
56 * @brief Queries the 4x4 transformation matrix for the current frame, placing the data into 'matrix'.
57 * @param matrix [out] The destination array representing the matrix in column-major format.
58 * We expect at least 4*4 float elements in the array.
59 * @returns true iff the data has been set. Returns false and leaves 'matrix' unchanged in case of issues.
60 */
61 virtual bool transformation_matrix(float* matrix) const = 0;
62
63 /**
64 * @brief Releases the current buffer, and consumes the next buffer in the queue,
65 * making it available for consumption by consumers of this API in an
66 * implementation-specific way. Clients will usually rely on a GL texture
67 * to receive the latest buffer.
68 */
69 virtual bool swap_buffers() const = 0;
70};
71}
72}
73}
74}
75
76#endif // CORE_UBUNTU_MEDIA_VIDEO_SINK_H_
077
=== modified file 'src/core/media/CMakeLists.txt'
--- src/core/media/CMakeLists.txt 2014-11-12 19:10:24 +0000
+++ src/core/media/CMakeLists.txt 2015-03-12 11:38:55 +0000
@@ -6,7 +6,10 @@
6# out all symbols that are not in core::ubuntu::media*6# out all symbols that are not in core::ubuntu::media*
7set(symbol_map "${CMAKE_SOURCE_DIR}/symbols.map")7set(symbol_map "${CMAKE_SOURCE_DIR}/symbols.map")
88
9file(GLOB MPRIS_HEADERS mpris/ *.h)9file(GLOB_RECURSE MEDIA_HUB_HEADERS ${CMAKE_SOURCE_DIR}/include/*.h)
10file(GLOB MPRIS_HEADERS mpris/*.h)
11
12message(STATUS ${MEDIA_HUB_HEADERS})
1013
11add_subdirectory(call-monitor)14add_subdirectory(call-monitor)
1215
@@ -36,6 +39,8 @@
36add_library(39add_library(
37 media-hub-client SHARED40 media-hub-client SHARED
3841
42 ${MEDIA_HUB_HEADERS}
43
39 player.cpp44 player.cpp
40 service.cpp45 service.cpp
41 track.cpp46 track.cpp
@@ -44,6 +49,9 @@
44 player_stub.cpp49 player_stub.cpp
45 service_stub.cpp50 service_stub.cpp
46 track_list_stub.cpp51 track_list_stub.cpp
52
53 video/hybris_gl_sink.cpp
54 video/platform_default_sink.cpp
47)55)
4856
49set_target_properties(57set_target_properties(
@@ -75,6 +83,7 @@
75add_library(83add_library(
76 media-hub-service84 media-hub-service
7785
86 ${MEDIA_HUB_HEADERS}
78 ${MPRIS_HEADERS}87 ${MPRIS_HEADERS}
7988
80 cover_art_resolver.cpp89 cover_art_resolver.cpp
8190
=== modified file 'src/core/media/engine.h'
--- src/core/media/engine.h 2015-01-13 14:18:59 +0000
+++ src/core/media/engine.h 2015-03-12 11:38:55 +0000
@@ -75,8 +75,10 @@
7575
76 virtual const core::Property<State>& state() const = 0;76 virtual const core::Property<State>& state() const = 0;
7777
78 virtual bool open_resource_for_uri(const Track::UriType& uri) = 0;78 virtual bool open_resource_for_uri(const core::ubuntu::media::Track::UriType& uri) = 0;
79 virtual bool open_resource_for_uri(const core::ubuntu::media::Track::UriType& uri, const Player::HeadersType&) = 0;79 virtual bool open_resource_for_uri(const core::ubuntu::media::Track::UriType& uri, const Player::HeadersType&) = 0;
80 // Throws core::ubuntu::media::Player::Error::OutOfProcessBufferStreamingNotSupported if the implementation does not
81 // support this feature.
80 virtual void create_video_sink(uint32_t texture_id) = 0;82 virtual void create_video_sink(uint32_t texture_id) = 0;
8183
82 virtual bool play() = 0;84 virtual bool play() = 0;
8385
=== modified file 'src/core/media/mpris/player.h'
--- src/core/media/mpris/player.h 2015-01-13 14:18:59 +0000
+++ src/core/media/mpris/player.h 2015-03-12 11:38:55 +0000
@@ -103,6 +103,17 @@
103 static constexpr const char* stopped{"Stopped"};103 static constexpr const char* stopped{"Stopped"};
104 };104 };
105105
106 struct Error
107 {
108 struct OutOfProcessBufferStreamingNotSupported
109 {
110 static constexpr const char* name
111 {
112 "mpris.Player.Error.OutOfProcessBufferStreamingNotSupported"
113 };
114 };
115 };
116
106 typedef std::map<std::string, core::dbus::types::Variant> Dictionary;117 typedef std::map<std::string, core::dbus::types::Variant> Dictionary;
107118
108 DBUS_CPP_METHOD_DEF(Next, Player)119 DBUS_CPP_METHOD_DEF(Next, Player)
109120
=== modified file 'src/core/media/player.cpp'
--- src/core/media/player.cpp 2014-09-09 10:28:32 +0000
+++ src/core/media/player.cpp 2015-03-12 11:38:55 +0000
@@ -22,6 +22,11 @@
2222
23namespace media = core::ubuntu::media;23namespace media = core::ubuntu::media;
2424
25media::Player::Errors::OutOfProcessBufferStreamingNotSupported::OutOfProcessBufferStreamingNotSupported()
26 : std::runtime_error{"Implementation does not support out-of-process buffer streaming"}
27{
28}
29
25const media::Player::Configuration& media::Player::Client::default_configuration()30const media::Player::Configuration& media::Player::Client::default_configuration()
26{31{
27 static const media::Player::Configuration config32 static const media::Player::Configuration config
2833
=== modified file 'src/core/media/player_implementation.cpp'
--- src/core/media/player_implementation.cpp 2015-01-13 14:18:59 +0000
+++ src/core/media/player_implementation.cpp 2015-03-12 11:38:55 +0000
@@ -470,6 +470,12 @@
470 return d->key;470 return d->key;
471}471}
472472
473media::video::Sink::Ptr media::PlayerImplementation::create_gl_texture_video_sink(std::uint32_t texture_id)
474{
475 d->engine->create_video_sink(texture_id);
476 return media::video::Sink::Ptr{};
477}
478
473bool media::PlayerImplementation::open_uri(const Track::UriType& uri)479bool media::PlayerImplementation::open_uri(const Track::UriType& uri)
474{480{
475 return d->engine->open_resource_for_uri(uri);481 return d->engine->open_resource_for_uri(uri);
@@ -480,17 +486,6 @@
480 return d->engine->open_resource_for_uri(uri, headers);486 return d->engine->open_resource_for_uri(uri, headers);
481}487}
482488
483void media::PlayerImplementation::create_video_sink(uint32_t texture_id)
484{
485 d->engine->create_video_sink(texture_id);
486}
487
488media::Player::GLConsumerWrapperHybris media::PlayerImplementation::gl_consumer() const
489{
490 // This method is client-side only and is simply a no-op for the service side
491 return NULL;
492}
493
494void media::PlayerImplementation::next()489void media::PlayerImplementation::next()
495{490{
496}491}
@@ -515,18 +510,6 @@
515 d->engine->stop();510 d->engine->stop();
516}511}
517512
518void media::PlayerImplementation::set_frame_available_callback(
519 UNUSED FrameAvailableCb cb, UNUSED void *context)
520{
521 // This method is client-side only and is simply a no-op for the service side
522}
523
524void media::PlayerImplementation::set_playback_complete_callback(
525 UNUSED PlaybackCompleteCb cb, UNUSED void *context)
526{
527 // This method is client-side only and is simply a no-op for the service side
528}
529
530void media::PlayerImplementation::seek_to(const std::chrono::microseconds& ms)513void media::PlayerImplementation::seek_to(const std::chrono::microseconds& ms)
531{514{
532 d->engine->seek_to(ms);515 d->engine->seek_to(ms);
533516
=== modified file 'src/core/media/player_implementation.h'
--- src/core/media/player_implementation.h 2015-01-13 14:18:59 +0000
+++ src/core/media/player_implementation.h 2015-03-12 11:38:55 +0000
@@ -46,17 +46,15 @@
46 virtual std::shared_ptr<TrackList> track_list();46 virtual std::shared_ptr<TrackList> track_list();
47 virtual PlayerKey key() const;47 virtual PlayerKey key() const;
4848
49 virtual video::Sink::Ptr create_gl_texture_video_sink(std::uint32_t texture_id);
50
49 virtual bool open_uri(const Track::UriType& uri);51 virtual bool open_uri(const Track::UriType& uri);
50 virtual bool open_uri(const Track::UriType& uri, const Player::HeadersType& headers);52 virtual bool open_uri(const Track::UriType& uri, const Player::HeadersType& headers);
51 virtual void create_video_sink(uint32_t texture_id);
52 virtual GLConsumerWrapperHybris gl_consumer() const;
53 virtual void next();53 virtual void next();
54 virtual void previous();54 virtual void previous();
55 virtual void play();55 virtual void play();
56 virtual void pause();56 virtual void pause();
57 virtual void stop();57 virtual void stop();
58 virtual void set_frame_available_callback(FrameAvailableCb cb, void *context);
59 virtual void set_playback_complete_callback(PlaybackCompleteCb cb, void *context);
60 virtual void seek_to(const std::chrono::microseconds& offset);58 virtual void seek_to(const std::chrono::microseconds& offset);
6159
62 const core::Signal<>& on_client_disconnected() const;60 const core::Signal<>& on_client_disconnected() const;
6361
=== modified file 'src/core/media/player_skeleton.cpp'
--- src/core/media/player_skeleton.cpp 2015-01-13 14:18:59 +0000
+++ src/core/media/player_skeleton.cpp 2015-03-12 11:38:55 +0000
@@ -136,9 +136,29 @@
136 {136 {
137 uint32_t texture_id;137 uint32_t texture_id;
138 in->reader() >> texture_id;138 in->reader() >> texture_id;
139 impl->create_video_sink(texture_id);139
140140 core::dbus::Message::Ptr reply;
141 auto reply = dbus::Message::make_method_return(in);141
142 try
143 {
144 impl->create_gl_texture_video_sink(texture_id);
145 reply = dbus::Message::make_method_return(in);
146 }
147 catch (const media::Player::Errors::OutOfProcessBufferStreamingNotSupported& e)
148 {
149 reply = dbus::Message::make_error(
150 in,
151 mpris::Player::Error::OutOfProcessBufferStreamingNotSupported::name,
152 e.what());
153 }
154 catch (...)
155 {
156 reply = dbus::Message::make_error(
157 in,
158 mpris::Player::Error::OutOfProcessBufferStreamingNotSupported::name,
159 std::string{});
160 }
161
142 bus->send(reply);162 bus->send(reply);
143 }163 }
144164
145165
=== modified file 'src/core/media/player_stub.cpp'
--- src/core/media/player_stub.cpp 2015-01-19 18:38:29 +0000
+++ src/core/media/player_stub.cpp 2015-03-12 11:38:55 +0000
@@ -19,6 +19,7 @@
1919
20#include <core/media/service.h>20#include <core/media/service.h>
21#include <core/media/track_list.h>21#include <core/media/track_list.h>
22#include <core/media/video/platform_default_sink.h>
2223
23#include "codec.h"24#include "codec.h"
24#include "player_stub.h"25#include "player_stub.h"
@@ -48,13 +49,9 @@
48 Private(const std::shared_ptr<Service>& parent,49 Private(const std::shared_ptr<Service>& parent,
49 const std::shared_ptr<core::dbus::Object>& object50 const std::shared_ptr<core::dbus::Object>& object
50 ) : parent(parent),51 ) : parent(parent),
51 texture_id(0),
52 igbc_wrapper(nullptr),
53 glc_wrapper(nullptr),
54 decoding_session(nullptr),
55 frame_available_cb(nullptr),
56 frame_available_context(nullptr),
57 object(object),52 object(object),
53 key(object->invoke_method_synchronously<mpris::Player::Key, media::Player::PlayerKey>().value()),
54 sink_factory(media::video::make_platform_default_sink_factory(key)),
58 properties55 properties
59 {56 {
60 // Link the properties from the server side to the client side over the bus57 // Link the properties from the server side to the client side over the bus
@@ -89,64 +86,17 @@
89 object->get_signal<mpris::Player::Signals::Error>()86 object->get_signal<mpris::Player::Signals::Error>()
90 }87 }
91 {88 {
92 auto op = object->invoke_method_synchronously<mpris::Player::Key, media::Player::PlayerKey>();
93 decoding_session = decoding_service_create_session(op.value());
94 }89 }
9590
96 ~Private()91 ~Private()
97 {92 {
98 }93 }
9994
100 static void on_frame_available_cb(UNUSED GLConsumerWrapperHybris wrapper, void *context)
101 {
102 if (context != nullptr) {
103 Private *p = static_cast<Private*>(context);
104 p->on_frame_available();
105 }
106 else
107 std::cerr << "context is nullptr, can't call on_frame_available()" << std::endl;
108 }
109
110 void on_frame_available()
111 {
112 if (frame_available_cb != nullptr) {
113 frame_available_cb(frame_available_context);
114 }
115 else
116 std::cerr << "frame_available_cb is nullptr, can't call frame_available_cb()" << std::endl;
117 }
118
119 void set_frame_available_cb(FrameAvailableCb cb, void *context)
120 {
121 frame_available_cb = cb;
122 frame_available_context = context;
123
124 gl_consumer_set_frame_available_cb(glc_wrapper, &Private::on_frame_available_cb, static_cast<void*>(this));
125 }
126
127 /** We need a GLConsumerHybris instance for doing texture streaming over the
128 * process boundary **/
129 void get_gl_consumer()
130 {
131 igbc_wrapper = decoding_service_get_igraphicbufferconsumer();
132 glc_wrapper = gl_consumer_create_by_id_with_igbc(texture_id, igbc_wrapper);
133
134 }
135
136 std::shared_ptr<Service> parent;95 std::shared_ptr<Service> parent;
137 std::shared_ptr<TrackList> track_list;96 std::shared_ptr<TrackList> track_list;
138
139 uint32_t texture_id;
140 IGBCWrapperHybris igbc_wrapper;
141 GLConsumerWrapperHybris glc_wrapper;
142
143 DSSessionWrapperHybris decoding_session;
144
145 FrameAvailableCb frame_available_cb;
146 void *frame_available_context;
147
148 dbus::Object::Ptr object;97 dbus::Object::Ptr object;
14998 media::Player::PlayerKey key;
99 media::video::SinkFactory sink_factory;
150 struct100 struct
151 {101 {
152 std::shared_ptr<core::dbus::Property<mpris::Player::Properties::CanPlay>> can_play;102 std::shared_ptr<core::dbus::Property<mpris::Player::Properties::CanPlay>> can_play;
@@ -186,9 +136,7 @@
186 const std::shared_ptr<DBusPlaybackStatusChangedSignal>& status,136 const std::shared_ptr<DBusPlaybackStatusChangedSignal>& status,
187 const std::shared_ptr<DBusVideoDimensionChangedSignal>& d,137 const std::shared_ptr<DBusVideoDimensionChangedSignal>& d,
188 const std::shared_ptr<DBusErrorSignal>& e)138 const std::shared_ptr<DBusErrorSignal>& e)
189 : playback_complete_cb(nullptr),139 : seeked_to(),
190 playback_complete_context(nullptr),
191 seeked_to(),
192 end_of_stream(),140 end_of_stream(),
193 playback_status_changed(),141 playback_status_changed(),
194 video_dimension_changed(),142 video_dimension_changed(),
@@ -211,8 +159,6 @@
211 dbus.end_of_stream->connect([this]()159 dbus.end_of_stream->connect([this]()
212 {160 {
213 std::cout << "EndOfStream signal arrived via the bus." << std::endl;161 std::cout << "EndOfStream signal arrived via the bus." << std::endl;
214 if (playback_complete_cb)
215 playback_complete_cb(playback_complete_context);
216 end_of_stream();162 end_of_stream();
217 });163 });
218164
@@ -235,14 +181,6 @@
235 });181 });
236 }182 }
237183
238 void set_playback_complete_cb(PlaybackCompleteCb cb, void *context)
239 {
240 playback_complete_cb = cb;
241 playback_complete_context = context;
242 }
243
244 PlaybackCompleteCb playback_complete_cb;
245 void *playback_complete_context;
246 core::Signal<int64_t> seeked_to;184 core::Signal<int64_t> seeked_to;
247 core::Signal<void> end_of_stream;185 core::Signal<void> end_of_stream;
248 core::Signal<media::Player::PlaybackStatus> playback_status_changed;186 core::Signal<media::Player::PlaybackStatus> playback_status_changed;
@@ -284,9 +222,7 @@
284222
285media::Player::PlayerKey media::PlayerStub::key() const223media::Player::PlayerKey media::PlayerStub::key() const
286{224{
287 auto op = d->object->invoke_method_synchronously<mpris::Player::Key, media::Player::PlayerKey>();225 return d->key;
288
289 return op.value();
290}226}
291227
292bool media::PlayerStub::open_uri(const media::Track::UriType& uri)228bool media::PlayerStub::open_uri(const media::Track::UriType& uri)
@@ -296,6 +232,7 @@
296 return op.value();232 return op.value();
297}233}
298234
235
299bool media::PlayerStub::open_uri(const Track::UriType& uri, const Player::HeadersType& headers)236bool media::PlayerStub::open_uri(const Track::UriType& uri, const Player::HeadersType& headers)
300{237{
301 auto op = d->object->invoke_method_synchronously<mpris::Player::OpenUriExtended, bool>(uri, headers);238 auto op = d->object->invoke_method_synchronously<mpris::Player::OpenUriExtended, bool>(uri, headers);
@@ -303,19 +240,19 @@
303 return op.value();240 return op.value();
304}241}
305242
306void media::PlayerStub::create_video_sink(uint32_t texture_id)243media::video::Sink::Ptr media::PlayerStub::create_gl_texture_video_sink(std::uint32_t texture_id)
307{244{
308 auto op = d->object->invoke_method_synchronously<mpris::Player::CreateVideoSink, void>(texture_id);245 auto op = d->object->invoke_method_synchronously<mpris::Player::CreateVideoSink, void>(texture_id);
309 d->texture_id = texture_id;
310 d->get_gl_consumer();
311246
312 if (op.is_error())247 if (op.is_error())
313 throw std::runtime_error("Problem creating new video sink instance on remote object");248 {
314}249 if (op.error().name() == mpris::Player::Error::OutOfProcessBufferStreamingNotSupported::name)
250 throw media::Player::Errors::OutOfProcessBufferStreamingNotSupported{};
251 else
252 throw std::runtime_error{op.error().print()};
253 }
315254
316GLConsumerWrapperHybris media::PlayerStub::gl_consumer() const255 return d->sink_factory(texture_id);
317{
318 return d->glc_wrapper;
319}256}
320257
321void media::PlayerStub::next()258void media::PlayerStub::next()
@@ -366,16 +303,6 @@
366 throw std::runtime_error("Problem stopping playback on remote object");303 throw std::runtime_error("Problem stopping playback on remote object");
367}304}
368305
369void media::PlayerStub::set_frame_available_callback(FrameAvailableCb cb, void *context)
370{
371 d->set_frame_available_cb(cb, context);
372}
373
374void media::PlayerStub::set_playback_complete_callback(PlaybackCompleteCb cb, void *context)
375{
376 d->signals.set_playback_complete_cb(cb, context);
377}
378
379const core::Property<bool>& media::PlayerStub::can_play() const306const core::Property<bool>& media::PlayerStub::can_play() const
380{307{
381 return *d->properties.can_play;308 return *d->properties.can_play;
382309
=== modified file 'src/core/media/player_stub.h'
--- src/core/media/player_stub.h 2015-01-13 14:18:59 +0000
+++ src/core/media/player_stub.h 2015-03-12 11:38:55 +0000
@@ -46,10 +46,10 @@
46 virtual std::shared_ptr<TrackList> track_list();46 virtual std::shared_ptr<TrackList> track_list();
47 virtual PlayerKey key() const;47 virtual PlayerKey key() const;
4848
49 virtual video::Sink::Ptr create_gl_texture_video_sink(std::uint32_t texture_id);
50
49 virtual bool open_uri(const Track::UriType& uri);51 virtual bool open_uri(const Track::UriType& uri);
50 virtual bool open_uri(const Track::UriType& uri, const Player::HeadersType& headers);52 virtual bool open_uri(const Track::UriType& uri, const Player::HeadersType& headers);
51 virtual void create_video_sink(uint32_t texture_id);
52 virtual GLConsumerWrapperHybris gl_consumer() const;
53 virtual void next();53 virtual void next();
54 virtual void previous();54 virtual void previous();
55 virtual void play();55 virtual void play();
@@ -57,9 +57,6 @@
57 virtual void seek_to(const std::chrono::microseconds& offset);57 virtual void seek_to(const std::chrono::microseconds& offset);
58 virtual void stop();58 virtual void stop();
5959
60 virtual void set_frame_available_callback(FrameAvailableCb cb, void *context);
61 virtual void set_playback_complete_callback(PlaybackCompleteCb cb, void *context);
62
63 virtual const core::Property<bool>& can_play() const;60 virtual const core::Property<bool>& can_play() const;
64 virtual const core::Property<bool>& can_pause() const;61 virtual const core::Property<bool>& can_pause() const;
65 virtual const core::Property<bool>& can_seek() const;62 virtual const core::Property<bool>& can_seek() const;
6663
=== added directory 'src/core/media/video'
=== added file 'src/core/media/video/hybris_gl_sink.cpp'
--- src/core/media/video/hybris_gl_sink.cpp 1970-01-01 00:00:00 +0000
+++ src/core/media/video/hybris_gl_sink.cpp 2015-03-12 11:38:55 +0000
@@ -0,0 +1,116 @@
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/video/hybris_gl_sink.h>
20
21#if defined(MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER)
22// Hybris
23#include <hybris/media/media_codec_layer.h>
24#include <hybris/media/surface_texture_client_hybris.h>
25
26namespace media = core::ubuntu::media;
27namespace video = core::ubuntu::media::video;
28
29struct video::HybrisGlSink::Private
30{
31 static void on_frame_available_callback(GLConsumerWrapperHybris, void* context)
32 {
33 if (not context)
34 return;
35
36 auto thiz = static_cast<Private*>(context);
37
38 thiz->frame_available();
39 }
40
41 Private(std::uint32_t gl_texture)
42 : gl_texture{gl_texture},
43 graphics_buffer_consumer{decoding_service_get_igraphicbufferconsumer()},
44 gl_texture_consumer{gl_consumer_create_by_id_with_igbc(gl_texture, graphics_buffer_consumer)}
45 {
46 if (not graphics_buffer_consumer) throw std::runtime_error
47 {
48 "video::HybrisGlSink: Could not connect to remote buffer queue."
49 };
50
51 if (not gl_texture_consumer) throw std::runtime_error
52 {
53 "video::HybrisGlSink: Could not associate local texture id with remote buffer streak."
54 };
55
56 gl_consumer_set_frame_available_cb(gl_texture_consumer, Private::on_frame_available_callback, this);
57 }
58
59 ~Private()
60 {
61 gl_consumer_set_frame_available_cb(gl_texture_consumer, Private::on_frame_available_callback, nullptr);
62 }
63
64 std::uint32_t gl_texture;
65 core::Signal<void> frame_available;
66 IGBCWrapperHybris graphics_buffer_consumer;
67 GLConsumerWrapperHybris gl_texture_consumer;
68};
69
70std::function<video::Sink::Ptr(std::uint32_t)> video::HybrisGlSink::factory_for_key(const media::Player::PlayerKey& key)
71{
72 // It's okay-ish to use static map here. Point being that we currently have no way
73 // of terminating the session with the decoding service anyway.
74 static std::map<media::Player::PlayerKey, DSSessionWrapperHybris> lut;
75 static std::mutex lut_guard;
76
77 // Scoping access to the lut to ensure that the lock is kept for as short as possible.
78 {
79 std::lock_guard<std::mutex> lg{lut_guard};
80 if (lut.count(key) == 0)
81 lut[key] = decoding_service_create_session(key);
82 }
83
84 return [](std::uint32_t texture)
85 {
86 return video::Sink::Ptr{new video::HybrisGlSink{texture}};
87 };
88}
89
90video::HybrisGlSink::HybrisGlSink(std::uint32_t gl_texture) : d{new Private{gl_texture}}
91{
92}
93
94video::HybrisGlSink::~HybrisGlSink()
95{
96}
97
98const core::Signal<void>& video::HybrisGlSink::frame_available() const
99{
100 return d->frame_available;
101}
102
103bool video::HybrisGlSink::transformation_matrix(float* matrix) const
104{
105 // TODO: The underlying API really should tell us if everything is ok.
106 gl_consumer_get_transformation_matrix(d->gl_texture_consumer, matrix);
107 return true;
108}
109
110bool video::HybrisGlSink::swap_buffers() const
111{
112 // TODO: The underlying API really should tell us if everything is ok.
113 gl_consumer_update_texture(d->gl_texture_consumer);
114 return true;
115}
116#endif // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
0117
=== added file 'src/core/media/video/hybris_gl_sink.h'
--- src/core/media/video/hybris_gl_sink.h 1970-01-01 00:00:00 +0000
+++ src/core/media/video/hybris_gl_sink.h 2015-03-12 11:38:55 +0000
@@ -0,0 +1,72 @@
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#ifndef CORE_UBUNTU_MEDIA_VIDEO_HYBRIS_GL_SINK_H_
19#define CORE_UBUNTU_MEDIA_VIDEO_HYBRIS_GL_SINK_H_
20
21#include <core/media/video/sink.h>
22
23#include <core/media/player.h>
24
25#include <functional>
26
27namespace core
28{
29namespace ubuntu
30{
31namespace media
32{
33namespace video
34{
35class HybrisGlSink : public video::Sink
36{
37public:
38 // Returns a factory functor that allows for creating actual sink instances.
39 static std::function<video::Sink::Ptr(std::uint32_t)> factory_for_key(const media::Player::PlayerKey&);
40
41 // Need this to avoid std::unique_ptr complaining about forward-declared Private.
42 ~HybrisGlSink();
43
44 // The signal is emitted whenever a new frame is available and a subsequent
45 // call to swap_buffers will not block and return true.
46 const core::Signal<void>& frame_available() const override;
47
48 // Queries the transformation matrix for the current frame, placing the data into 'matrix'
49 // and returns true or returns false and leaves 'matrix' unchanged in case
50 // of issues.
51 bool transformation_matrix(float* matrix) const override;
52
53 // Releases the current buffer, and consumes the next buffer in the queue,
54 // making it available for consumption by consumers of this API in an
55 // implementation-specific way. Clients will usually rely on a GL texture
56 // to receive the latest buffer.
57 bool swap_buffers() const override;
58
59private:
60 // Creates a new instance for the given gl texture, connecting to the remote part known
61 // under the given key or throw in case of issues.
62 HybrisGlSink(std::uint32_t gl_texture);
63
64 struct Private;
65 std::unique_ptr<Private> d;
66};
67}
68}
69}
70}
71
72#endif // CORE_UBUNTU_MEDIA_VIDEO_HYBRIS_GL_SINK_H_
073
=== added file 'src/core/media/video/platform_default_sink.cpp'
--- src/core/media/video/platform_default_sink.cpp 1970-01-01 00:00:00 +0000
+++ src/core/media/video/platform_default_sink.cpp 2015-03-12 11:38:55 +0000
@@ -0,0 +1,68 @@
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/video/platform_default_sink.h>
20
21namespace media = core::ubuntu::media;
22namespace video = core::ubuntu::media::video;
23
24namespace
25{
26struct NullSink : public video::Sink
27{
28 // The signal is emitted whenever a new frame is available and a subsequent
29 // call to swap_buffers will not block and return true.
30 const core::Signal<void>& frame_available() const
31 {
32 return signal_frame_available;
33 }
34
35 // Queries the transformation matrix for the current frame, placing the data into 'matrix'
36 // and returns true or returns false and leaves 'matrix' unchanged in case
37 // of issues.
38 bool transformation_matrix(float*) const
39 {
40 return true;
41 }
42
43 // Releases the current buffer, and consumes the next buffer in the queue,
44 // making it available for consumption by consumers of this API in an
45 // implementation-specific way. Clients will usually rely on a GL texture
46 // to receive the latest buffer.
47 bool swap_buffers() const
48 {
49 return true;
50 }
51
52 core::Signal<void> signal_frame_available;
53};
54}
55
56#if defined(MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER)
57#include <core/media/video/hybris_gl_sink.h>
58
59video::SinkFactory video::make_platform_default_sink_factory(const media::Player::PlayerKey& key)
60{
61 return video::HybrisGlSink::factory_for_key(key);
62}
63#else // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
64video::SinkFactory video::make_platform_default_sink_factory(const media::Player::PlayerKey&)
65{
66 return [](std::uint32_t) { return video::Sink::Ptr{}; };
67}
68#endif // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
069
=== added file 'src/core/media/video/platform_default_sink.h'
--- src/core/media/video/platform_default_sink.h 1970-01-01 00:00:00 +0000
+++ src/core/media/video/platform_default_sink.h 2015-03-12 11:38:55 +0000
@@ -0,0 +1,44 @@
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#ifndef CORE_UBUNTU_MEDIA_VIDEO_PLATFORM_DEFAULT_SINK_H_
19#define CORE_UBUNTU_MEDIA_VIDEO_PLATFORM_DEFAULT_SINK_H_
20
21#include <core/media/video/sink.h>
22
23#include <core/media/player.h>
24
25#include <functional>
26
27namespace core
28{
29namespace ubuntu
30{
31namespace media
32{
33namespace video
34{
35// A functor that allows for creating actual sinks given a texture id.
36typedef std::function<Sink::Ptr(std::uint32_t)> SinkFactory;
37// Returns the platform default sink factory for the player instance identified by the given key.
38SinkFactory make_platform_default_sink_factory(const Player::PlayerKey& key);
39}
40}
41}
42}
43
44#endif // CORE_UBUNTU_MEDIA_VIDEO_PLATFORM_DEFAULT_SINK_H_

Subscribers

People subscribed via source and target branches