Commit 34c444be authored by Johan Bilien's avatar Johan Bilien

* src/descriptors/*: fixed some typos

  * misc/*: added tests on the new descriptors
parent 7258f595
...@@ -20,6 +20,6 @@ noinst_HEADERS = test_dr.h ...@@ -20,6 +20,6 @@ noinst_HEADERS = test_dr.h
EXTRA_DIST=dr.dtd dr.xml dr.xsl EXTRA_DIST=dr.dtd dr.xml dr.xsl
test_dr.c: test_dr.c: dr.dtd dr.xml dr.xsl
xsltproc -o test_dr.c dr.xsl dr.xml xsltproc -o test_dr.c dr.xsl dr.xml
...@@ -108,5 +108,31 @@ ...@@ -108,5 +108,31 @@
<descriptor name="private data indicator" sname="private_data" fname="PrivateData"> <descriptor name="private data indicator" sname="private_data" fname="PrivateData">
<integer name="i_private_data" bitcount="32" default="0" /> <integer name="i_private_data" bitcount="32" default="0" />
</descriptor> </descriptor>
<!--
<descriptor name="stuffing" sname="stuffing" fname="Stuffing">
<insert>
<begin>
s_decoded.i_stuffing_length = 0;</begin>
</insert>
</descriptor>
<descriptor name="bouquet name" sname="bouquet_name" fname="BouquetName">
<insert>
<begin>
s_decoded.i_name_length = 0;</begin>
</insert>
</descriptor>-->
<descriptor name="service" sname="service" fname="Service">
<insert>
<begin>
s_decoded.i_service_provider_name_length = 0;</begin>
</insert>
<insert>
<begin>
s_decoded.i_service_name_length = 0;</begin>
</insert>
<integer name="i_service_type" bitcount="8" default="0" />
</descriptor>
</dr> </dr>
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
#include &lt;stdio.h&gt; #include &lt;stdio.h&gt;
#if defined(HAVE_INTTYPES_H)
#include &lt;inttypes.h&gt;
#elif defined(HAVE_STDINT_H)
#include &lt;stdint.h&gt;
#endif
/* the libdvbpsi distribution defines DVBPSI_DIST */ /* the libdvbpsi distribution defines DVBPSI_DIST */
#ifdef DVBPSI_DIST #ifdef DVBPSI_DIST
#include "../src/dvbpsi.h" #include "../src/dvbpsi.h"
......
...@@ -639,6 +639,29 @@ int main_private_data_() ...@@ -639,6 +639,29 @@ int main_private_data_()
return i_err; return i_err;
} }
/* service */
int main_service_()
{
BOZO_VARS(service);
BOZO_START(service);
/* check i_service_type */
s_decoded.i_service_provider_name_length = 0;
s_decoded.i_service_name_length = 0;
BOZO_init_integer(i_service_type, 0);
BOZO_begin_integer(i_service_type, 8)
BOZO_DOJOB(Service);
BOZO_check_integer(i_service_type, 8)
BOZO_CLEAN();
BOZO_end_integer(i_service_type, 8)
BOZO_END(service);
return i_err;
}
/* main function */ /* main function */
int main() int main()
...@@ -660,6 +683,7 @@ int main() ...@@ -660,6 +683,7 @@ int main()
i_err |= main_copyright_(); i_err |= main_copyright_();
i_err |= main_max_bitrate_(); i_err |= main_max_bitrate_();
i_err |= main_private_data_(); i_err |= main_private_data_();
i_err |= main_service_();
if(i_err) if(i_err)
fprintf(stderr, "At least one test has FAILED !!!\n"); fprintf(stderr, "At least one test has FAILED !!!\n");
......
/***************************************************************************** /*****************************************************************************
* dr.h * dr.h
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dr.h,v 1.3 2002/05/11 11:42:27 bozo Exp $ * $Id: dr.h,v 1.4 2002/12/12 10:19:32 jobi Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
#include "dr_0d.h" #include "dr_0d.h"
#include "dr_0e.h" #include "dr_0e.h"
#include "dr_0f.h" #include "dr_0f.h"
#include "dr_42.h"
#include "dr_47.h"
#include "dr_48.h"
#else #else
#error "Multiple inclusions of dr.h" #error "Multiple inclusions of dr.h"
......
/***************************************************************************** /*****************************************************************************
* dr_42.h * dr_42.h
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dr_42.h,v 1.1 2002/12/11 13:14:42 jobi Exp $ * $Id: dr_42.h,v 1.2 2002/12/12 10:19:32 jobi Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr> * Johan Bilien <jobi@via.ecp.fr>
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
* ETSI EN 300 468 section 6.2.35. * ETSI EN 300 468 section 6.2.35.
*/ */
#ifndef _DVBPSI_DR_0F_H_ #ifndef _DVBPSI_DR_42_H_
#define _DVBPSI_DR_0F_H_ #define _DVBPSI_DR_42_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
/***************************************************************************** /*****************************************************************************
* dr_47.h * dr_47.h
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dr_47.h,v 1.1 2002/12/11 13:14:42 jobi Exp $ * $Id: dr_47.h,v 1.2 2002/12/12 10:19:32 jobi Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr> * Johan Bilien <jobi@via.ecp.fr>
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
* ETSI EN 300 468 section 6.2.3. * ETSI EN 300 468 section 6.2.3.
*/ */
#ifndef _DVBPSI_DR_0F_H_ #ifndef _DVBPSI_DR_47_H_
#define _DVBPSI_DR_0F_H_ #define _DVBPSI_DR_47_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
/***************************************************************************** /*****************************************************************************
* dr_48.h * dr_48.h
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: dr_48.h,v 1.1 2002/12/11 13:14:42 jobi Exp $ * $Id: dr_48.h,v 1.2 2002/12/12 10:19:32 jobi Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Johan Bilien <jobi@via.ecp.fr> * Johan Bilien <jobi@via.ecp.fr>
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
* ETSI EN 300 468 section 6.2.30. * ETSI EN 300 468 section 6.2.30.
*/ */
#ifndef _DVBPSI_DR_0F_H_ #ifndef _DVBPSI_DR_48_H_
#define _DVBPSI_DR_0F_H_ #define _DVBPSI_DR_48_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -96,7 +96,7 @@ dvbpsi_service_dr_t* dvbpsi_DecodeServiceDr( ...@@ -96,7 +96,7 @@ dvbpsi_service_dr_t* dvbpsi_DecodeServiceDr(
* the descriptor * the descriptor
* \return a pointer to a new descriptor structure which contains encoded data. * \return a pointer to a new descriptor structure which contains encoded data.
*/ */
dvbpsi_descriptor_t * dvbpsi_GenServiceDataDr( dvbpsi_descriptor_t * dvbpsi_GenServiceDr(
dvbpsi_service_dr_t * p_decoded, dvbpsi_service_dr_t * p_decoded,
int b_duplicate); int b_duplicate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment