Line data Source code
1 : /*
2 : * If not stated otherwise in this file or this component's LICENSE file the
3 : * following copyright and licenses apply:
4 : *
5 : * Copyright 2026 Sky UK
6 : *
7 : * Licensed under the Apache License, Version 2.0 (the "License");
8 : * you may not use this file except in compliance with the License.
9 : * You may obtain a copy of the License at
10 : *
11 : * http://www.apache.org/licenses/LICENSE-2.0
12 : *
13 : * Unless required by applicable law or agreed to in writing, software
14 : * distributed under the License is distributed on an "AS IS" BASIS,
15 : * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 : * See the License for the specific language governing permissions and
17 : * limitations under the License.
18 : */
19 :
20 : #ifndef FIREBOLT_RIALTO_CLIENT_MEDIA_CAPABILITIES_IPC_H_
21 : #define FIREBOLT_RIALTO_CLIENT_MEDIA_CAPABILITIES_IPC_H_
22 :
23 : #include "IMediaCapabilities.h"
24 : #include "IMediaCapabilitiesIpcFactory.h"
25 : #include "IpcModule.h"
26 : #include "mediacapabilitiesmodule.pb.h"
27 : #include <memory>
28 :
29 : namespace firebolt::rialto::client
30 : {
31 : /**
32 : * @brief IMediaCapabilitiesIpcFactory factory class definition.
33 : */
34 : class MediaCapabilitiesIpcFactory : public IMediaCapabilitiesIpcFactory
35 : {
36 : public:
37 1 : MediaCapabilitiesIpcFactory() = default;
38 1 : ~MediaCapabilitiesIpcFactory() override = default;
39 :
40 : std::unique_ptr<IMediaCapabilities> createMediaCapabilitiesIpc() const override;
41 : };
42 :
43 : class MediaCapabilitiesIpc : public IMediaCapabilities, public IpcModule
44 : {
45 : public:
46 : explicit MediaCapabilitiesIpc(IIpcClient &ipcClient);
47 : ~MediaCapabilitiesIpc() override;
48 :
49 : common::AudioDecoderCapabilities getSupportedAudioCapabilities() override;
50 : common::VideoDecoderCapabilities getSupportedVideoCapabilities() override;
51 :
52 : protected:
53 : bool createRpcStubs(const std::shared_ptr<ipc::IChannel> &ipcChannel) override;
54 12 : bool subscribeToEvents(const std::shared_ptr<ipc::IChannel> &ipcChannel) override { return true; }
55 :
56 : private:
57 : std::unique_ptr<::firebolt::rialto::MediaCapabilitiesModule_Stub> m_stub;
58 : };
59 :
60 : } // namespace firebolt::rialto::client
61 :
62 : #endif // FIREBOLT_RIALTO_CLIENT_MEDIA_CAPABILITIES_IPC_H_
|