Music Hub  ..
A session-wide music playback service
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
player_implementation.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013-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 #ifndef CORE_UBUNTU_MEDIA_PLAYER_IMPLEMENTATION_H_
20 #define CORE_UBUNTU_MEDIA_PLAYER_IMPLEMENTATION_H_
21 
22 #include "player_skeleton.h"
23 
24 #include <memory>
25 
26 namespace core
27 {
28 namespace ubuntu
29 {
30 namespace media
31 {
32 class Engine;
33 class Service;
34 
36 {
37 public:
39  const core::dbus::types::ObjectPath& session_path,
40  const std::shared_ptr<Service>& service,
41  PlayerKey key);
43 
44  virtual std::shared_ptr<TrackList> track_list();
45  virtual PlayerKey key() const;
46 
47  virtual bool open_uri(const Track::UriType& uri);
48  virtual void create_video_sink(uint32_t texture_id);
49  virtual GLConsumerWrapperHybris gl_consumer() const;
50  virtual void next();
51  virtual void previous();
52  virtual void play();
53  virtual void pause();
54  virtual void stop();
55  virtual void set_frame_available_callback(FrameAvailableCb cb, void *context);
56  virtual void set_playback_complete_callback(PlaybackCompleteCb cb, void *context);
57  virtual void seek_to(const std::chrono::microseconds& offset);
58 
59 private:
60  struct Private;
61  std::unique_ptr<Private> d;
62 };
63 }
64 }
65 }
66 #endif // CORE_UBUNTU_MEDIA_PLAYER_IMPLEMENTATION_H_
67 
virtual void set_playback_complete_callback(PlaybackCompleteCb cb, void *context)
virtual GLConsumerWrapperHybris gl_consumer() const
PlayerImplementation(const core::dbus::types::ObjectPath &session_path, const std::shared_ptr< Service > &service, PlayerKey key)
virtual void create_video_sink(uint32_t texture_id)
virtual bool open_uri(const Track::UriType &uri)
virtual void seek_to(const std::chrono::microseconds &offset)
virtual void set_frame_available_callback(FrameAvailableCb cb, void *context)
std::string UriType
Definition: track.h:40
virtual std::shared_ptr< TrackList > track_list()