Music Hub
..
A session-wide music playback service
sink.h
Go to the documentation of this file.
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
25
namespace
core
26
{
27
namespace
ubuntu
28
{
29
namespace
media
30
{
31
namespace
video
32
{
36
struct
Sink
37
{
39
typedef
std::shared_ptr<Sink>
Ptr
;
40
42
Sink
() =
default
;
43
Sink
(
const
Sink
&) =
delete
;
44
virtual
~Sink
() =
default
;
45
46
Sink
& operator=(
const
Sink
&) =
delete
;
53
virtual
const
core::Signal<void>&
frame_available
()
const
= 0;
54
61
virtual
bool
transformation_matrix
(
float
* matrix)
const
= 0;
62
69
virtual
bool
swap_buffers
()
const
= 0;
70
};
71
}
72
}
73
}
74
}
75
76
#endif
// CORE_UBUNTU_MEDIA_VIDEO_SINK_H_
core::ubuntu::media::video
Definition:
dimensions.h:32
core::ubuntu::media
Definition:
player.h:38
core
Definition:
player.h:34
core::ubuntu::media::video::Sink
A video sink abstracts a queue of buffers, that receives a stream of decoded video buffers from an ar...
Definition:
sink.h:37
core::ubuntu::media::video::Sink::swap_buffers
virtual bool swap_buffers() const =0
Releases the current buffer, and consumes the next buffer in the queue, making it available for consu...
core::ubuntu::media::video::Sink::transformation_matrix
virtual bool transformation_matrix(float *matrix) const =0
Queries the 4x4 transformation matrix for the current frame, placing the data into 'matrix'.
core::ubuntu::media::video::Sink::frame_available
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 no...
core::ubuntu::media::video::Sink::Ptr
std::shared_ptr< Sink > Ptr
To save us some typing.
Definition:
sink.h:39
include
core
media
video
sink.h
Generated on Tue May 30 2023 02:08:39 for Music Hub by
1.9.4