LCOV - code coverage report
Current view: top level - media/server/gstplayer/source - NeedDataMapping.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 10 10
Test Date: 2025-10-07 14:22:52 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 2025 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              : #include "NeedDataMapping.h"
      21              : 
      22              : namespace firebolt::rialto::server
      23              : {
      24            7 : bool NeedDataMapping::isNeedDataScheduled(GstAppSrc *src) const
      25              : {
      26            7 :     std::unique_lock lock{m_mutex};
      27           14 :     return m_scheduledNeedDatas.find(src) != m_scheduledNeedDatas.end();
      28            7 : }
      29              : 
      30            6 : void NeedDataMapping::setNeedDataScheduled(GstAppSrc *src)
      31              : {
      32            6 :     std::unique_lock lock{m_mutex};
      33            6 :     m_scheduledNeedDatas.insert(src);
      34              : }
      35              : 
      36            3 : void NeedDataMapping::clearNeedDataScheduled(GstAppSrc *src)
      37              : {
      38            3 :     std::unique_lock lock{m_mutex};
      39            3 :     m_scheduledNeedDatas.erase(src);
      40              : }
      41              : } // namespace firebolt::rialto::server
        

Generated by: LCOV version 2.0-1