Coverage Report

Created: 2026-07-12 08:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/vlc/modules/mux/mpeg/dvbpsi_compat.h
Line
Count
Source
1
/*****************************************************************************
2
 * dvbpsi_compat.h: Compatibility headerfile
3
 *****************************************************************************
4
 * Copyright (C) 2013 VideoLAN Association
5
 *
6
 * Authors: Jean-Paul Saman <jpsaman@videolan.org>
7
 *
8
 * This program is free software; you can redistribute it and/or modify it
9
 * under the terms of the GNU Lesser General Public License as published by
10
 * the Free Software Foundation; either version 2.1 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Lesser General Public License
19
 * along with this program; if not, write to the Free Software Foundation,
20
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21
 *****************************************************************************/
22
23
#ifndef DVBPSI_COMPAT_H
24
#define DVBPSI_COMPAT_H
25
26
static inline void dvbpsi_messages(dvbpsi_t *p_dvbpsi, const dvbpsi_msg_level_t level, const char* msg)
27
528k
{
28
528k
    vlc_object_t *obj = (vlc_object_t *)p_dvbpsi->p_sys;
29
30
    /* See dvbpsi.h for the definition of these log levels.*/
31
528k
    switch(level)
32
528k
    {
33
257k
        case DVBPSI_MSG_ERROR:
34
257k
        {
35
#if DVBPSI_VERSION_INT <= ((1 << 16) + (2 << 8))
36
            if( strncmp( msg, "libdvbpsi (PMT decoder): ", 25 ) ||
37
                ( strncmp( &msg[25], "invalid section", 15 ) &&
38
                  strncmp( &msg[25], "'program_number' don't match", 28 ) ) )
39
#endif
40
257k
            msg_Err( obj, "%s", msg ); break;
41
0
        }
42
0
        case DVBPSI_MSG_WARN:  msg_Warn( obj, "%s", msg ); break;
43
0
        case DVBPSI_MSG_NONE:
44
270k
        case DVBPSI_MSG_DEBUG:
45
#ifdef DVBPSI_DEBUG
46
            msg_Dbg( obj, "%s", msg );
47
#endif
48
270k
            break;
49
528k
    }
50
528k
}
ts_psi.c:dvbpsi_messages
Line
Count
Source
27
368k
{
28
368k
    vlc_object_t *obj = (vlc_object_t *)p_dvbpsi->p_sys;
29
30
    /* See dvbpsi.h for the definition of these log levels.*/
31
368k
    switch(level)
32
368k
    {
33
122k
        case DVBPSI_MSG_ERROR:
34
122k
        {
35
#if DVBPSI_VERSION_INT <= ((1 << 16) + (2 << 8))
36
            if( strncmp( msg, "libdvbpsi (PMT decoder): ", 25 ) ||
37
                ( strncmp( &msg[25], "invalid section", 15 ) &&
38
                  strncmp( &msg[25], "'program_number' don't match", 28 ) ) )
39
#endif
40
122k
            msg_Err( obj, "%s", msg ); break;
41
0
        }
42
0
        case DVBPSI_MSG_WARN:  msg_Warn( obj, "%s", msg ); break;
43
0
        case DVBPSI_MSG_NONE:
44
246k
        case DVBPSI_MSG_DEBUG:
45
#ifdef DVBPSI_DEBUG
46
            msg_Dbg( obj, "%s", msg );
47
#endif
48
246k
            break;
49
368k
    }
50
368k
}
ts_si.c:dvbpsi_messages
Line
Count
Source
27
8.01k
{
28
8.01k
    vlc_object_t *obj = (vlc_object_t *)p_dvbpsi->p_sys;
29
30
    /* See dvbpsi.h for the definition of these log levels.*/
31
8.01k
    switch(level)
32
8.01k
    {
33
4.93k
        case DVBPSI_MSG_ERROR:
34
4.93k
        {
35
#if DVBPSI_VERSION_INT <= ((1 << 16) + (2 << 8))
36
            if( strncmp( msg, "libdvbpsi (PMT decoder): ", 25 ) ||
37
                ( strncmp( &msg[25], "invalid section", 15 ) &&
38
                  strncmp( &msg[25], "'program_number' don't match", 28 ) ) )
39
#endif
40
4.93k
            msg_Err( obj, "%s", msg ); break;
41
0
        }
42
0
        case DVBPSI_MSG_WARN:  msg_Warn( obj, "%s", msg ); break;
43
0
        case DVBPSI_MSG_NONE:
44
3.08k
        case DVBPSI_MSG_DEBUG:
45
#ifdef DVBPSI_DEBUG
46
            msg_Dbg( obj, "%s", msg );
47
#endif
48
3.08k
            break;
49
8.01k
    }
50
8.01k
}
ts_psip.c:dvbpsi_messages
Line
Count
Source
27
14.4k
{
28
14.4k
    vlc_object_t *obj = (vlc_object_t *)p_dvbpsi->p_sys;
29
30
    /* See dvbpsi.h for the definition of these log levels.*/
31
14.4k
    switch(level)
32
14.4k
    {
33
4.19k
        case DVBPSI_MSG_ERROR:
34
4.19k
        {
35
#if DVBPSI_VERSION_INT <= ((1 << 16) + (2 << 8))
36
            if( strncmp( msg, "libdvbpsi (PMT decoder): ", 25 ) ||
37
                ( strncmp( &msg[25], "invalid section", 15 ) &&
38
                  strncmp( &msg[25], "'program_number' don't match", 28 ) ) )
39
#endif
40
4.19k
            msg_Err( obj, "%s", msg ); break;
41
0
        }
42
0
        case DVBPSI_MSG_WARN:  msg_Warn( obj, "%s", msg ); break;
43
0
        case DVBPSI_MSG_NONE:
44
10.2k
        case DVBPSI_MSG_DEBUG:
45
#ifdef DVBPSI_DEBUG
46
            msg_Dbg( obj, "%s", msg );
47
#endif
48
10.2k
            break;
49
14.4k
    }
50
14.4k
}
sections.c:dvbpsi_messages
Line
Count
Source
27
137k
{
28
137k
    vlc_object_t *obj = (vlc_object_t *)p_dvbpsi->p_sys;
29
30
    /* See dvbpsi.h for the definition of these log levels.*/
31
137k
    switch(level)
32
137k
    {
33
126k
        case DVBPSI_MSG_ERROR:
34
126k
        {
35
#if DVBPSI_VERSION_INT <= ((1 << 16) + (2 << 8))
36
            if( strncmp( msg, "libdvbpsi (PMT decoder): ", 25 ) ||
37
                ( strncmp( &msg[25], "invalid section", 15 ) &&
38
                  strncmp( &msg[25], "'program_number' don't match", 28 ) ) )
39
#endif
40
126k
            msg_Err( obj, "%s", msg ); break;
41
0
        }
42
0
        case DVBPSI_MSG_WARN:  msg_Warn( obj, "%s", msg ); break;
43
0
        case DVBPSI_MSG_NONE:
44
10.7k
        case DVBPSI_MSG_DEBUG:
45
#ifdef DVBPSI_DEBUG
46
            msg_Dbg( obj, "%s", msg );
47
#endif
48
10.7k
            break;
49
137k
    }
50
137k
}
51
52
#endif