Music Hub  ..
A session-wide music playback service
core::ubuntu::media::video::Sink Struct Referenceabstract

A video sink abstracts a queue of buffers, that receives a stream of decoded video buffers from an arbitrary source. More...

#include <sink.h>

+ Inheritance diagram for core::ubuntu::media::video::Sink:
+ Collaboration diagram for core::ubuntu::media::video::Sink:

Public Types

typedef std::shared_ptr< SinkPtr
 To save us some typing. More...
 

Public Member Functions

virtual const core::Signal< void > & frame_available () const =0
 The signal is emitted whenever a new frame is available and a subsequent call to swap_buffers will not block and return true. More...
 
virtual bool transformation_matrix (float *matrix) const =0
 Queries the 4x4 transformation matrix for the current frame, placing the data into 'matrix'. More...
 
virtual bool swap_buffers () const =0
 Releases the current buffer, and consumes the next buffer in the queue, making it available for consumption by consumers of this API in an implementation-specific way. Clients will usually rely on a GL texture to receive the latest buffer. More...
 

Detailed Description

A video sink abstracts a queue of buffers, that receives a stream of decoded video buffers from an arbitrary source.

Definition at line 36 of file sink.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Sink> core::ubuntu::media::video::Sink::Ptr

To save us some typing.

Definition at line 39 of file sink.h.

Member Function Documentation

◆ frame_available()

virtual const core::Signal<void>& core::ubuntu::media::video::Sink::frame_available ( ) const
pure virtual

The signal is emitted whenever a new frame is available and a subsequent call to swap_buffers will not block and return true.

Implemented in core::ubuntu::media::video::EglSink, and core::ubuntu::media::video::HybrisGlSink.

◆ swap_buffers()

virtual bool core::ubuntu::media::video::Sink::swap_buffers ( ) const
pure virtual

Releases the current buffer, and consumes the next buffer in the queue, making it available for consumption by consumers of this API in an implementation-specific way. Clients will usually rely on a GL texture to receive the latest buffer.

Implemented in core::ubuntu::media::video::EglSink, and core::ubuntu::media::video::HybrisGlSink.

◆ transformation_matrix()

virtual bool core::ubuntu::media::video::Sink::transformation_matrix ( float *  matrix) const
pure virtual

Queries the 4x4 transformation matrix for the current frame, placing the data into 'matrix'.

Parameters
matrix[out] The destination array representing the matrix in column-major format. We expect at least 4*4 float elements in the array.
Returns
true iff the data has been set. Returns false and leaves 'matrix' unchanged in case of issues.

Implemented in core::ubuntu::media::video::EglSink, and core::ubuntu::media::video::HybrisGlSink.


The documentation for this struct was generated from the following file: