LCOV - code coverage report
Current view: top level - gst/mpegdemux - flutspatinfo.c (source / functions) Hit Total Coverage
Test: GStreamer Bad Plug-ins 0.10.21.1 Lines: 1 30 3.3 %
Date: 2011-03-25 Functions: 1 8 12.5 %
Branches: 1 21 4.8 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * This library is licensed under 2 different licenses and you
       3                 :            :  * can choose to use it under the terms of either one of them. The
       4                 :            :  * two licenses are the MPL 1.1 and the LGPL.
       5                 :            :  *
       6                 :            :  * MPL:
       7                 :            :  *
       8                 :            :  * The contents of this file are subject to the Mozilla Public License
       9                 :            :  * Version 1.1 (the "License"); you may not use this file except in
      10                 :            :  * compliance with the License. You may obtain a copy of the License at
      11                 :            :  * http://www.mozilla.org/MPL/.
      12                 :            :  *
      13                 :            :  * Software distributed under the License is distributed on an "AS IS"
      14                 :            :  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
      15                 :            :  * License for the specific language governing rights and limitations
      16                 :            :  * under the License.
      17                 :            :  *
      18                 :            :  * LGPL:
      19                 :            :  *
      20                 :            :  * This library is free software; you can redistribute it and/or
      21                 :            :  * modify it under the terms of the GNU Library General Public
      22                 :            :  * License as published by the Free Software Foundation; either
      23                 :            :  * version 2 of the License, or (at your option) any later version.
      24                 :            :  *
      25                 :            :  * This library is distributed in the hope that it will be useful,
      26                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      27                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      28                 :            :  * Library General Public License for more details.
      29                 :            :  *
      30                 :            :  * You should have received a copy of the GNU Library General Public
      31                 :            :  * License along with this library; if not, write to the
      32                 :            :  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      33                 :            :  * Boston, MA 02111-1307, USA.
      34                 :            :  *
      35                 :            :  * The Original Code is Fluendo MPEG Demuxer plugin.
      36                 :            :  *
      37                 :            :  * The Initial Developer of the Original Code is Fluendo, S.L.
      38                 :            :  * Portions created by Fluendo, S.L. are Copyright (C) 2005
      39                 :            :  * Fluendo, S.L. All Rights Reserved.
      40                 :            :  *
      41                 :            :  * Contributor(s): Jan Schmidt <jan@fluendo.com>
      42                 :            :  */
      43                 :            : 
      44                 :            : #ifdef HAVE_CONFIG_H
      45                 :            : #include "config.h"
      46                 :            : #endif
      47                 :            : 
      48                 :            : #include <gst/gst.h>
      49                 :            : 
      50                 :            : #include "flutspatinfo.h"
      51                 :            : 
      52                 :            : enum
      53                 :            : {
      54                 :            :   PROP_0,
      55                 :            :   PROP_PROGRAM_NO,
      56                 :            :   PROP_PID
      57                 :            : };
      58                 :            : 
      59                 :            : static void mpegts_pat_info_set_property (GObject * object, guint prop_id,
      60                 :            :     const GValue * value, GParamSpec * spec);
      61                 :            : static void mpegts_pat_info_get_property (GObject * object, guint prop_id,
      62                 :            :     GValue * value, GParamSpec * spec);
      63                 :            : 
      64         [ +  - ]:          6 : GST_BOILERPLATE (MpegTsPatInfo, mpegts_pat_info, GObject, G_TYPE_OBJECT);
      65                 :            : 
      66                 :            : MpegTsPatInfo *
      67                 :          0 : mpegts_pat_info_new (guint16 program_no, guint16 pid)
      68                 :            : {
      69                 :            :   MpegTsPatInfo *info;
      70                 :            : 
      71                 :          0 :   info = g_object_new (MPEGTS_TYPE_PAT_INFO, NULL);
      72                 :            : 
      73                 :          0 :   info->program_no = program_no;
      74                 :          0 :   info->pid = pid;
      75                 :            : 
      76                 :          0 :   return info;
      77                 :            : }
      78                 :            : 
      79                 :            : static void
      80                 :          0 : mpegts_pat_info_base_init (gpointer klass)
      81                 :            : {
      82                 :          0 : }
      83                 :            : 
      84                 :            : static void
      85                 :          0 : mpegts_pat_info_class_init (MpegTsPatInfoClass * klass)
      86                 :            : {
      87                 :          0 :   GObjectClass *gobject_klass = (GObjectClass *) klass;
      88                 :            : 
      89                 :          0 :   gobject_klass->set_property = mpegts_pat_info_set_property;
      90                 :          0 :   gobject_klass->get_property = mpegts_pat_info_get_property;
      91                 :            : 
      92                 :          0 :   g_object_class_install_property (gobject_klass, PROP_PROGRAM_NO,
      93                 :            :       g_param_spec_uint ("program-number", "Program Number",
      94                 :            :           "Program Number for this program", 0, G_MAXUINT16, 1,
      95                 :            :           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
      96                 :            : 
      97                 :          0 :   g_object_class_install_property (gobject_klass, PROP_PID,
      98                 :            :       g_param_spec_uint ("pid", "PID carrying PMT",
      99                 :            :           "PID which carries the PMT for this program", 1, G_MAXUINT16, 1,
     100                 :            :           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
     101                 :          0 : }
     102                 :            : 
     103                 :            : static void
     104                 :          0 : mpegts_pat_info_init (MpegTsPatInfo * pat_info, MpegTsPatInfoClass * klass)
     105                 :            : {
     106                 :          0 : }
     107                 :            : 
     108                 :            : static void
     109                 :          0 : mpegts_pat_info_set_property (GObject * object, guint prop_id,
     110                 :            :     const GValue * value, GParamSpec * spec)
     111                 :            : {
     112 [ #  # ][ #  # ]:          0 :   g_return_if_fail (MPEGTS_IS_PAT_INFO (object));
         [ #  # ][ #  # ]
     113                 :            : 
     114                 :            :   /* No settable properties */
     115                 :          0 :   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
     116                 :            : }
     117                 :            : 
     118                 :            : static void
     119                 :          0 : mpegts_pat_info_get_property (GObject * object, guint prop_id,
     120                 :            :     GValue * value, GParamSpec * spec)
     121                 :            : {
     122                 :            :   MpegTsPatInfo *pat_info;
     123                 :            : 
     124 [ #  # ][ #  # ]:          0 :   g_return_if_fail (MPEGTS_IS_PAT_INFO (object));
         [ #  # ][ #  # ]
     125                 :            : 
     126                 :          0 :   pat_info = MPEGTS_PAT_INFO (object);
     127                 :            : 
     128      [ #  #  # ]:          0 :   switch (prop_id) {
     129                 :            :     case PROP_PROGRAM_NO:
     130                 :          0 :       g_value_set_uint (value, pat_info->program_no);
     131                 :          0 :       break;
     132                 :            :     case PROP_PID:
     133                 :          0 :       g_value_set_uint (value, pat_info->pid);
     134                 :          0 :       break;
     135                 :            :     default:
     136                 :          0 :       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec);
     137                 :          0 :       break;
     138                 :            :   }
     139                 :            : }

Generated by: LCOV version 1.9