LCOV - code coverage report
Current view: top level - src/media - media_buffer.cpp (source / functions) Hit Total Coverage
Test: jami-coverage-filtered.info Lines: 2 2 100.0 %
Date: 2024-04-25 08:05:53 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :  *  Copyright (C) 2004-2024 Savoir-faire Linux Inc.
       3             :  *
       4             :  *  Author: Guillaume Roguez <Guillaume.Roguez@savoirfairelinux.com>
       5             :  *
       6             :  *  This program is free software; you can redistribute it and/or modify
       7             :  *  it under the terms of the GNU General Public License as published by
       8             :  *  the Free Software Foundation; either version 3 of the License, or
       9             :  *  (at your option) any later version.
      10             :  *
      11             :  *  This program is distributed in the hope that it will be useful,
      12             :  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             :  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             :  *  GNU General Public License for more details.
      15             :  *
      16             :  *  You should have received a copy of the GNU General Public License
      17             :  *  along with this program; if not, write to the Free Software
      18             :  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
      19             :  */
      20             : 
      21             : #include "libav_deps.h" // MUST BE INCLUDED FIRST
      22             : #include "libav_utils.h"
      23             : #include "media_buffer.h"
      24             : #include "jami/videomanager_interface.h"
      25             : 
      26             : #include <new> // std::bad_alloc
      27             : #include <cstdlib>
      28             : #include <cstring> // std::memset
      29             : #include <ciso646> // fix windows compiler bug
      30             : 
      31             : namespace jami {
      32             : 
      33             : #ifdef ENABLE_VIDEO
      34             : 
      35             : //=== HELPERS ==================================================================
      36             : 
      37             : int
      38          49 : videoFrameSize(int format, int width, int height)
      39             : {
      40          49 :     return av_image_get_buffer_size((AVPixelFormat) format, width, height, 1);
      41             : }
      42             : 
      43             : #endif // ENABLE_VIDEO
      44             : 
      45             : } // namespace jami

Generated by: LCOV version 1.14