LCOV - code coverage report
Current view: top level - media/client/ipc/include - MediaPipelineCapabilitiesIpc.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 3 3
Test Date: 2025-02-18 13:13:53 Functions: 100.0 % 3 3

            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 2022 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_PIPELINE_CAPABILITIES_IPC_H_
      21              : #define FIREBOLT_RIALTO_CLIENT_MEDIA_PIPELINE_CAPABILITIES_IPC_H_
      22              : 
      23              : #include "IMediaPipelineCapabilitiesIpcFactory.h"
      24              : #include "IpcModule.h"
      25              : #include <memory>
      26              : #include <string>
      27              : #include <vector>
      28              : 
      29              : #include "mediapipelinecapabilitiesmodule.pb.h"
      30              : 
      31              : namespace firebolt::rialto::client
      32              : {
      33              : /**
      34              :  * @brief IMediaPipelineCapabilitiesIpc factory class definition.
      35              :  */
      36              : class MediaPipelineCapabilitiesIpcFactory : public IMediaPipelineCapabilitiesIpcFactory
      37              : {
      38              : public:
      39            1 :     MediaPipelineCapabilitiesIpcFactory() = default;
      40            1 :     ~MediaPipelineCapabilitiesIpcFactory() override = default;
      41              : 
      42              :     std::unique_ptr<IMediaPipelineCapabilities> createMediaPipelineCapabilitiesIpc() const override;
      43              : };
      44              : 
      45              : /**
      46              :  * @brief The definition of the MediaPipelineCapabilitiesIpc.
      47              :  */
      48              : class MediaPipelineCapabilitiesIpc : public IMediaPipelineCapabilities, public IpcModule
      49              : {
      50              : public:
      51              :     /**
      52              :      * @brief The constructor.
      53              :      *
      54              :      * @param[in] ipcClient      : The ipc client
      55              :      */
      56              :     explicit MediaPipelineCapabilitiesIpc(IIpcClient &ipcClient);
      57              : 
      58              :     /**
      59              :      * @brief Virtual destructor.
      60              :      */
      61              :     virtual ~MediaPipelineCapabilitiesIpc();
      62              : 
      63              :     /**
      64              :      * @brief Returns the MSE mime types supported by Rialto for \a sourceType
      65              :      *
      66              :      * @param[in] sourceType : source type
      67              :      *
      68              :      * @retval The supported mime types.
      69              :      */
      70              :     std::vector<std::string> getSupportedMimeTypes(MediaSourceType sourceType) override;
      71              : 
      72              :     /**
      73              :      * @brief Indicates if the specified mime type is supported.
      74              :      *
      75              :      * This method should be called to ensure that the specified mime
      76              :      * type is supported by Rialto.
      77              :      *
      78              :      * @param[in] mimeType : The mime type to check.
      79              :      *
      80              :      * @retval true if supported.
      81              :      */
      82              :     bool isMimeTypeSupported(const std::string &mimeType) override;
      83              : 
      84              :     /**
      85              :      * @brief  Check sinks and decoders for supported properties
      86              :      *
      87              :      * @param[in] mediaType     : The media type to search. If set to UNKNOWN then both AUDIO and VIDEO are searched
      88              :      * @param[in] propertyNames : A vector of property names to look for
      89              :      *
      90              :      * @retval Returns the subset of propertyNames that are supported by the mediaType
      91              :      */
      92              :     std::vector<std::string> getSupportedProperties(MediaSourceType mediaType,
      93              :                                                     const std::vector<std::string> &propertyNames) override;
      94              : 
      95              : private:
      96              :     /**
      97              :      * @brief The ipc protobuf media Pipeline capabilities stub.
      98              :      */
      99              :     std::unique_ptr<::firebolt::rialto::MediaPipelineCapabilitiesModule_Stub> m_mediaPipelineCapabilitiesStub;
     100              : 
     101              :     bool createRpcStubs(const std::shared_ptr<ipc::IChannel> &ipcChannel) override;
     102              : 
     103           16 :     bool subscribeToEvents(const std::shared_ptr<ipc::IChannel> &ipcChannel) override { return true; }
     104              : };
     105              : 
     106              : }; // namespace firebolt::rialto::client
     107              : 
     108              : #endif // FIREBOLT_RIALTO_CLIENT_MEDIA_PIPELINE_CAPABILITIES_IPC_H_
        

Generated by: LCOV version 2.0-1