~thomas-voss/media-hub/introduce-client-death-observer-interface

« back to all changes in this revision

Viewing changes to src/core/media/video/hybris_gl_sink.h

Merge prereq branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <core/media/player.h>
24
24
 
 
25
#include <functional>
 
26
 
25
27
namespace core
26
28
{
27
29
namespace ubuntu
32
34
{
33
35
class HybrisGlSink : public video::Sink
34
36
{
35
 
public:
36
 
    // Creates a new instance for the given gl texture, connecting to the remote part known
37
 
    // under the given key or throw in case of issues.
38
 
    HybrisGlSink(std::uint32_t gl_texture, const media::Player::PlayerKey& key);
 
37
public:    
 
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&);
39
40
 
40
41
    // Need this to avoid std::unique_ptr complaining about forward-declared Private.
41
42
    ~HybrisGlSink();
56
57
    bool swap_buffers() const override;
57
58
 
58
59
private:
 
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
 
59
64
    struct Private;
60
65
    std::unique_ptr<Private> d;
61
66
};