Line data Source code
1 : /*
2 : * Copyright (C) 2022 Sky UK
3 : *
4 : * This library is free software; you can redistribute it and/or
5 : * modify it under the terms of the GNU Lesser General Public
6 : * License as published by the Free Software Foundation;
7 : * version 2.1 of the License.
8 : *
9 : * This library is distributed in the hope that it will be useful,
10 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 : * Lesser General Public License for more details.
13 : *
14 : * You should have received a copy of the GNU Lesser General Public
15 : * License along with this library; if not, write to the Free Software
16 : * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 : */
18 :
19 : #pragma once
20 :
21 : #include <gst/gst.h>
22 :
23 : #include <string>
24 :
25 : #include "ControlBackendInterface.h"
26 : #include "IPlaybackDelegate.h"
27 : #include "MediaPlayerManager.h"
28 : #include <atomic>
29 : #include <map>
30 : #include <memory>
31 : #include <mutex>
32 : #include <optional>
33 : #include <queue>
34 :
35 : enum class PlaybackMode
36 : {
37 : Pull,
38 : Push
39 : };
40 :
41 : G_BEGIN_DECLS
42 :
43 : struct _RialtoMSEBaseSinkPrivate
44 : {
45 291 : _RialtoMSEBaseSinkPrivate() = default;
46 291 : ~_RialtoMSEBaseSinkPrivate() = default;
47 :
48 : GstPad *m_sinkPad{nullptr};
49 : std::mutex m_sinkMutex;
50 : std::shared_ptr<IPlaybackDelegate> m_delegate{nullptr};
51 : std::map<IPlaybackDelegate::Property, GValue> m_queuedProperties{};
52 : std::atomic<PlaybackMode> m_playbackMode{PlaybackMode::Pull};
53 : };
54 : G_END_DECLS
|