Line data Source code
1 : /*
2 : * Copyright (C) 2025 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 "PullModePlaybackDelegate.h"
22 :
23 : class PullModeVideoPlaybackDelegate : public PullModePlaybackDelegate,
24 : public std::enable_shared_from_this<PullModeVideoPlaybackDelegate>
25 : {
26 : public:
27 : explicit PullModeVideoPlaybackDelegate(GstElement *sink);
28 56 : ~PullModeVideoPlaybackDelegate() override = default;
29 :
30 : GstStateChangeReturn changeState(GstStateChange transition) override;
31 : gboolean handleEvent(GstPad *pad, GstObject *parent, GstEvent *event) override;
32 : void getProperty(const Property &type, GValue *value) override;
33 : void setProperty(const Property &type, const GValue *value) override;
34 : void handleQos(uint64_t processed, uint64_t dropped) const override;
35 :
36 : private:
37 : std::unique_ptr<firebolt::rialto::IMediaPipeline::MediaSource> createMediaSource(GstCaps *caps) const;
38 :
39 : private:
40 : uint32_t m_maxWidth{0};
41 : uint32_t m_maxHeight{0};
42 : bool m_stepOnPrerollEnabled{false};
43 :
44 : std::mutex m_propertyMutex{};
45 : // START of variables locked by propertyMutex
46 : // rectangle properties
47 : std::string m_videoRectangle{"0,0,1920,1080"};
48 : bool m_rectangleSettingQueued{false};
49 : // immediate output properties
50 : bool m_immediateOutput{false};
51 : bool m_immediateOutputQueued{false};
52 : bool m_syncmodeStreaming{false};
53 : bool m_syncmodeStreamingQueued{false};
54 : bool m_videoMute{false};
55 : bool m_videoMuteQueued{false};
56 : // END of variables locked by propertyMutex
57 : };
|