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
25namespace core
26{
27namespace ubuntu
28{
29namespace media
30{
31namespace video
32{
36struct 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_
Definition: player.h:34
A video sink abstracts a queue of buffers, that receives a stream of decoded video buffers from an ar...
Definition: sink.h:37
virtual bool swap_buffers() const =0
Releases the current buffer, and consumes the next buffer in the queue, making it available for consu...
virtual bool transformation_matrix(float *matrix) const =0
Queries the 4x4 transformation matrix for the current frame, placing the data into 'matrix'.
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...
std::shared_ptr< Sink > Ptr
To save us some typing.
Definition: sink.h:39