Merge lp:~jhodapp/media-hub/orientation into lp:media-hub
- orientation
- Merge into trunk
Status: | Approved |
---|---|
Approved by: | Ricardo Salveti |
Approved revision: | 71 |
Proposed branch: | lp:~jhodapp/media-hub/orientation |
Merge into: | lp:media-hub |
Diff against target: |
882 lines (+290/-22) 14 files modified
include/core/media/player.h (+14/-0) src/core/media/codec.h (+40/-0) src/core/media/engine.h (+3/-0) src/core/media/gstreamer/bus.h (+1/-1) src/core/media/gstreamer/engine.cpp (+41/-1) src/core/media/gstreamer/engine.h (+3/-0) src/core/media/gstreamer/meta_data_extractor.h (+1/-1) src/core/media/gstreamer/playbin.h (+79/-5) src/core/media/mpris/player.h (+17/-2) src/core/media/player_implementation.cpp (+17/-1) src/core/media/player_skeleton.cpp (+35/-7) src/core/media/player_skeleton.h (+6/-0) src/core/media/player_stub.cpp (+30/-4) src/core/media/player_stub.h (+3/-0) |
To merge this branch: | bzr merge lp:~jhodapp/media-hub/orientation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ricardo Salveti (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+238355@code.launchpad.net |
Commit message
* Add an Orientation property which will indicate how the video should be rotated for playback vs how it was recorded.
* Get the video frame height/width from mirsink and pass it to the media-hub client via a Signal.
Description of the change
* Add an Orientation property which will indicate how the video should be rotated for playback vs how it was recorded.
* Get the video frame height/width from mirsink and pass it to the media-hub client via a Signal.
PS Jenkins bot (ps-jenkins) wrote : | # |
- 71. By Jim Hodapp
-
Merged with trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:71
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 72. By Jim Hodapp
-
Only get the video dimensions and signal the client of the dimensions changing when playing a video.
Unmerged revisions
- 72. By Jim Hodapp
-
Only get the video dimensions and signal the client of the dimensions changing when playing a video.
Preview Diff
1 | === modified file 'include/core/media/player.h' | |||
2 | --- include/core/media/player.h 2014-09-08 10:16:38 +0000 | |||
3 | +++ include/core/media/player.h 2014-10-22 16:15:30 +0000 | |||
4 | @@ -86,6 +86,14 @@ | |||
5 | 86 | phone | 86 | phone |
6 | 87 | }; | 87 | }; |
7 | 88 | 88 | ||
8 | 89 | enum Orientation | ||
9 | 90 | { | ||
10 | 91 | rotate0, | ||
11 | 92 | rotate90, | ||
12 | 93 | rotate180, | ||
13 | 94 | rotate270 | ||
14 | 95 | }; | ||
15 | 96 | |||
16 | 89 | Player(const Player&) = delete; | 97 | Player(const Player&) = delete; |
17 | 90 | virtual ~Player(); | 98 | virtual ~Player(); |
18 | 91 | 99 | ||
19 | @@ -127,6 +135,7 @@ | |||
20 | 127 | virtual const core::Property<int64_t>& position() const = 0; | 135 | virtual const core::Property<int64_t>& position() const = 0; |
21 | 128 | virtual const core::Property<int64_t>& duration() const = 0; | 136 | virtual const core::Property<int64_t>& duration() const = 0; |
22 | 129 | virtual const core::Property<AudioStreamRole>& audio_stream_role() const = 0; | 137 | virtual const core::Property<AudioStreamRole>& audio_stream_role() const = 0; |
23 | 138 | virtual const core::Property<Orientation>& orientation() const = 0; | ||
24 | 130 | 139 | ||
25 | 131 | virtual core::Property<LoopStatus>& loop_status() = 0; | 140 | virtual core::Property<LoopStatus>& loop_status() = 0; |
26 | 132 | virtual core::Property<PlaybackRate>& playback_rate() = 0; | 141 | virtual core::Property<PlaybackRate>& playback_rate() = 0; |
27 | @@ -137,6 +146,11 @@ | |||
28 | 137 | virtual const core::Signal<int64_t>& seeked_to() const = 0; | 146 | virtual const core::Signal<int64_t>& seeked_to() const = 0; |
29 | 138 | virtual const core::Signal<void>& end_of_stream() const = 0; | 147 | virtual const core::Signal<void>& end_of_stream() const = 0; |
30 | 139 | virtual core::Signal<PlaybackStatus>& playback_status_changed() = 0; | 148 | virtual core::Signal<PlaybackStatus>& playback_status_changed() = 0; |
31 | 149 | /** | ||
32 | 150 | * Called when the video height/width change. Passes height and width as a bitmask with | ||
33 | 151 | * height in the upper 32 bits and width in the lower 32 bits (both unsigned values) | ||
34 | 152 | */ | ||
35 | 153 | virtual const core::Signal<uint64_t>& video_dimension_changed() const = 0; | ||
36 | 140 | protected: | 154 | protected: |
37 | 141 | Player(); | 155 | Player(); |
38 | 142 | 156 | ||
39 | 143 | 157 | ||
40 | === modified file 'src/core/media/codec.h' | |||
41 | --- src/core/media/codec.h 2014-08-29 14:03:42 +0000 | |||
42 | +++ src/core/media/codec.h 2014-10-22 16:15:30 +0000 | |||
43 | @@ -190,6 +190,46 @@ | |||
44 | 190 | } | 190 | } |
45 | 191 | }; | 191 | }; |
46 | 192 | 192 | ||
47 | 193 | namespace helper | ||
48 | 194 | { | ||
49 | 195 | template<> | ||
50 | 196 | struct TypeMapper<core::ubuntu::media::Player::Orientation> | ||
51 | 197 | { | ||
52 | 198 | constexpr static ArgumentType type_value() | ||
53 | 199 | { | ||
54 | 200 | return core::dbus::ArgumentType::int16; | ||
55 | 201 | } | ||
56 | 202 | constexpr static bool is_basic_type() | ||
57 | 203 | { | ||
58 | 204 | return false; | ||
59 | 205 | } | ||
60 | 206 | constexpr static bool requires_signature() | ||
61 | 207 | { | ||
62 | 208 | return false; | ||
63 | 209 | } | ||
64 | 210 | |||
65 | 211 | static std::string signature() | ||
66 | 212 | { | ||
67 | 213 | static const std::string s = TypeMapper<std::int16_t>::signature(); | ||
68 | 214 | return s; | ||
69 | 215 | } | ||
70 | 216 | }; | ||
71 | 217 | } | ||
72 | 218 | |||
73 | 219 | template<> | ||
74 | 220 | struct Codec<core::ubuntu::media::Player::Orientation> | ||
75 | 221 | { | ||
76 | 222 | static void encode_argument(core::dbus::Message::Writer& out, const core::ubuntu::media::Player::Orientation& in) | ||
77 | 223 | { | ||
78 | 224 | out.push_int16(static_cast<std::int16_t>(in)); | ||
79 | 225 | } | ||
80 | 226 | |||
81 | 227 | static void decode_argument(core::dbus::Message::Reader& out, core::ubuntu::media::Player::Orientation& in) | ||
82 | 228 | { | ||
83 | 229 | in = static_cast<core::ubuntu::media::Player::Orientation>(out.pop_int16()); | ||
84 | 230 | } | ||
85 | 231 | }; | ||
86 | 232 | |||
87 | 193 | } | 233 | } |
88 | 194 | } | 234 | } |
89 | 195 | 235 | ||
90 | 196 | 236 | ||
91 | === modified file 'src/core/media/engine.h' | |||
92 | --- src/core/media/engine.h 2014-09-08 10:16:38 +0000 | |||
93 | +++ src/core/media/engine.h 2014-10-22 16:15:30 +0000 | |||
94 | @@ -95,6 +95,8 @@ | |||
95 | 95 | virtual const core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role() const = 0; | 95 | virtual const core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role() const = 0; |
96 | 96 | virtual core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role() = 0; | 96 | virtual core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role() = 0; |
97 | 97 | 97 | ||
98 | 98 | virtual const core::Property<core::ubuntu::media::Player::Orientation>& orientation() const = 0; | ||
99 | 99 | |||
100 | 98 | virtual const core::Property<std::tuple<Track::UriType, Track::MetaData>>& track_meta_data() const = 0; | 100 | virtual const core::Property<std::tuple<Track::UriType, Track::MetaData>>& track_meta_data() const = 0; |
101 | 99 | 101 | ||
102 | 100 | virtual const core::Signal<void>& about_to_finish_signal() const = 0; | 102 | virtual const core::Signal<void>& about_to_finish_signal() const = 0; |
103 | @@ -102,6 +104,7 @@ | |||
104 | 102 | virtual const core::Signal<void>& client_disconnected_signal() const = 0; | 104 | virtual const core::Signal<void>& client_disconnected_signal() const = 0; |
105 | 103 | virtual const core::Signal<void>& end_of_stream_signal() const = 0; | 105 | virtual const core::Signal<void>& end_of_stream_signal() const = 0; |
106 | 104 | virtual const core::Signal<core::ubuntu::media::Player::PlaybackStatus>& playback_status_changed_signal() const = 0; | 106 | virtual const core::Signal<core::ubuntu::media::Player::PlaybackStatus>& playback_status_changed_signal() const = 0; |
107 | 107 | virtual const core::Signal<uint32_t, uint32_t>& video_dimension_changed_signal() const = 0; | ||
108 | 105 | }; | 108 | }; |
109 | 106 | } | 109 | } |
110 | 107 | } | 110 | } |
111 | 108 | 111 | ||
112 | === modified file 'src/core/media/gstreamer/bus.h' | |||
113 | --- src/core/media/gstreamer/bus.h 2014-07-21 23:14:55 +0000 | |||
114 | +++ src/core/media/gstreamer/bus.h 2014-10-22 16:15:30 +0000 | |||
115 | @@ -93,7 +93,7 @@ | |||
116 | 93 | &detail.tag.tag_list); | 93 | &detail.tag.tag_list); |
117 | 94 | cleanup = [this]() | 94 | cleanup = [this]() |
118 | 95 | { | 95 | { |
120 | 96 | gst_tag_list_free(detail.tag.tag_list); | 96 | gst_tag_list_unref(detail.tag.tag_list); |
121 | 97 | }; | 97 | }; |
122 | 98 | break; | 98 | break; |
123 | 99 | case GST_MESSAGE_BUFFERING: | 99 | case GST_MESSAGE_BUFFERING: |
124 | 100 | 100 | ||
125 | === modified file 'src/core/media/gstreamer/engine.cpp' | |||
126 | --- src/core/media/gstreamer/engine.cpp 2014-10-08 00:09:21 +0000 | |||
127 | +++ src/core/media/gstreamer/engine.cpp 2014-10-22 16:15:30 +0000 | |||
128 | @@ -72,6 +72,13 @@ | |||
129 | 72 | playbin.set_audio_stream_role(new_audio_role); | 72 | playbin.set_audio_stream_role(new_audio_role); |
130 | 73 | } | 73 | } |
131 | 74 | 74 | ||
132 | 75 | void on_orientation_changed(const media::Player::Orientation& o) | ||
133 | 76 | { | ||
134 | 77 | // Update the local orientation Property, which should then update the Player | ||
135 | 78 | // orientation Property | ||
136 | 79 | orientation.set(o); | ||
137 | 80 | } | ||
138 | 81 | |||
139 | 75 | void on_about_to_finish() | 82 | void on_about_to_finish() |
140 | 76 | { | 83 | { |
141 | 77 | state = Engine::State::ready; | 84 | state = Engine::State::ready; |
142 | @@ -93,9 +100,15 @@ | |||
143 | 93 | end_of_stream(); | 100 | end_of_stream(); |
144 | 94 | } | 101 | } |
145 | 95 | 102 | ||
146 | 103 | void on_video_dimension_changed(uint32_t height, uint32_t width) | ||
147 | 104 | { | ||
148 | 105 | video_dimension_changed(height, width); | ||
149 | 106 | } | ||
150 | 107 | |||
151 | 96 | Private() | 108 | Private() |
152 | 97 | : meta_data_extractor(new gstreamer::MetaDataExtractor()), | 109 | : meta_data_extractor(new gstreamer::MetaDataExtractor()), |
153 | 98 | volume(media::Engine::Volume(1.)), | 110 | volume(media::Engine::Volume(1.)), |
154 | 111 | orientation(media::Player::Orientation::rotate0), | ||
155 | 99 | is_video_source(false), | 112 | is_video_source(false), |
156 | 100 | is_audio_source(false), | 113 | is_audio_source(false), |
157 | 101 | about_to_finish_connection( | 114 | about_to_finish_connection( |
158 | @@ -127,6 +140,12 @@ | |||
159 | 127 | &Private::on_audio_stream_role_changed, | 140 | &Private::on_audio_stream_role_changed, |
160 | 128 | this, | 141 | this, |
161 | 129 | std::placeholders::_1))), | 142 | std::placeholders::_1))), |
162 | 143 | on_orientation_changed_connection( | ||
163 | 144 | playbin.signals.on_orientation_changed.connect( | ||
164 | 145 | std::bind( | ||
165 | 146 | &Private::on_orientation_changed, | ||
166 | 147 | this, | ||
167 | 148 | std::placeholders::_1))), | ||
168 | 130 | on_seeked_to_connection( | 149 | on_seeked_to_connection( |
169 | 131 | playbin.signals.on_seeked_to.connect( | 150 | playbin.signals.on_seeked_to.connect( |
170 | 132 | std::bind( | 151 | std::bind( |
171 | @@ -142,7 +161,14 @@ | |||
172 | 142 | playbin.signals.on_end_of_stream.connect( | 161 | playbin.signals.on_end_of_stream.connect( |
173 | 143 | std::bind( | 162 | std::bind( |
174 | 144 | &Private::on_end_of_stream, | 163 | &Private::on_end_of_stream, |
176 | 145 | this))) | 164 | this))), |
177 | 165 | on_video_dimension_changed_connection( | ||
178 | 166 | playbin.signals.on_add_frame_dimension.connect( | ||
179 | 167 | std::bind( | ||
180 | 168 | &Private::on_video_dimension_changed, | ||
181 | 169 | this, | ||
182 | 170 | std::placeholders::_1, | ||
183 | 171 | std::placeholders::_2))) | ||
184 | 146 | { | 172 | { |
185 | 147 | } | 173 | } |
186 | 148 | 174 | ||
187 | @@ -157,6 +183,7 @@ | |||
188 | 157 | core::Property<uint64_t> duration; | 183 | core::Property<uint64_t> duration; |
189 | 158 | core::Property<media::Engine::Volume> volume; | 184 | core::Property<media::Engine::Volume> volume; |
190 | 159 | core::Property<media::Player::AudioStreamRole> audio_role; | 185 | core::Property<media::Player::AudioStreamRole> audio_role; |
191 | 186 | core::Property<media::Player::Orientation> orientation; | ||
192 | 160 | core::Property<bool> is_video_source; | 187 | core::Property<bool> is_video_source; |
193 | 161 | core::Property<bool> is_audio_source; | 188 | core::Property<bool> is_audio_source; |
194 | 162 | 189 | ||
195 | @@ -165,15 +192,18 @@ | |||
196 | 165 | core::ScopedConnection on_tag_available_connection; | 192 | core::ScopedConnection on_tag_available_connection; |
197 | 166 | core::ScopedConnection on_volume_changed_connection; | 193 | core::ScopedConnection on_volume_changed_connection; |
198 | 167 | core::ScopedConnection on_audio_stream_role_changed_connection; | 194 | core::ScopedConnection on_audio_stream_role_changed_connection; |
199 | 195 | core::ScopedConnection on_orientation_changed_connection; | ||
200 | 168 | core::ScopedConnection on_seeked_to_connection; | 196 | core::ScopedConnection on_seeked_to_connection; |
201 | 169 | core::ScopedConnection client_disconnected_connection; | 197 | core::ScopedConnection client_disconnected_connection; |
202 | 170 | core::ScopedConnection on_end_of_stream_connection; | 198 | core::ScopedConnection on_end_of_stream_connection; |
203 | 199 | core::ScopedConnection on_video_dimension_changed_connection; | ||
204 | 171 | 200 | ||
205 | 172 | core::Signal<void> about_to_finish; | 201 | core::Signal<void> about_to_finish; |
206 | 173 | core::Signal<uint64_t> seeked_to; | 202 | core::Signal<uint64_t> seeked_to; |
207 | 174 | core::Signal<void> client_disconnected; | 203 | core::Signal<void> client_disconnected; |
208 | 175 | core::Signal<void> end_of_stream; | 204 | core::Signal<void> end_of_stream; |
209 | 176 | core::Signal<media::Player::PlaybackStatus> playback_status_changed; | 205 | core::Signal<media::Player::PlaybackStatus> playback_status_changed; |
210 | 206 | core::Signal<uint32_t, uint32_t> video_dimension_changed; | ||
211 | 177 | }; | 207 | }; |
212 | 178 | 208 | ||
213 | 179 | gstreamer::Engine::Engine() : d(new Private{}) | 209 | gstreamer::Engine::Engine() : d(new Private{}) |
214 | @@ -313,6 +343,11 @@ | |||
215 | 313 | return d->audio_role; | 343 | return d->audio_role; |
216 | 314 | } | 344 | } |
217 | 315 | 345 | ||
218 | 346 | const core::Property<core::ubuntu::media::Player::Orientation>& gstreamer::Engine::orientation() const | ||
219 | 347 | { | ||
220 | 348 | return d->orientation; | ||
221 | 349 | } | ||
222 | 350 | |||
223 | 316 | const core::Property<std::tuple<media::Track::UriType, media::Track::MetaData>>& | 351 | const core::Property<std::tuple<media::Track::UriType, media::Track::MetaData>>& |
224 | 317 | gstreamer::Engine::track_meta_data() const | 352 | gstreamer::Engine::track_meta_data() const |
225 | 318 | { | 353 | { |
226 | @@ -343,3 +378,8 @@ | |||
227 | 343 | { | 378 | { |
228 | 344 | return d->playback_status_changed; | 379 | return d->playback_status_changed; |
229 | 345 | } | 380 | } |
230 | 381 | |||
231 | 382 | const core::Signal<uint32_t, uint32_t>& gstreamer::Engine::video_dimension_changed_signal() const | ||
232 | 383 | { | ||
233 | 384 | return d->video_dimension_changed; | ||
234 | 385 | } | ||
235 | 346 | 386 | ||
236 | === modified file 'src/core/media/gstreamer/engine.h' | |||
237 | --- src/core/media/gstreamer/engine.h 2014-08-29 14:03:42 +0000 | |||
238 | +++ src/core/media/gstreamer/engine.h 2014-10-22 16:15:30 +0000 | |||
239 | @@ -53,6 +53,8 @@ | |||
240 | 53 | const core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role() const; | 53 | const core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role() const; |
241 | 54 | core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role(); | 54 | core::Property<core::ubuntu::media::Player::AudioStreamRole>& audio_stream_role(); |
242 | 55 | 55 | ||
243 | 56 | const core::Property<core::ubuntu::media::Player::Orientation>& orientation() const; | ||
244 | 57 | |||
245 | 56 | const core::Property<std::tuple<core::ubuntu::media::Track::UriType, core::ubuntu::media::Track::MetaData>>& track_meta_data() const; | 58 | const core::Property<std::tuple<core::ubuntu::media::Track::UriType, core::ubuntu::media::Track::MetaData>>& track_meta_data() const; |
246 | 57 | 59 | ||
247 | 58 | const core::Signal<void>& about_to_finish_signal() const; | 60 | const core::Signal<void>& about_to_finish_signal() const; |
248 | @@ -60,6 +62,7 @@ | |||
249 | 60 | const core::Signal<void>& client_disconnected_signal() const; | 62 | const core::Signal<void>& client_disconnected_signal() const; |
250 | 61 | const core::Signal<void>& end_of_stream_signal() const; | 63 | const core::Signal<void>& end_of_stream_signal() const; |
251 | 62 | const core::Signal<core::ubuntu::media::Player::PlaybackStatus>& playback_status_changed_signal() const; | 64 | const core::Signal<core::ubuntu::media::Player::PlaybackStatus>& playback_status_changed_signal() const; |
252 | 65 | const core::Signal<uint32_t, uint32_t>& video_dimension_changed_signal() const; | ||
253 | 63 | 66 | ||
254 | 64 | private: | 67 | private: |
255 | 65 | struct Private; | 68 | struct Private; |
256 | 66 | 69 | ||
257 | === modified file 'src/core/media/gstreamer/meta_data_extractor.h' | |||
258 | --- src/core/media/gstreamer/meta_data_extractor.h 2014-08-26 20:34:30 +0000 | |||
259 | +++ src/core/media/gstreamer/meta_data_extractor.h 2014-10-22 16:15:30 +0000 | |||
260 | @@ -216,7 +216,7 @@ | |||
261 | 216 | } | 216 | } |
262 | 217 | 217 | ||
263 | 218 | gst_object_unref (sinkpad); | 218 | gst_object_unref (sinkpad); |
265 | 219 | } | 219 | } |
266 | 220 | 220 | ||
267 | 221 | GstElement* pipe; | 221 | GstElement* pipe; |
268 | 222 | GstElement* decoder; | 222 | GstElement* decoder; |
269 | 223 | 223 | ||
270 | === modified file 'src/core/media/gstreamer/playbin.h' | |||
271 | --- src/core/media/gstreamer/playbin.h 2014-10-10 16:03:24 +0000 | |||
272 | +++ src/core/media/gstreamer/playbin.h 2014-10-22 16:15:30 +0000 | |||
273 | @@ -31,6 +31,12 @@ | |||
274 | 31 | #include <chrono> | 31 | #include <chrono> |
275 | 32 | #include <string> | 32 | #include <string> |
276 | 33 | 33 | ||
277 | 34 | // Uncomment to generate a dot file at the time that the pipeline | ||
278 | 35 | // goes to the PLAYING state. Make sure to export GST_DEBUG_DUMP_DOT_DIR | ||
279 | 36 | // before starting media-hub-server. To convert the dot file to something | ||
280 | 37 | // other image format, use: dot pipeline.dot -Tpng -o pipeline.png | ||
281 | 38 | //#define DEBUG_GST_PIPELINE | ||
282 | 39 | |||
283 | 34 | namespace media = core::ubuntu::media; | 40 | namespace media = core::ubuntu::media; |
284 | 35 | 41 | ||
285 | 36 | namespace gstreamer | 42 | namespace gstreamer |
286 | @@ -68,6 +74,9 @@ | |||
287 | 68 | : pipeline(gst_element_factory_make("playbin", pipeline_name().c_str())), | 74 | : pipeline(gst_element_factory_make("playbin", pipeline_name().c_str())), |
288 | 69 | bus{gst_element_get_bus(pipeline)}, | 75 | bus{gst_element_get_bus(pipeline)}, |
289 | 70 | file_type(MEDIA_FILE_TYPE_NONE), | 76 | file_type(MEDIA_FILE_TYPE_NONE), |
290 | 77 | video_sink(nullptr), | ||
291 | 78 | video_height(0), | ||
292 | 79 | video_width(0), | ||
293 | 71 | on_new_message_connection( | 80 | on_new_message_connection( |
294 | 72 | bus.on_new_message.connect( | 81 | bus.on_new_message.connect( |
295 | 73 | std::bind( | 82 | std::bind( |
296 | @@ -153,7 +162,17 @@ | |||
297 | 153 | signals.on_info(message.detail.error_warning_info); | 162 | signals.on_info(message.detail.error_warning_info); |
298 | 154 | break; | 163 | break; |
299 | 155 | case GST_MESSAGE_TAG: | 164 | case GST_MESSAGE_TAG: |
301 | 156 | signals.on_tag_available(message.detail.tag); | 165 | { |
302 | 166 | gchar *orientation; | ||
303 | 167 | if (gst_tag_list_get_string(message.detail.tag.tag_list, "image-orientation", &orientation)) | ||
304 | 168 | { | ||
305 | 169 | // If the image-orientation tag is in the GstTagList, signal the Engine | ||
306 | 170 | signals.on_orientation_changed(orientation_lut(orientation)); | ||
307 | 171 | g_free (orientation); | ||
308 | 172 | } | ||
309 | 173 | |||
310 | 174 | signals.on_tag_available(message.detail.tag); | ||
311 | 175 | } | ||
312 | 157 | break; | 176 | break; |
313 | 158 | case GST_MESSAGE_STATE_CHANGED: | 177 | case GST_MESSAGE_STATE_CHANGED: |
314 | 159 | signals.on_state_changed(message.detail.state_changed); | 178 | signals.on_state_changed(message.detail.state_changed); |
315 | @@ -204,9 +223,9 @@ | |||
316 | 204 | 223 | ||
317 | 205 | if (::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME") != nullptr) | 224 | if (::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME") != nullptr) |
318 | 206 | { | 225 | { |
322 | 207 | auto video_sink = gst_element_factory_make ( | 226 | video_sink = gst_element_factory_make ( |
323 | 208 | ::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME"), | 227 | ::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME"), |
324 | 209 | "video-sink"); | 228 | "video-sink"); |
325 | 210 | 229 | ||
326 | 211 | std::cout << "video_sink: " << ::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME") << std::endl; | 230 | std::cout << "video_sink: " << ::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME") << std::endl; |
327 | 212 | 231 | ||
328 | @@ -224,7 +243,6 @@ | |||
329 | 224 | 243 | ||
330 | 225 | if (::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME") != nullptr) | 244 | if (::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME") != nullptr) |
331 | 226 | { | 245 | { |
332 | 227 | GstElement *video_sink = NULL; | ||
333 | 228 | g_object_get (pipeline, "video_sink", &video_sink, NULL); | 246 | g_object_get (pipeline, "video_sink", &video_sink, NULL); |
334 | 229 | 247 | ||
335 | 230 | // Get the service-side BufferQueue (IGraphicBufferProducer) and associate it with | 248 | // Get the service-side BufferQueue (IGraphicBufferProducer) and associate it with |
336 | @@ -265,6 +283,20 @@ | |||
337 | 265 | } | 283 | } |
338 | 266 | } | 284 | } |
339 | 267 | 285 | ||
340 | 286 | media::Player::Orientation orientation_lut(const gchar *orientation) | ||
341 | 287 | { | ||
342 | 288 | if (g_strcmp0(orientation, "rotate-0") == 0) | ||
343 | 289 | return media::Player::Orientation::rotate0; | ||
344 | 290 | else if (g_strcmp0(orientation, "rotate-90") == 0) | ||
345 | 291 | return media::Player::Orientation::rotate90; | ||
346 | 292 | else if (g_strcmp0(orientation, "rotate-180") == 0) | ||
347 | 293 | return media::Player::Orientation::rotate180; | ||
348 | 294 | else if (g_strcmp0(orientation, "rotate-270") == 0) | ||
349 | 295 | return media::Player::Orientation::rotate270; | ||
350 | 296 | else | ||
351 | 297 | return media::Player::Orientation::rotate0; | ||
352 | 298 | } | ||
353 | 299 | |||
354 | 268 | /** Sets the new audio stream role on the pulsesink in playbin */ | 300 | /** Sets the new audio stream role on the pulsesink in playbin */ |
355 | 269 | void set_audio_stream_role(media::Player::AudioStreamRole new_audio_role) | 301 | void set_audio_stream_role(media::Player::AudioStreamRole new_audio_role) |
356 | 270 | { | 302 | { |
357 | @@ -350,6 +382,20 @@ | |||
358 | 350 | ¤t, | 382 | ¤t, |
359 | 351 | &pending, | 383 | &pending, |
360 | 352 | state_change_timeout.count()); | 384 | state_change_timeout.count()); |
361 | 385 | |||
362 | 386 | if (new_state == GST_STATE_PLAYING) | ||
363 | 387 | { | ||
364 | 388 | // Only do this for video playback | ||
365 | 389 | if (media_file_type() == MEDIA_FILE_TYPE_VIDEO) | ||
366 | 390 | { | ||
367 | 391 | // Get the video height/width from the video sink | ||
368 | 392 | get_video_dimensions(); | ||
369 | 393 | } | ||
370 | 394 | #ifdef DEBUG_GST_PIPELINE | ||
371 | 395 | std::cout << "Dumping pipeline dot file" << std::endl; | ||
372 | 396 | GST_DEBUG_BIN_TO_DOT_FILE((GstBin*)pipeline, GST_DEBUG_GRAPH_SHOW_ALL, "pipeline"); | ||
373 | 397 | #endif | ||
374 | 398 | } | ||
375 | 353 | break; | 399 | break; |
376 | 354 | } | 400 | } |
377 | 355 | 401 | ||
378 | @@ -366,6 +412,29 @@ | |||
379 | 366 | ms.count() * 1000); | 412 | ms.count() * 1000); |
380 | 367 | } | 413 | } |
381 | 368 | 414 | ||
382 | 415 | void get_video_dimensions() | ||
383 | 416 | { | ||
384 | 417 | if (video_sink != nullptr && g_strcmp0(::getenv("CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME"), "mirsink") == 0) | ||
385 | 418 | { | ||
386 | 419 | g_object_get (video_sink, "height", &video_height, nullptr); | ||
387 | 420 | g_object_get (video_sink, "width", &video_width, nullptr); | ||
388 | 421 | std::cout << "video_height: " << video_height << ", video_width: " << video_width << std::endl; | ||
389 | 422 | signals.on_add_frame_dimension(video_height, video_width); | ||
390 | 423 | } | ||
391 | 424 | else | ||
392 | 425 | std::cerr << "Could not get the height/width of each video frame" << std::endl; | ||
393 | 426 | } | ||
394 | 427 | |||
395 | 428 | int get_video_height() const | ||
396 | 429 | { | ||
397 | 430 | return video_height; | ||
398 | 431 | } | ||
399 | 432 | |||
400 | 433 | int get_video_width() const | ||
401 | 434 | { | ||
402 | 435 | return video_width; | ||
403 | 436 | } | ||
404 | 437 | |||
405 | 369 | std::string get_file_content_type(const std::string& uri) const | 438 | std::string get_file_content_type(const std::string& uri) const |
406 | 370 | { | 439 | { |
407 | 371 | if (uri.empty()) | 440 | if (uri.empty()) |
408 | @@ -445,6 +514,9 @@ | |||
409 | 445 | gstreamer::Bus bus; | 514 | gstreamer::Bus bus; |
410 | 446 | MediaFileType file_type; | 515 | MediaFileType file_type; |
411 | 447 | SurfaceTextureClientHybris stc_hybris; | 516 | SurfaceTextureClientHybris stc_hybris; |
412 | 517 | GstElement* video_sink; | ||
413 | 518 | uint32_t video_height; | ||
414 | 519 | uint32_t video_width; | ||
415 | 448 | core::Connection on_new_message_connection; | 520 | core::Connection on_new_message_connection; |
416 | 449 | bool is_seeking; | 521 | bool is_seeking; |
417 | 450 | struct | 522 | struct |
418 | @@ -458,6 +530,8 @@ | |||
419 | 458 | core::Signal<uint64_t> on_seeked_to; | 530 | core::Signal<uint64_t> on_seeked_to; |
420 | 459 | core::Signal<void> on_end_of_stream; | 531 | core::Signal<void> on_end_of_stream; |
421 | 460 | core::Signal<media::Player::PlaybackStatus> on_playback_status_changed; | 532 | core::Signal<media::Player::PlaybackStatus> on_playback_status_changed; |
422 | 533 | core::Signal<media::Player::Orientation> on_orientation_changed; | ||
423 | 534 | core::Signal<uint32_t, uint32_t> on_add_frame_dimension; | ||
424 | 461 | core::Signal<void> client_disconnected; | 535 | core::Signal<void> client_disconnected; |
425 | 462 | } signals; | 536 | } signals; |
426 | 463 | }; | 537 | }; |
427 | 464 | 538 | ||
428 | === modified file 'src/core/media/mpris/player.h' | |||
429 | --- src/core/media/mpris/player.h 2014-09-10 21:05:34 +0000 | |||
430 | +++ src/core/media/mpris/player.h 2014-10-22 16:15:30 +0000 | |||
431 | @@ -122,6 +122,7 @@ | |||
432 | 122 | DBUS_CPP_SIGNAL_DEF(Seeked, Player, std::int64_t) | 122 | DBUS_CPP_SIGNAL_DEF(Seeked, Player, std::int64_t) |
433 | 123 | DBUS_CPP_SIGNAL_DEF(EndOfStream, Player, void) | 123 | DBUS_CPP_SIGNAL_DEF(EndOfStream, Player, void) |
434 | 124 | DBUS_CPP_SIGNAL_DEF(PlaybackStatusChanged, Player, core::ubuntu::media::Player::PlaybackStatus) | 124 | DBUS_CPP_SIGNAL_DEF(PlaybackStatusChanged, Player, core::ubuntu::media::Player::PlaybackStatus) |
435 | 125 | DBUS_CPP_SIGNAL_DEF(VideoDimensionChanged, Player, std::uint64_t) | ||
436 | 125 | }; | 126 | }; |
437 | 126 | 127 | ||
438 | 127 | struct Properties | 128 | struct Properties |
439 | @@ -132,6 +133,7 @@ | |||
440 | 132 | DBUS_CPP_WRITABLE_PROPERTY_DEF(LoopStatus, Player, std::string) | 133 | DBUS_CPP_WRITABLE_PROPERTY_DEF(LoopStatus, Player, std::string) |
441 | 133 | DBUS_CPP_WRITABLE_PROPERTY_DEF(TypedLoopStatus, Player, core::ubuntu::media::Player::LoopStatus) | 134 | DBUS_CPP_WRITABLE_PROPERTY_DEF(TypedLoopStatus, Player, core::ubuntu::media::Player::LoopStatus) |
442 | 134 | DBUS_CPP_WRITABLE_PROPERTY_DEF(AudioStreamRole, Player, core::ubuntu::media::Player::AudioStreamRole) | 135 | DBUS_CPP_WRITABLE_PROPERTY_DEF(AudioStreamRole, Player, core::ubuntu::media::Player::AudioStreamRole) |
443 | 136 | DBUS_CPP_READABLE_PROPERTY_DEF(Orientation, Player, core::ubuntu::media::Player::Orientation) | ||
444 | 135 | DBUS_CPP_WRITABLE_PROPERTY_DEF(PlaybackRate, Player, double) | 137 | DBUS_CPP_WRITABLE_PROPERTY_DEF(PlaybackRate, Player, double) |
445 | 136 | DBUS_CPP_WRITABLE_PROPERTY_DEF(Rate, Player, double) | 138 | DBUS_CPP_WRITABLE_PROPERTY_DEF(Rate, Player, double) |
446 | 137 | DBUS_CPP_WRITABLE_PROPERTY_DEF(Shuffle, Player, bool) | 139 | DBUS_CPP_WRITABLE_PROPERTY_DEF(Shuffle, Player, bool) |
447 | @@ -191,6 +193,7 @@ | |||
448 | 191 | Properties::Duration::ValueType duration{0}; | 193 | Properties::Duration::ValueType duration{0}; |
449 | 192 | Properties::MinimumRate::ValueType minimum_rate{1.f}; | 194 | Properties::MinimumRate::ValueType minimum_rate{1.f}; |
450 | 193 | Properties::MaximumRate::ValueType maximum_rate{1.f}; | 195 | Properties::MaximumRate::ValueType maximum_rate{1.f}; |
451 | 196 | Properties::Orientation::ValueType orientation{core::ubuntu::media::Player::Orientation::rotate0}; | ||
452 | 194 | } defaults; | 197 | } defaults; |
453 | 195 | }; | 198 | }; |
454 | 196 | 199 | ||
455 | @@ -211,6 +214,7 @@ | |||
456 | 211 | configuration.object->template get_property<Properties::LoopStatus>(), | 214 | configuration.object->template get_property<Properties::LoopStatus>(), |
457 | 212 | configuration.object->template get_property<Properties::TypedLoopStatus>(), | 215 | configuration.object->template get_property<Properties::TypedLoopStatus>(), |
458 | 213 | configuration.object->template get_property<Properties::AudioStreamRole>(), | 216 | configuration.object->template get_property<Properties::AudioStreamRole>(), |
459 | 217 | configuration.object->template get_property<Properties::Orientation>(), | ||
460 | 214 | configuration.object->template get_property<Properties::PlaybackRate>(), | 218 | configuration.object->template get_property<Properties::PlaybackRate>(), |
461 | 215 | configuration.object->template get_property<Properties::Shuffle>(), | 219 | configuration.object->template get_property<Properties::Shuffle>(), |
462 | 216 | configuration.object->template get_property<Properties::TypedMetaData>(), | 220 | configuration.object->template get_property<Properties::TypedMetaData>(), |
463 | @@ -225,6 +229,7 @@ | |||
464 | 225 | configuration.object->template get_signal<Signals::Seeked>(), | 229 | configuration.object->template get_signal<Signals::Seeked>(), |
465 | 226 | configuration.object->template get_signal<Signals::EndOfStream>(), | 230 | configuration.object->template get_signal<Signals::EndOfStream>(), |
466 | 227 | configuration.object->template get_signal<Signals::PlaybackStatusChanged>(), | 231 | configuration.object->template get_signal<Signals::PlaybackStatusChanged>(), |
467 | 232 | configuration.object->template get_signal<Signals::VideoDimensionChanged>(), | ||
468 | 228 | configuration.object->template get_signal<core::dbus::interfaces::Properties::Signals::PropertiesChanged>() | 233 | configuration.object->template get_signal<core::dbus::interfaces::Properties::Signals::PropertiesChanged>() |
469 | 229 | } | 234 | } |
470 | 230 | { | 235 | { |
471 | @@ -241,12 +246,19 @@ | |||
472 | 241 | properties.loop_status->set(configuration.defaults.loop_status); | 246 | properties.loop_status->set(configuration.defaults.loop_status); |
473 | 242 | properties.typed_loop_status->set(configuration.defaults.typed_loop_status); | 247 | properties.typed_loop_status->set(configuration.defaults.typed_loop_status); |
474 | 243 | properties.audio_stream_role->set(core::ubuntu::media::Player::AudioStreamRole::multimedia); | 248 | properties.audio_stream_role->set(core::ubuntu::media::Player::AudioStreamRole::multimedia); |
475 | 249 | properties.orientation->set(core::ubuntu::media::Player::Orientation::rotate0); | ||
476 | 244 | properties.playback_rate->set(configuration.defaults.playback_rate); | 250 | properties.playback_rate->set(configuration.defaults.playback_rate); |
477 | 245 | properties.is_shuffle->set(configuration.defaults.shuffle); | 251 | properties.is_shuffle->set(configuration.defaults.shuffle); |
478 | 246 | properties.position->set(configuration.defaults.position); | 252 | properties.position->set(configuration.defaults.position); |
479 | 247 | properties.duration->set(configuration.defaults.duration); | 253 | properties.duration->set(configuration.defaults.duration); |
480 | 248 | properties.minimum_playback_rate->set(configuration.defaults.minimum_rate); | 254 | properties.minimum_playback_rate->set(configuration.defaults.minimum_rate); |
482 | 249 | properties.maximum_playback_rate->set(configuration.defaults.maximum_rate); | 255 | properties.maximum_playback_rate->set(configuration.defaults.maximum_rate); |
483 | 256 | |||
484 | 257 | // Make sure the Orientation Property gets sent over DBus to the client | ||
485 | 258 | properties.orientation->changed().connect([this](const core::ubuntu::media::Player::Orientation& o) | ||
486 | 259 | { | ||
487 | 260 | on_property_value_changed<Properties::Orientation>(o); | ||
488 | 261 | }); | ||
489 | 250 | 262 | ||
490 | 251 | properties.position->changed().connect([this](std::int64_t position) | 263 | properties.position->changed().connect([this](std::int64_t position) |
491 | 252 | { | 264 | { |
492 | @@ -266,7 +278,7 @@ | |||
493 | 266 | properties.loop_status->changed().connect([this](const std::string& status) | 278 | properties.loop_status->changed().connect([this](const std::string& status) |
494 | 267 | { | 279 | { |
495 | 268 | on_property_value_changed<Properties::LoopStatus>(status); | 280 | on_property_value_changed<Properties::LoopStatus>(status); |
497 | 269 | }); | 281 | }); |
498 | 270 | } | 282 | } |
499 | 271 | 283 | ||
500 | 272 | template<typename Property> | 284 | template<typename Property> |
501 | @@ -294,6 +306,7 @@ | |||
502 | 294 | dict[Properties::LoopStatus::name()] = dbus::types::Variant::encode(properties.loop_status->get()); | 306 | dict[Properties::LoopStatus::name()] = dbus::types::Variant::encode(properties.loop_status->get()); |
503 | 295 | dict[Properties::TypedLoopStatus::name()] = dbus::types::Variant::encode(properties.typed_loop_status->get()); | 307 | dict[Properties::TypedLoopStatus::name()] = dbus::types::Variant::encode(properties.typed_loop_status->get()); |
504 | 296 | dict[Properties::AudioStreamRole::name()] = dbus::types::Variant::encode(properties.audio_stream_role->get()); | 308 | dict[Properties::AudioStreamRole::name()] = dbus::types::Variant::encode(properties.audio_stream_role->get()); |
505 | 309 | dict[Properties::Orientation::name()] = dbus::types::Variant::encode(properties.orientation->get()); | ||
506 | 297 | dict[Properties::PlaybackRate::name()] = dbus::types::Variant::encode(properties.playback_rate->get()); | 310 | dict[Properties::PlaybackRate::name()] = dbus::types::Variant::encode(properties.playback_rate->get()); |
507 | 298 | dict[Properties::Shuffle::name()] = dbus::types::Variant::encode(properties.is_shuffle->get()); | 311 | dict[Properties::Shuffle::name()] = dbus::types::Variant::encode(properties.is_shuffle->get()); |
508 | 299 | dict[Properties::Duration::name()] = dbus::types::Variant::encode(properties.duration->get()); | 312 | dict[Properties::Duration::name()] = dbus::types::Variant::encode(properties.duration->get()); |
509 | @@ -323,6 +336,7 @@ | |||
510 | 323 | std::shared_ptr<core::dbus::Property<Properties::LoopStatus>> loop_status; | 336 | std::shared_ptr<core::dbus::Property<Properties::LoopStatus>> loop_status; |
511 | 324 | std::shared_ptr<core::dbus::Property<Properties::TypedLoopStatus>> typed_loop_status; | 337 | std::shared_ptr<core::dbus::Property<Properties::TypedLoopStatus>> typed_loop_status; |
512 | 325 | std::shared_ptr<core::dbus::Property<Properties::AudioStreamRole>> audio_stream_role; | 338 | std::shared_ptr<core::dbus::Property<Properties::AudioStreamRole>> audio_stream_role; |
513 | 339 | std::shared_ptr<core::dbus::Property<Properties::Orientation>> orientation; | ||
514 | 326 | std::shared_ptr<core::dbus::Property<Properties::PlaybackRate>> playback_rate; | 340 | std::shared_ptr<core::dbus::Property<Properties::PlaybackRate>> playback_rate; |
515 | 327 | std::shared_ptr<core::dbus::Property<Properties::Shuffle>> is_shuffle; | 341 | std::shared_ptr<core::dbus::Property<Properties::Shuffle>> is_shuffle; |
516 | 328 | std::shared_ptr<core::dbus::Property<Properties::TypedMetaData>> typed_meta_data_for_current_track; | 342 | std::shared_ptr<core::dbus::Property<Properties::TypedMetaData>> typed_meta_data_for_current_track; |
517 | @@ -338,6 +352,7 @@ | |||
518 | 338 | typename core::dbus::Signal<Signals::Seeked, Signals::Seeked::ArgumentType>::Ptr seeked_to; | 352 | typename core::dbus::Signal<Signals::Seeked, Signals::Seeked::ArgumentType>::Ptr seeked_to; |
519 | 339 | typename core::dbus::Signal<Signals::EndOfStream, Signals::EndOfStream::ArgumentType>::Ptr end_of_stream; | 353 | typename core::dbus::Signal<Signals::EndOfStream, Signals::EndOfStream::ArgumentType>::Ptr end_of_stream; |
520 | 340 | typename core::dbus::Signal<Signals::PlaybackStatusChanged, Signals::PlaybackStatusChanged::ArgumentType>::Ptr playback_status_changed; | 354 | typename core::dbus::Signal<Signals::PlaybackStatusChanged, Signals::PlaybackStatusChanged::ArgumentType>::Ptr playback_status_changed; |
521 | 355 | typename core::dbus::Signal<Signals::VideoDimensionChanged, Signals::VideoDimensionChanged::ArgumentType>::Ptr video_dimension_changed; | ||
522 | 341 | 356 | ||
523 | 342 | dbus::Signal | 357 | dbus::Signal |
524 | 343 | < | 358 | < |
525 | 344 | 359 | ||
526 | === modified file 'src/core/media/player_implementation.cpp' | |||
527 | --- src/core/media/player_implementation.cpp 2014-10-08 03:06:14 +0000 | |||
528 | +++ src/core/media/player_implementation.cpp 2014-10-22 16:15:30 +0000 | |||
529 | @@ -297,7 +297,7 @@ | |||
530 | 297 | service, | 297 | service, |
531 | 298 | key)) | 298 | key)) |
532 | 299 | { | 299 | { |
534 | 300 | // Initializing default values for properties | 300 | // Initialize default values for Player interface properties |
535 | 301 | can_play().set(true); | 301 | can_play().set(true); |
536 | 302 | can_pause().set(true); | 302 | can_pause().set(true); |
537 | 303 | can_seek().set(true); | 303 | can_seek().set(true); |
538 | @@ -313,6 +313,7 @@ | |||
539 | 313 | duration().set(0); | 313 | duration().set(0); |
540 | 314 | audio_stream_role().set(Player::AudioStreamRole::multimedia); | 314 | audio_stream_role().set(Player::AudioStreamRole::multimedia); |
541 | 315 | d->engine->audio_stream_role().set(Player::AudioStreamRole::multimedia); | 315 | d->engine->audio_stream_role().set(Player::AudioStreamRole::multimedia); |
542 | 316 | orientation().set(Player::Orientation::rotate0); | ||
543 | 316 | 317 | ||
544 | 317 | // Make sure that the Position property gets updated from the Engine | 318 | // Make sure that the Position property gets updated from the Engine |
545 | 318 | // every time the client requests position | 319 | // every time the client requests position |
546 | @@ -349,6 +350,13 @@ | |||
547 | 349 | d->engine->audio_stream_role().set(new_role); | 350 | d->engine->audio_stream_role().set(new_role); |
548 | 350 | }); | 351 | }); |
549 | 351 | 352 | ||
550 | 353 | // When the value of the orientation Property is changed in the Engine by playbin, | ||
551 | 354 | // update the Player's cached value | ||
552 | 355 | d->engine->orientation().changed().connect([this](const Player::Orientation& o) | ||
553 | 356 | { | ||
554 | 357 | orientation().set(o); | ||
555 | 358 | }); | ||
556 | 359 | |||
557 | 352 | d->engine->about_to_finish_signal().connect([this]() | 360 | d->engine->about_to_finish_signal().connect([this]() |
558 | 353 | { | 361 | { |
559 | 354 | if (d->track_list->has_next()) | 362 | if (d->track_list->has_next()) |
560 | @@ -382,6 +390,14 @@ | |||
561 | 382 | { | 390 | { |
562 | 383 | playback_status_changed()(status); | 391 | playback_status_changed()(status); |
563 | 384 | }); | 392 | }); |
564 | 393 | |||
565 | 394 | d->engine->video_dimension_changed_signal().connect([this](uint32_t height, uint32_t width) | ||
566 | 395 | { | ||
567 | 396 | uint64_t mask = 0; | ||
568 | 397 | // Left most 32 bits are for height, right most 32 bits are for width | ||
569 | 398 | mask = (static_cast<uint64_t>(height) << 32) | static_cast<uint64_t>(width); | ||
570 | 399 | video_dimension_changed()(mask); | ||
571 | 400 | }); | ||
572 | 385 | } | 401 | } |
573 | 386 | 402 | ||
574 | 387 | media::PlayerImplementation::~PlayerImplementation() | 403 | media::PlayerImplementation::~PlayerImplementation() |
575 | 388 | 404 | ||
576 | === modified file 'src/core/media/player_skeleton.cpp' | |||
577 | --- src/core/media/player_skeleton.cpp 2014-10-08 00:31:41 +0000 | |||
578 | +++ src/core/media/player_skeleton.cpp 2014-10-22 16:15:30 +0000 | |||
579 | @@ -57,10 +57,11 @@ | |||
580 | 57 | { | 57 | { |
581 | 58 | skeleton.signals.seeked_to, | 58 | skeleton.signals.seeked_to, |
582 | 59 | skeleton.signals.end_of_stream, | 59 | skeleton.signals.end_of_stream, |
584 | 60 | skeleton.signals.playback_status_changed | 60 | skeleton.signals.playback_status_changed, |
585 | 61 | skeleton.signals.video_dimension_changed | ||
586 | 61 | } | 62 | } |
587 | 62 | { | 63 | { |
589 | 63 | } | 64 | } |
590 | 64 | 65 | ||
591 | 65 | void handle_next(const core::dbus::Message::Ptr& msg) | 66 | void handle_next(const core::dbus::Message::Ptr& msg) |
592 | 66 | { | 67 | { |
593 | @@ -138,7 +139,7 @@ | |||
594 | 138 | 139 | ||
595 | 139 | auto reply = dbus::Message::make_method_return(in); | 140 | auto reply = dbus::Message::make_method_return(in); |
596 | 140 | bus->send(reply); | 141 | bus->send(reply); |
598 | 141 | } | 142 | } |
599 | 142 | 143 | ||
600 | 143 | bool does_client_have_access(const std::string& context, const std::string& uri) | 144 | bool does_client_have_access(const std::string& context, const std::string& uri) |
601 | 144 | { | 145 | { |
602 | @@ -224,7 +225,7 @@ | |||
603 | 224 | } | 225 | } |
604 | 225 | 226 | ||
605 | 226 | void handle_open_uri(const core::dbus::Message::Ptr& in) | 227 | void handle_open_uri(const core::dbus::Message::Ptr& in) |
607 | 227 | { | 228 | { |
608 | 228 | dbus_stub.get_connection_app_armor_security_async(in->sender(), [this, in](const std::string& profile) | 229 | dbus_stub.get_connection_app_armor_security_async(in->sender(), [this, in](const std::string& profile) |
609 | 229 | { | 230 | { |
610 | 230 | Track::UriType uri; | 231 | Track::UriType uri; |
611 | @@ -268,17 +269,19 @@ | |||
612 | 268 | 269 | ||
613 | 269 | org::freedesktop::dbus::DBus::Stub dbus_stub; | 270 | org::freedesktop::dbus::DBus::Stub dbus_stub; |
614 | 270 | 271 | ||
616 | 271 | mpris::Player::Skeleton skeleton; | 272 | mpris::Player::Skeleton skeleton; |
617 | 272 | 273 | ||
618 | 273 | struct Signals | 274 | struct Signals |
619 | 274 | { | 275 | { |
620 | 275 | typedef core::dbus::Signal<mpris::Player::Signals::Seeked, mpris::Player::Signals::Seeked::ArgumentType> DBusSeekedToSignal; | 276 | typedef core::dbus::Signal<mpris::Player::Signals::Seeked, mpris::Player::Signals::Seeked::ArgumentType> DBusSeekedToSignal; |
621 | 276 | typedef core::dbus::Signal<mpris::Player::Signals::EndOfStream, mpris::Player::Signals::EndOfStream::ArgumentType> DBusEndOfStreamSignal; | 277 | typedef core::dbus::Signal<mpris::Player::Signals::EndOfStream, mpris::Player::Signals::EndOfStream::ArgumentType> DBusEndOfStreamSignal; |
622 | 277 | typedef core::dbus::Signal<mpris::Player::Signals::PlaybackStatusChanged, mpris::Player::Signals::PlaybackStatusChanged::ArgumentType> DBusPlaybackStatusChangedSignal; | 278 | typedef core::dbus::Signal<mpris::Player::Signals::PlaybackStatusChanged, mpris::Player::Signals::PlaybackStatusChanged::ArgumentType> DBusPlaybackStatusChangedSignal; |
623 | 279 | typedef core::dbus::Signal<mpris::Player::Signals::VideoDimensionChanged, mpris::Player::Signals::VideoDimensionChanged::ArgumentType> DBusVideoDimensionChangedSignal; | ||
624 | 278 | 280 | ||
625 | 279 | Signals(const std::shared_ptr<DBusSeekedToSignal>& remote_seeked, | 281 | Signals(const std::shared_ptr<DBusSeekedToSignal>& remote_seeked, |
626 | 280 | const std::shared_ptr<DBusEndOfStreamSignal>& remote_eos, | 282 | const std::shared_ptr<DBusEndOfStreamSignal>& remote_eos, |
628 | 281 | const std::shared_ptr<DBusPlaybackStatusChangedSignal>& remote_playback_status_changed) | 283 | const std::shared_ptr<DBusPlaybackStatusChangedSignal>& remote_playback_status_changed, |
629 | 284 | const std::shared_ptr<DBusVideoDimensionChangedSignal>& remote_video_dimension_changed) | ||
630 | 282 | { | 285 | { |
631 | 283 | seeked_to.connect([remote_seeked](std::uint64_t value) | 286 | seeked_to.connect([remote_seeked](std::uint64_t value) |
632 | 284 | { | 287 | { |
633 | @@ -294,11 +297,17 @@ | |||
634 | 294 | { | 297 | { |
635 | 295 | remote_playback_status_changed->emit(status); | 298 | remote_playback_status_changed->emit(status); |
636 | 296 | }); | 299 | }); |
637 | 300 | |||
638 | 301 | video_dimension_changed.connect([remote_video_dimension_changed](uint64_t mask) | ||
639 | 302 | { | ||
640 | 303 | remote_video_dimension_changed->emit(mask); | ||
641 | 304 | }); | ||
642 | 297 | } | 305 | } |
643 | 298 | 306 | ||
644 | 299 | core::Signal<int64_t> seeked_to; | 307 | core::Signal<int64_t> seeked_to; |
645 | 300 | core::Signal<void> end_of_stream; | 308 | core::Signal<void> end_of_stream; |
646 | 301 | core::Signal<media::Player::PlaybackStatus> playback_status_changed; | 309 | core::Signal<media::Player::PlaybackStatus> playback_status_changed; |
647 | 310 | core::Signal<uint64_t> video_dimension_changed; | ||
648 | 302 | } signals; | 311 | } signals; |
649 | 303 | 312 | ||
650 | 304 | }; | 313 | }; |
651 | @@ -443,6 +452,11 @@ | |||
652 | 443 | return *d->skeleton.properties.audio_stream_role; | 452 | return *d->skeleton.properties.audio_stream_role; |
653 | 444 | } | 453 | } |
654 | 445 | 454 | ||
655 | 455 | const core::Property<media::Player::Orientation>& media::PlayerSkeleton::orientation() const | ||
656 | 456 | { | ||
657 | 457 | return *d->skeleton.properties.orientation; | ||
658 | 458 | } | ||
659 | 459 | |||
660 | 446 | const core::Property<media::Player::PlaybackRate>& media::PlayerSkeleton::minimum_playback_rate() const | 460 | const core::Property<media::Player::PlaybackRate>& media::PlayerSkeleton::minimum_playback_rate() const |
661 | 447 | { | 461 | { |
662 | 448 | return *d->skeleton.properties.minimum_playback_rate; | 462 | return *d->skeleton.properties.minimum_playback_rate; |
663 | @@ -488,6 +502,11 @@ | |||
664 | 488 | return *d->skeleton.properties.audio_stream_role; | 502 | return *d->skeleton.properties.audio_stream_role; |
665 | 489 | } | 503 | } |
666 | 490 | 504 | ||
667 | 505 | core::Property<media::Player::Orientation>& media::PlayerSkeleton::orientation() | ||
668 | 506 | { | ||
669 | 507 | return *d->skeleton.properties.orientation; | ||
670 | 508 | } | ||
671 | 509 | |||
672 | 491 | core::Property<media::Player::PlaybackStatus>& media::PlayerSkeleton::playback_status() | 510 | core::Property<media::Player::PlaybackStatus>& media::PlayerSkeleton::playback_status() |
673 | 492 | { | 511 | { |
674 | 493 | return *d->skeleton.properties.typed_playback_status; | 512 | return *d->skeleton.properties.typed_playback_status; |
675 | @@ -528,7 +547,6 @@ | |||
676 | 528 | return *d->skeleton.properties.is_audio_source; | 547 | return *d->skeleton.properties.is_audio_source; |
677 | 529 | } | 548 | } |
678 | 530 | 549 | ||
679 | 531 | |||
680 | 532 | core::Property<media::Track::MetaData>& media::PlayerSkeleton::meta_data_for_current_track() | 550 | core::Property<media::Track::MetaData>& media::PlayerSkeleton::meta_data_for_current_track() |
681 | 533 | { | 551 | { |
682 | 534 | return *d->skeleton.properties.typed_meta_data_for_current_track; | 552 | return *d->skeleton.properties.typed_meta_data_for_current_track; |
683 | @@ -568,3 +586,13 @@ | |||
684 | 568 | { | 586 | { |
685 | 569 | return d->signals.playback_status_changed; | 587 | return d->signals.playback_status_changed; |
686 | 570 | } | 588 | } |
687 | 589 | |||
688 | 590 | const core::Signal<uint64_t>& media::PlayerSkeleton::video_dimension_changed() const | ||
689 | 591 | { | ||
690 | 592 | return d->signals.video_dimension_changed; | ||
691 | 593 | } | ||
692 | 594 | |||
693 | 595 | core::Signal<uint64_t>& media::PlayerSkeleton::video_dimension_changed() | ||
694 | 596 | { | ||
695 | 597 | return d->signals.video_dimension_changed; | ||
696 | 598 | } | ||
697 | 571 | 599 | ||
698 | === modified file 'src/core/media/player_skeleton.h' | |||
699 | --- src/core/media/player_skeleton.h 2014-09-09 14:02:52 +0000 | |||
700 | +++ src/core/media/player_skeleton.h 2014-10-22 16:15:30 +0000 | |||
701 | @@ -62,6 +62,7 @@ | |||
702 | 62 | virtual const core::Property<int64_t>& position() const; | 62 | virtual const core::Property<int64_t>& position() const; |
703 | 63 | virtual const core::Property<int64_t>& duration() const; | 63 | virtual const core::Property<int64_t>& duration() const; |
704 | 64 | virtual const core::Property<AudioStreamRole>& audio_stream_role() const; | 64 | virtual const core::Property<AudioStreamRole>& audio_stream_role() const; |
705 | 65 | virtual const core::Property<Orientation>& orientation() const; | ||
706 | 65 | 66 | ||
707 | 66 | virtual core::Property<LoopStatus>& loop_status(); | 67 | virtual core::Property<LoopStatus>& loop_status(); |
708 | 67 | virtual core::Property<PlaybackRate>& playback_rate(); | 68 | virtual core::Property<PlaybackRate>& playback_rate(); |
709 | @@ -72,6 +73,7 @@ | |||
710 | 72 | virtual const core::Signal<int64_t>& seeked_to() const; | 73 | virtual const core::Signal<int64_t>& seeked_to() const; |
711 | 73 | virtual const core::Signal<void>& end_of_stream() const; | 74 | virtual const core::Signal<void>& end_of_stream() const; |
712 | 74 | virtual core::Signal<PlaybackStatus>& playback_status_changed(); | 75 | virtual core::Signal<PlaybackStatus>& playback_status_changed(); |
713 | 76 | virtual const core::Signal<uint64_t>& video_dimension_changed() const; | ||
714 | 75 | 77 | ||
715 | 76 | protected: | 78 | protected: |
716 | 77 | // All creation time arguments go here. | 79 | // All creation time arguments go here. |
717 | @@ -88,6 +90,8 @@ | |||
718 | 88 | 90 | ||
719 | 89 | PlayerSkeleton(const Configuration& configuration); | 91 | PlayerSkeleton(const Configuration& configuration); |
720 | 90 | 92 | ||
721 | 93 | // These properties are not exposed to the client, but still need to be | ||
722 | 94 | // able to be settable from within the Player: | ||
723 | 91 | virtual core::Property<PlaybackStatus>& playback_status(); | 95 | virtual core::Property<PlaybackStatus>& playback_status(); |
724 | 92 | virtual core::Property<bool>& can_play(); | 96 | virtual core::Property<bool>& can_play(); |
725 | 93 | virtual core::Property<bool>& can_pause(); | 97 | virtual core::Property<bool>& can_pause(); |
726 | @@ -101,9 +105,11 @@ | |||
727 | 101 | virtual core::Property<PlaybackRate>& maximum_playback_rate(); | 105 | virtual core::Property<PlaybackRate>& maximum_playback_rate(); |
728 | 102 | virtual core::Property<int64_t>& position(); | 106 | virtual core::Property<int64_t>& position(); |
729 | 103 | virtual core::Property<int64_t>& duration(); | 107 | virtual core::Property<int64_t>& duration(); |
730 | 108 | virtual core::Property<Orientation>& orientation(); | ||
731 | 104 | 109 | ||
732 | 105 | virtual core::Signal<int64_t>& seeked_to(); | 110 | virtual core::Signal<int64_t>& seeked_to(); |
733 | 106 | virtual core::Signal<void>& end_of_stream(); | 111 | virtual core::Signal<void>& end_of_stream(); |
734 | 112 | virtual core::Signal<uint64_t>& video_dimension_changed(); | ||
735 | 107 | 113 | ||
736 | 108 | private: | 114 | private: |
737 | 109 | struct Private; | 115 | struct Private; |
738 | 110 | 116 | ||
739 | === modified file 'src/core/media/player_stub.cpp' | |||
740 | --- src/core/media/player_stub.cpp 2014-10-16 15:30:44 +0000 | |||
741 | +++ src/core/media/player_stub.cpp 2014-10-22 16:15:30 +0000 | |||
742 | @@ -57,6 +57,7 @@ | |||
743 | 57 | object(object), | 57 | object(object), |
744 | 58 | properties | 58 | properties |
745 | 59 | { | 59 | { |
746 | 60 | // Link the properties from the server side to the client side over the bus | ||
747 | 60 | object->get_property<mpris::Player::Properties::CanPlay>(), | 61 | object->get_property<mpris::Player::Properties::CanPlay>(), |
748 | 61 | object->get_property<mpris::Player::Properties::CanPause>(), | 62 | object->get_property<mpris::Player::Properties::CanPause>(), |
749 | 62 | object->get_property<mpris::Player::Properties::CanSeek>(), | 63 | object->get_property<mpris::Player::Properties::CanSeek>(), |
750 | @@ -74,6 +75,7 @@ | |||
751 | 74 | object->get_property<mpris::Player::Properties::Position>(), | 75 | object->get_property<mpris::Player::Properties::Position>(), |
752 | 75 | object->get_property<mpris::Player::Properties::Duration>(), | 76 | object->get_property<mpris::Player::Properties::Duration>(), |
753 | 76 | object->get_property<mpris::Player::Properties::AudioStreamRole>(), | 77 | object->get_property<mpris::Player::Properties::AudioStreamRole>(), |
754 | 78 | object->get_property<mpris::Player::Properties::Orientation>(), | ||
755 | 77 | object->get_property<mpris::Player::Properties::MinimumRate>(), | 79 | object->get_property<mpris::Player::Properties::MinimumRate>(), |
756 | 78 | object->get_property<mpris::Player::Properties::MaximumRate>() | 80 | object->get_property<mpris::Player::Properties::MaximumRate>() |
757 | 79 | }, | 81 | }, |
758 | @@ -81,7 +83,8 @@ | |||
759 | 81 | { | 83 | { |
760 | 82 | object->get_signal<mpris::Player::Signals::Seeked>(), | 84 | object->get_signal<mpris::Player::Signals::Seeked>(), |
761 | 83 | object->get_signal<mpris::Player::Signals::EndOfStream>(), | 85 | object->get_signal<mpris::Player::Signals::EndOfStream>(), |
763 | 84 | object->get_signal<mpris::Player::Signals::PlaybackStatusChanged>() | 86 | object->get_signal<mpris::Player::Signals::PlaybackStatusChanged>(), |
764 | 87 | object->get_signal<mpris::Player::Signals::VideoDimensionChanged>() | ||
765 | 85 | } | 88 | } |
766 | 86 | { | 89 | { |
767 | 87 | } | 90 | } |
768 | @@ -160,6 +163,7 @@ | |||
769 | 160 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::Position>> position; | 163 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::Position>> position; |
770 | 161 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::Duration>> duration; | 164 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::Duration>> duration; |
771 | 162 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::AudioStreamRole>> audio_role; | 165 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::AudioStreamRole>> audio_role; |
772 | 166 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::Orientation>> orientation; | ||
773 | 163 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::MinimumRate>> minimum_playback_rate; | 167 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::MinimumRate>> minimum_playback_rate; |
774 | 164 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::MaximumRate>> maximum_playback_rate; | 168 | std::shared_ptr<core::dbus::Property<mpris::Player::Properties::MaximumRate>> maximum_playback_rate; |
775 | 165 | } properties; | 169 | } properties; |
776 | @@ -169,21 +173,25 @@ | |||
777 | 169 | typedef core::dbus::Signal<mpris::Player::Signals::Seeked, mpris::Player::Signals::Seeked::ArgumentType> DBusSeekedToSignal; | 173 | typedef core::dbus::Signal<mpris::Player::Signals::Seeked, mpris::Player::Signals::Seeked::ArgumentType> DBusSeekedToSignal; |
778 | 170 | typedef core::dbus::Signal<mpris::Player::Signals::EndOfStream, mpris::Player::Signals::EndOfStream::ArgumentType> DBusEndOfStreamSignal; | 174 | typedef core::dbus::Signal<mpris::Player::Signals::EndOfStream, mpris::Player::Signals::EndOfStream::ArgumentType> DBusEndOfStreamSignal; |
779 | 171 | typedef core::dbus::Signal<mpris::Player::Signals::PlaybackStatusChanged, mpris::Player::Signals::PlaybackStatusChanged::ArgumentType> DBusPlaybackStatusChangedSignal; | 175 | typedef core::dbus::Signal<mpris::Player::Signals::PlaybackStatusChanged, mpris::Player::Signals::PlaybackStatusChanged::ArgumentType> DBusPlaybackStatusChangedSignal; |
780 | 176 | typedef core::dbus::Signal<mpris::Player::Signals::VideoDimensionChanged, mpris::Player::Signals::VideoDimensionChanged::ArgumentType> DBusVideoDimensionChangedSignal; | ||
781 | 172 | 177 | ||
782 | 173 | Signals(const std::shared_ptr<DBusSeekedToSignal>& seeked, | 178 | Signals(const std::shared_ptr<DBusSeekedToSignal>& seeked, |
783 | 174 | const std::shared_ptr<DBusEndOfStreamSignal>& eos, | 179 | const std::shared_ptr<DBusEndOfStreamSignal>& eos, |
785 | 175 | const std::shared_ptr<DBusPlaybackStatusChangedSignal>& status) | 180 | const std::shared_ptr<DBusPlaybackStatusChangedSignal>& status, |
786 | 181 | const std::shared_ptr<DBusVideoDimensionChangedSignal>& d) | ||
787 | 176 | : dbus | 182 | : dbus |
788 | 177 | { | 183 | { |
789 | 178 | seeked, | 184 | seeked, |
790 | 179 | eos, | 185 | eos, |
792 | 180 | status | 186 | status, |
793 | 187 | d | ||
794 | 181 | }, | 188 | }, |
795 | 182 | playback_complete_cb(nullptr), | 189 | playback_complete_cb(nullptr), |
796 | 183 | playback_complete_context(nullptr), | 190 | playback_complete_context(nullptr), |
797 | 184 | seeked_to(), | 191 | seeked_to(), |
798 | 185 | end_of_stream(), | 192 | end_of_stream(), |
800 | 186 | playback_status_changed() | 193 | playback_status_changed(), |
801 | 194 | video_dimension_changed() | ||
802 | 187 | { | 195 | { |
803 | 188 | dbus.seeked_to->connect([this](std::uint64_t value) | 196 | dbus.seeked_to->connect([this](std::uint64_t value) |
804 | 189 | { | 197 | { |
805 | @@ -204,6 +212,12 @@ | |||
806 | 204 | std::cout << "PlaybackStatusChanged signal arrived via the bus." << std::endl; | 212 | std::cout << "PlaybackStatusChanged signal arrived via the bus." << std::endl; |
807 | 205 | playback_status_changed(status); | 213 | playback_status_changed(status); |
808 | 206 | }); | 214 | }); |
809 | 215 | |||
810 | 216 | dbus.video_dimension_changed->connect([this](uint64_t mask) | ||
811 | 217 | { | ||
812 | 218 | std::cout << "VideoDimensionChanged signal arrived via the bus." << std::endl; | ||
813 | 219 | video_dimension_changed(mask); | ||
814 | 220 | }); | ||
815 | 207 | } | 221 | } |
816 | 208 | 222 | ||
817 | 209 | struct DBus | 223 | struct DBus |
818 | @@ -211,6 +225,7 @@ | |||
819 | 211 | std::shared_ptr<DBusSeekedToSignal> seeked_to; | 225 | std::shared_ptr<DBusSeekedToSignal> seeked_to; |
820 | 212 | std::shared_ptr<DBusEndOfStreamSignal> end_of_stream; | 226 | std::shared_ptr<DBusEndOfStreamSignal> end_of_stream; |
821 | 213 | std::shared_ptr<DBusPlaybackStatusChangedSignal> playback_status_changed; | 227 | std::shared_ptr<DBusPlaybackStatusChangedSignal> playback_status_changed; |
822 | 228 | std::shared_ptr<DBusVideoDimensionChangedSignal> video_dimension_changed; | ||
823 | 214 | } dbus; | 229 | } dbus; |
824 | 215 | 230 | ||
825 | 216 | void set_playback_complete_cb(PlaybackCompleteCb cb, void *context) | 231 | void set_playback_complete_cb(PlaybackCompleteCb cb, void *context) |
826 | @@ -224,6 +239,7 @@ | |||
827 | 224 | core::Signal<int64_t> seeked_to; | 239 | core::Signal<int64_t> seeked_to; |
828 | 225 | core::Signal<void> end_of_stream; | 240 | core::Signal<void> end_of_stream; |
829 | 226 | core::Signal<media::Player::PlaybackStatus> playback_status_changed; | 241 | core::Signal<media::Player::PlaybackStatus> playback_status_changed; |
830 | 242 | core::Signal<uint64_t> video_dimension_changed; | ||
831 | 227 | } signals; | 243 | } signals; |
832 | 228 | }; | 244 | }; |
833 | 229 | 245 | ||
834 | @@ -416,6 +432,11 @@ | |||
835 | 416 | return *d->properties.audio_role; | 432 | return *d->properties.audio_role; |
836 | 417 | } | 433 | } |
837 | 418 | 434 | ||
838 | 435 | const core::Property<media::Player::Orientation>& media::PlayerStub::orientation() const | ||
839 | 436 | { | ||
840 | 437 | return *d->properties.orientation; | ||
841 | 438 | } | ||
842 | 439 | |||
843 | 419 | const core::Property<media::Player::PlaybackRate>& media::PlayerStub::minimum_playback_rate() const | 440 | const core::Property<media::Player::PlaybackRate>& media::PlayerStub::minimum_playback_rate() const |
844 | 420 | { | 441 | { |
845 | 421 | return *d->properties.minimum_playback_rate; | 442 | return *d->properties.minimum_playback_rate; |
846 | @@ -465,3 +486,8 @@ | |||
847 | 465 | { | 486 | { |
848 | 466 | return d->signals.playback_status_changed; | 487 | return d->signals.playback_status_changed; |
849 | 467 | } | 488 | } |
850 | 489 | |||
851 | 490 | const core::Signal<uint64_t>& media::PlayerStub::video_dimension_changed() const | ||
852 | 491 | { | ||
853 | 492 | return d->signals.video_dimension_changed; | ||
854 | 493 | } | ||
855 | 468 | 494 | ||
856 | === modified file 'src/core/media/player_stub.h' | |||
857 | --- src/core/media/player_stub.h 2014-10-16 15:30:44 +0000 | |||
858 | +++ src/core/media/player_stub.h 2014-10-22 16:15:30 +0000 | |||
859 | @@ -14,6 +14,7 @@ | |||
860 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
861 | 15 | * | 15 | * |
862 | 16 | * Authored by: Thomas Voß <thomas.voss@canonical.com> | 16 | * Authored by: Thomas Voß <thomas.voss@canonical.com> |
863 | 17 | * Jim Hodapp <jim.hodapp@canonical.com> | ||
864 | 17 | */ | 18 | */ |
865 | 18 | 19 | ||
866 | 19 | #ifndef CORE_UBUNTU_MEDIA_PLAYER_STUB_H_ | 20 | #ifndef CORE_UBUNTU_MEDIA_PLAYER_STUB_H_ |
867 | @@ -76,6 +77,7 @@ | |||
868 | 76 | virtual const core::Property<int64_t>& position() const; | 77 | virtual const core::Property<int64_t>& position() const; |
869 | 77 | virtual const core::Property<int64_t>& duration() const; | 78 | virtual const core::Property<int64_t>& duration() const; |
870 | 78 | virtual const core::Property<AudioStreamRole>& audio_stream_role() const; | 79 | virtual const core::Property<AudioStreamRole>& audio_stream_role() const; |
871 | 80 | virtual const core::Property<Orientation>& orientation() const; | ||
872 | 79 | 81 | ||
873 | 80 | virtual core::Property<LoopStatus>& loop_status(); | 82 | virtual core::Property<LoopStatus>& loop_status(); |
874 | 81 | virtual core::Property<PlaybackRate>& playback_rate(); | 83 | virtual core::Property<PlaybackRate>& playback_rate(); |
875 | @@ -86,6 +88,7 @@ | |||
876 | 86 | virtual const core::Signal<int64_t>& seeked_to() const; | 88 | virtual const core::Signal<int64_t>& seeked_to() const; |
877 | 87 | virtual const core::Signal<void>& end_of_stream() const; | 89 | virtual const core::Signal<void>& end_of_stream() const; |
878 | 88 | virtual core::Signal<PlaybackStatus>& playback_status_changed(); | 90 | virtual core::Signal<PlaybackStatus>& playback_status_changed(); |
879 | 91 | virtual const core::Signal<uint64_t>& video_dimension_changed() const; | ||
880 | 89 | 92 | ||
881 | 90 | private: | 93 | private: |
882 | 91 | struct Private; | 94 | struct Private; |
FAILED: Continuous integration, rev:70 jenkins. qa.ubuntu. com/job/ media-hub- ci/142/ jenkins. qa.ubuntu. com/job/ media-hub- utopic- amd64-ci/ 84 jenkins. qa.ubuntu. com/job/ media-hub- utopic- armhf-ci/ 83 jenkins. qa.ubuntu. com/job/ media-hub- utopic- armhf-ci/ 83/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ media-hub- utopic- i386-ci/ 82/console
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/media- hub-ci/ 142/rebuild
http://