* src/descriptors/dr_06.h, src/descriptors/dr_06.c: MPEG2 "data

    stream alignment" descriptor decoder and generator (not tested).
  * src/descriptors/dr_07.h, src/descriptors/dr_07.c: MPEG2 "target
    background grid" descriptor decoder and generator (not tested).
  * src/descriptors/dr_08.h, src/descriptors/dr_08.c: MPEG2 "video
    window" descriptor decoder and generator (not tested).
parent 927a8e2c
......@@ -4,7 +4,19 @@ pkgincludedir = $(includedir)/dvbpsi
noinst_LTLIBRARIES = lib_descriptors.la
lib_descriptors_la_SOURCES = dr_02.c dr_03.c dr_04.c dr_05.c
lib_descriptors_la_SOURCES = dr_02.c \
dr_03.c \
dr_04.c \
dr_05.c \
dr_06.c \
dr_07.c \
dr_08.c
pkginclude_HEADERS = dr_02.h dr_03.h dr_04.h dr_05.h
pkginclude_HEADERS = dr_02.h \
dr_03.h \
dr_04.h \
dr_05.h \
dr_06.h \
dr_07.h \
dr_08.h
......@@ -77,9 +77,11 @@ pkgincludedir = $(includedir)/dvbpsi
noinst_LTLIBRARIES = lib_descriptors.la
lib_descriptors_la_SOURCES = dr_02.c dr_03.c dr_04.c dr_05.c
lib_descriptors_la_SOURCES = dr_02.c dr_03.c dr_04.c dr_05.c dr_06.c dr_07.c dr_08.c
pkginclude_HEADERS = dr_02.h dr_03.h dr_04.h dr_05.h dr_06.h dr_07.h dr_08.h
pkginclude_HEADERS = dr_02.h dr_03.h dr_04.h dr_05.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../src/config.h
CONFIG_CLEAN_FILES =
......@@ -92,7 +94,8 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
lib_descriptors_la_LDFLAGS =
lib_descriptors_la_LIBADD =
lib_descriptors_la_OBJECTS = dr_02.lo dr_03.lo dr_04.lo dr_05.lo
lib_descriptors_la_OBJECTS = dr_02.lo dr_03.lo dr_04.lo dr_05.lo \
dr_06.lo dr_07.lo dr_08.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
......@@ -107,7 +110,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/dr_02.P .deps/dr_03.P .deps/dr_04.P .deps/dr_05.P
DEP_FILES = .deps/dr_02.P .deps/dr_03.P .deps/dr_04.P .deps/dr_05.P \
.deps/dr_06.P .deps/dr_07.P .deps/dr_08.P
SOURCES = $(lib_descriptors_la_SOURCES)
OBJECTS = $(lib_descriptors_la_OBJECTS)
......
/*****************************************************************************
* dr_06.c
* (c)2001-2002 VideoLAN
* $Id: dr_06.c,v 1.1 2002/05/08 15:55:32 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*****************************************************************************/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../dvbpsi.h"
#include "../dvbpsi_private.h"
#include "../descriptor.h"
#include "dr_06.h"
/*****************************************************************************
* dvbpsi_DecodeDSAlignmentDr
*****************************************************************************/
dvbpsi_ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentDr(
dvbpsi_descriptor_t * p_descriptor)
{
dvbpsi_ds_alignment_dr_t * p_decoded;
/* Check the tag */
if(p_descriptor->i_tag != 0x06)
{
DVBPSI_ERROR_ARG("dr_06 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
return p_descriptor->p_decoded;
/* Allocate memory */
p_decoded = (dvbpsi_ds_alignment_dr_t*)
malloc(sizeof(dvbpsi_ds_alignment_dr_t));
if(!p_decoded)
{
DVBPSI_ERROR("dr_06 decoder", "out of memory");
return NULL;
}
/* Decode data and check the length */
if(p_descriptor->i_length != 1)
{
DVBPSI_ERROR_ARG("dr_06 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
}
p_decoded->i_alignment_type = p_descriptor->p_data[0];
p_descriptor->p_decoded = (void*)p_decoded;
return p_decoded;
}
/*****************************************************************************
* dvbpsi_GenDSAlignmentDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
dvbpsi_ds_alignment_dr_t * p_decoded,
int b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_NewDescriptor(0x06, 1, NULL);
if(p_descriptor)
{
/* Encode data */
p_descriptor->p_data[0] = p_decoded->i_alignment_type;
if(b_duplicate)
{
/* Duplicate decoded data */
dvbpsi_ds_alignment_dr_t * p_dup_decoded =
(dvbpsi_ds_alignment_dr_t*)malloc(sizeof(dvbpsi_ds_alignment_dr_t));
if(p_dup_decoded)
memcpy(p_dup_decoded, p_decoded, sizeof(dvbpsi_ds_alignment_dr_t));
p_descriptor->p_decoded = (void*)p_dup_decoded;
}
}
return p_descriptor;
}
/*****************************************************************************
* dr_06.h
* (c)2001-2002 VideoLAN
* $Id: dr_06.h,v 1.1 2002/05/08 15:55:32 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*****************************************************************************/
/*!
* \file <dr_06.h>
* \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* \brief Application interface for the MPEG 2 "data stream alignment"
* descriptor decoder and generator.
*
* Application interface for the MPEG 2 "data stream alignment" descriptor
* decoder and generator. This descriptor's definition can be found in
* ISO/IEC 13818-1 section 2.6.10.
*/
#ifndef _DVBPSI_DR_06_H_
#define _DVBPSI_DR_06_H_
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************
* dvbpsi_ds_alignment_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_ds_alignment_dr_s
* \brief "data stream alignment" descriptor structure.
*
* This structure is used to store a decoded "data stream alignment"
* descriptor. (ISO/IEC 13818-1 section 2.6.10).
*/
/*!
* \typedef struct dvbpsi_ds_alignment_dr_s dvbpsi_ds_alignment_dr_t
* \brief dvbpsi_ds_alignment_dr_t type definition.
*/
typedef struct dvbpsi_ds_alignment_dr_s
{
uint8_t i_alignment_type; /*!< alignment_type */
} dvbpsi_ds_alignment_dr_t;
/*****************************************************************************
* dvbpsi_DecodeDSAlignmentDr
*****************************************************************************/
/*!
* \fn dvbpsi_ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentDr(
* dvbpsi_descriptor_t * p_descriptor)
* \brief "data stream alignment" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "data stream alignment" descriptor structure
* which contains the decoded data.
*/
dvbpsi_ds_alignment_dr_t* dvbpsi_DecodeDSAlignmentDr(
dvbpsi_descriptor_t * p_descriptor);
/*****************************************************************************
* dvbpsi_GenDSAlignmentDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
* dvbpsi_ds_alignment_dr_t * p_decoded, int b_duplicate)
* \brief "data stream alignment" descriptor generator.
* \param p_decoded pointer to a decoded "data stream alignment" descriptor
* structure
* \param b_duplicate if non zero then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
dvbpsi_ds_alignment_dr_t * p_decoded,
int b_duplicate);
#ifdef __cplusplus
};
#endif
#else
#error "Multiple inclusions of dr_06.h"
#endif
/*****************************************************************************
* dr_07.c
* (c)2001-2002 VideoLAN
* $Id: dr_07.c,v 1.1 2002/05/08 15:55:32 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*****************************************************************************/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../dvbpsi.h"
#include "../dvbpsi_private.h"
#include "../descriptor.h"
#include "dr_07.h"
/*****************************************************************************
* dvbpsi_DecodeTargetBgGridDr
*****************************************************************************/
dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
dvbpsi_descriptor_t * p_descriptor)
{
dvbpsi_target_bg_grid_dr_t * p_decoded;
/* Check the tag */
if(p_descriptor->i_tag != 0x07)
{
DVBPSI_ERROR_ARG("dr_07 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
return p_descriptor->p_decoded;
/* Allocate memory */
p_decoded = (dvbpsi_target_bg_grid_dr_t*)
malloc(sizeof(dvbpsi_target_bg_grid_dr_t));
if(!p_decoded)
{
DVBPSI_ERROR("dr_07 decoder", "out of memory");
return NULL;
}
/* Decode data and check the length */
if(p_descriptor->i_length != 4)
{
DVBPSI_ERROR_ARG("dr_07 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
}
p_decoded->i_horizontal_size = ((uint16_t)(p_descriptor->p_data[0]) << 6)
| ((p_descriptor->p_data[1] & 0xfc) >> 2);
p_decoded->i_vertical_size =
((uint16_t)(p_descriptor->p_data[1] & 0x03) << 12)
| ((uint16_t)(p_descriptor->p_data[2]) << 4)
| ((p_descriptor->p_data[3] & 0xf0) >> 4);
p_decoded->i_pel_aspect_ratio = p_descriptor->p_data[3] & 0x0f;
p_descriptor->p_decoded = (void*)p_decoded;
return p_decoded;
}
/*****************************************************************************
* dvbpsi_GenTargetBgGridDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
dvbpsi_target_bg_grid_dr_t * p_decoded,
int b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_NewDescriptor(0x06, 4, NULL);
if(p_descriptor)
{
/* Encode data */
p_descriptor->p_data[0] = p_decoded->i_horizontal_size >> 6;
p_descriptor->p_data[1] = (((uint8_t)p_decoded->i_horizontal_size) << 2)
| (p_decoded->i_vertical_size >> 12);
p_descriptor->p_data[2] = ((uint8_t)p_decoded->i_vertical_size) >> 4;
p_descriptor->p_data[3] = (((uint8_t)p_decoded->i_vertical_size) << 4)
| (p_decoded->i_pel_aspect_ratio & 0x0f);
if(b_duplicate)
{
/* Duplicate decoded data */
dvbpsi_target_bg_grid_dr_t * p_dup_decoded =
(dvbpsi_target_bg_grid_dr_t*)malloc(sizeof(dvbpsi_target_bg_grid_dr_t));
if(p_dup_decoded)
memcpy(p_dup_decoded, p_decoded, sizeof(dvbpsi_target_bg_grid_dr_t));
p_descriptor->p_decoded = (void*)p_dup_decoded;
}
}
return p_descriptor;
}
/*****************************************************************************
* dr_07.h
* (c)2001-2002 VideoLAN
* $Id: dr_07.h,v 1.1 2002/05/08 15:55:32 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*****************************************************************************/
/*!
* \file <dr_07.h>
* \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* \brief Application interface for the MPEG 2 "target background grid"
* descriptor decoder and generator.
*
* Application interface for the MPEG 2 "target background grid" descriptor
* decoder and generator. This descriptor's definition can be found in
* ISO/IEC 13818-1 section 2.6.12.
*/
#ifndef _DVBPSI_DR_07_H_
#define _DVBPSI_DR_07_H_
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************
* dvbpsi_target_bg_grid_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_target_bg_grid_dr_s
* \brief "target background grid" descriptor structure.
*
* This structure is used to store a decoded "target background grid"
* descriptor. (ISO/IEC 13818-1 section 2.6.12).
*/
/*!
* \typedef struct dvbpsi_target_bg_grid_dr_s dvbpsi_target_bg_grid_dr_t
* \brief dvbpsi_target_bg_grid_dr_t type definition.
*/
typedef struct dvbpsi_target_bg_grid_dr_s
{
uint16_t i_horizontal_size; /*!< horizontal_size */
uint16_t i_vertical_size; /*!< vertical_size */
uint8_t i_pel_aspect_ratio; /*!< pel_aspect_ratio */
} dvbpsi_target_bg_grid_dr_t;
/*****************************************************************************
* dvbpsi_DecodeTargetBgGridDr
*****************************************************************************/
/*!
* \fn dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
* dvbpsi_descriptor_t * p_descriptor)
* \brief "target background grid" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "target background grid" descriptor structure
* which contains the decoded data.
*/
dvbpsi_target_bg_grid_dr_t* dvbpsi_DecodeTargetBgGridDr(
dvbpsi_descriptor_t * p_descriptor);
/*****************************************************************************
* dvbpsi_GenTargetBgGridDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
* dvbpsi_target_bg_grid_dr_t * p_decoded, int b_duplicate)
* \brief "target background grid" descriptor generator.
* \param p_decoded pointer to a decoded "target background grid" descriptor
* structure
* \param b_duplicate if non zero then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
dvbpsi_target_bg_grid_dr_t * p_decoded,
int b_duplicate);
#ifdef __cplusplus
};
#endif
#else
#error "Multiple inclusions of dr_07.h"
#endif
/*****************************************************************************
* dr_08.c
* (c)2001-2002 VideoLAN
* $Id: dr_08.c,v 1.1 2002/05/08 15:55:32 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*****************************************************************************/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../dvbpsi.h"
#include "../dvbpsi_private.h"
#include "../descriptor.h"
#include "dr_08.h"
/*****************************************************************************
* dvbpsi_DecodeVWindowDr
*****************************************************************************/
dvbpsi_vwindow_dr_t * dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descriptor)
{
dvbpsi_vwindow_dr_t * p_decoded;
/* Check the tag */
if(p_descriptor->i_tag != 0x08)
{
DVBPSI_ERROR_ARG("dr_08 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
return p_descriptor->p_decoded;
/* Allocate memory */
p_decoded = (dvbpsi_vwindow_dr_t*)malloc(sizeof(dvbpsi_vwindow_dr_t));
if(!p_decoded)
{
DVBPSI_ERROR("dr_08 decoder", "out of memory");
return NULL;
}
/* Decode data and check the length */
if(p_descriptor->i_length != 4)
{
DVBPSI_ERROR_ARG("dr_08 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
}
p_decoded->i_horizontal_offset = ((uint16_t)(p_descriptor->p_data[0]) << 6)
| ((p_descriptor->p_data[1] & 0xfc) >> 2);
p_decoded->i_vertical_offset =
((uint16_t)(p_descriptor->p_data[1] & 0x03) << 12)
| ((uint16_t)(p_descriptor->p_data[2]) << 4)
| ((p_descriptor->p_data[3] & 0xf0) >> 4);
p_decoded->i_window_priority = p_descriptor->p_data[3] & 0x0f;
p_descriptor->p_decoded = (void*)p_decoded;
return p_decoded;
}
/*****************************************************************************
* dvbpsi_GenVWindowDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded,
int b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_NewDescriptor(0x06, 4, NULL);
if(p_descriptor)
{
/* Encode data */
p_descriptor->p_data[0] = p_decoded->i_horizontal_offset >> 6;
p_descriptor->p_data[1] = (((uint8_t)p_decoded->i_horizontal_offset) << 2)
| (p_decoded->i_vertical_offset >> 12);
p_descriptor->p_data[2] = ((uint8_t)p_decoded->i_vertical_offset) >> 4;
p_descriptor->p_data[3] = (((uint8_t)p_decoded->i_vertical_offset) << 4)
| (p_decoded->i_window_priority & 0x0f);
if(b_duplicate)
{
/* Duplicate decoded data */
dvbpsi_vwindow_dr_t * p_dup_decoded =
(dvbpsi_vwindow_dr_t*)malloc(sizeof(dvbpsi_vwindow_dr_t));
if(p_dup_decoded)
memcpy(p_dup_decoded, p_decoded, sizeof(dvbpsi_vwindow_dr_t));
p_descriptor->p_decoded = (void*)p_dup_decoded;
}
}
return p_descriptor;
}
/*****************************************************************************
* dr_08.h
* (c)2001-2002 VideoLAN
* $Id: dr_08.h,v 1.1 2002/05/08 15:55:32 bozo Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*****************************************************************************/
/*!
* \file <dr_08.h>
* \author Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* \brief Application interface for the MPEG 2 "video window"
* descriptor decoder and generator.
*
* Application interface for the MPEG 2 "video window" descriptor
* decoder and generator. This descriptor's definition can be found in
* ISO/IEC 13818-1 section 2.6.14.
*/
#ifndef _DVBPSI_DR_08_H_
#define _DVBPSI_DR_08_H_
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************
* dvbpsi_vwindow_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_vwindow_dr_s
* \brief "video window" descriptor structure.
*
* This structure is used to store a decoded "video window"
* descriptor. (ISO/IEC 13818-1 section 2.6.14).
*/
/*!
* \typedef struct dvbpsi_vwindow_dr_s dvbpsi_vwindow_dr_t
* \brief dvbpsi_vwindow_dr_t type definition.
*/
typedef struct dvbpsi_vwindow_dr_s
{
uint16_t i_horizontal_offset; /*!< horizontal_offset */
uint16_t i_vertical_offset; /*!< vertical_offset */
uint8_t i_window_priority; /*!< window_priority */
} dvbpsi_vwindow_dr_t;
/*****************************************************************************
* dvbpsi_DecodeVWindowDr
*****************************************************************************/
/*!
* \fn dvbpsi_vwindow_dr_t * dvbpsi_DecodeVWindowDr(
* dvbpsi_descriptor_t * p_descriptor)
* \brief "video window" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "vwindow" descriptor structure which contains
* the decoded data.
*/
dvbpsi_vwindow_dr_t* dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descriptor);
/*****************************************************************************
* dvbpsi_GenVWindowDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(
* dvbpsi_vwindow_dr_t * p_decoded, int b_duplicate)
* \brief "video window" descriptor generator.
* \param p_decoded pointer to a decoded "vwindow" descriptor structure
* \param b_duplicate if non zero then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded,
int b_duplicate);
#ifdef __cplusplus
};
#endif
#else
#error "Multiple inclusions of dr_08.h"
#endif
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