libdvbpsi  1.3.0
descriptor.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * descriptor.h
00003  * Copyright (C) 2001-2010 VideoLAN
00004  * $Id: descriptor.h,v 1.5 2002/05/08 13:00:40 bozo Exp $
00005  *
00006  * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021  *
00022  *****************************************************************************/
00023 
00035 #ifndef _DVBPSI_DESCRIPTOR_H_
00036 #define _DVBPSI_DESCRIPTOR_H_
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 #ifdef HAVE_SYS_TYPES_H
00043 #include <sys/types.h>
00044 #endif
00045 
00046 /*****************************************************************************
00047  * common definitions
00048  *****************************************************************************/
00053 typedef uint8_t iso_639_language_code_t[3];
00054 
00055 /*****************************************************************************
00056  * dvbpsi_descriptor_t
00057  *****************************************************************************/
00082 typedef struct dvbpsi_descriptor_s
00083 {
00084   uint8_t                       i_tag;          
00085   uint8_t                       i_length;       
00087   uint8_t *                     p_data;         
00089   struct dvbpsi_descriptor_s *  p_next;         
00092   void *                        p_decoded;      
00094 } dvbpsi_descriptor_t;
00095 
00096 /*****************************************************************************
00097  * dvbpsi_NewDescriptor
00098  *****************************************************************************/
00109 dvbpsi_descriptor_t* dvbpsi_NewDescriptor(uint8_t i_tag, uint8_t i_length,
00110                                           uint8_t* p_data);
00111 
00112 
00113 /*****************************************************************************
00114  * dvbpsi_DeleteDescriptors
00115  *****************************************************************************/
00123 void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t* p_descriptor);
00124 
00125 /*****************************************************************************
00126  * dvbpsi_AddDescriptor
00127  *****************************************************************************/
00136 dvbpsi_descriptor_t *dvbpsi_AddDescriptor(dvbpsi_descriptor_t *p_list,
00137                                           dvbpsi_descriptor_t *p_descriptor);
00138 
00139 /*****************************************************************************
00140  * dvbpsi_CanDecodeAsDescriptor
00141  *****************************************************************************/
00149 bool dvbpsi_CanDecodeAsDescriptor(dvbpsi_descriptor_t *p_descriptor, const uint8_t i_tag);
00150 
00151 /*****************************************************************************
00152  * dvbpsi_IsDescriptorDecoded
00153  *****************************************************************************/
00160 bool dvbpsi_IsDescriptorDecoded(dvbpsi_descriptor_t *p_descriptor);
00161 
00162 /*****************************************************************************
00163  * dvbpsi_DuplicateDecodedDescriptor
00164  *****************************************************************************/
00172 void *dvbpsi_DuplicateDecodedDescriptor(void *p_decoded, ssize_t i_size);
00173 
00174 #ifdef __cplusplus
00175 };
00176 #endif
00177 
00178 #else
00179 #error "Multiple inclusions of descriptor.h"
00180 #endif
00181