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_I_MEDIA_CAPABILITIES_H_
21 : #define FIREBOLT_RIALTO_I_MEDIA_CAPABILITIES_H_
22 :
23 : #include "AudioDecoderCapabilities.h"
24 : #include "VideoDecoderCapabilities.h"
25 : #include <memory>
26 : #include <optional>
27 :
28 : namespace firebolt::rialto
29 : {
30 : class IMediaCapabilities;
31 :
32 : /**
33 : * @brief IMediaCapabilities factory class, for getting the IMediaCapabilities object.
34 : */
35 : class IMediaCapabilitiesFactory
36 : {
37 : public:
38 1 : IMediaCapabilitiesFactory() = default;
39 2 : virtual ~IMediaCapabilitiesFactory() = default;
40 :
41 : /**
42 : * @brief Gets the IMediaCapabilitiesFactory instance.
43 : *
44 : * @retval the factory instance or null on error.
45 : */
46 : static std::shared_ptr<IMediaCapabilitiesFactory> createFactory();
47 :
48 : /**
49 : * @brief Creates the IMediaCapabilities object.
50 : *
51 : * Client-side creation without preloaded capabilities.
52 : * Preloaded capabilities are handled server-side only via IMediaCapabilitiesServerInternalFactory.
53 : *
54 : * @retval the IMediaCapabilities instance or null on error.
55 : */
56 : virtual std::unique_ptr<IMediaCapabilities> createMediaCapabilities() const = 0;
57 : };
58 :
59 : /**
60 : * @brief Single capabilities query interface replacing IMediaPipelineCapabilities capability methods.
61 : * If the ServerManager supplied HFP YAML data at startup, it is returned directly;
62 : * otherwise the session server falls back to its GStreamer element-query path.
63 : */
64 : class IMediaCapabilities
65 : {
66 : public:
67 37 : IMediaCapabilities() = default;
68 37 : virtual ~IMediaCapabilities() = default;
69 :
70 : IMediaCapabilities(const IMediaCapabilities &) = delete;
71 : IMediaCapabilities &operator=(const IMediaCapabilities &) = delete;
72 : IMediaCapabilities(IMediaCapabilities &&) = delete;
73 : IMediaCapabilities &operator=(IMediaCapabilities &&) = delete;
74 :
75 : /**
76 : * @brief Returns the audio decoder capabilities supported by Rialto.
77 : *
78 : * @retval the supported audio decoder capabilities.
79 : */
80 : virtual firebolt::rialto::common::AudioDecoderCapabilities getSupportedAudioCapabilities() = 0;
81 :
82 : /**
83 : * @brief Returns the video decoder capabilities supported by Rialto.
84 : *
85 : * @retval the supported video decoder capabilities.
86 : */
87 : virtual firebolt::rialto::common::VideoDecoderCapabilities getSupportedVideoCapabilities() = 0;
88 : };
89 :
90 : } // namespace firebolt::rialto
91 :
92 : #endif // FIREBOLT_RIALTO_I_MEDIA_CAPABILITIES_H_
|