2013-06-23 06:41:12 +00:00
|
|
|
/*
|
2018-11-05 15:21:35 +00:00
|
|
|
* mpegtspacketizer.h -
|
2013-06-23 06:41:12 +00:00
|
|
|
* Copyright (C) 2013 Edward Hervey
|
2018-11-05 15:21:35 +00:00
|
|
|
*
|
2013-06-23 06:41:12 +00:00
|
|
|
* Authors:
|
|
|
|
* Edward Hervey <edward@collabora.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_MPEGTS_SECTION_H
|
|
|
|
#define GST_MPEGTS_SECTION_H
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/mpegts/gstmpegtsdescriptor.h>
|
|
|
|
|
2014-01-06 15:01:22 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef struct _GstMpegtsSection GstMpegtsSection;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
#define GST_TYPE_MPEGTS_SECTION (gst_mpegts_section_get_type())
|
2014-06-25 12:50:05 +00:00
|
|
|
#define GST_MPEGTS_SECTION(section) ((GstMpegtsSection*) section)
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
#define GST_MPEGTS_SECTION_TYPE(section) (GST_MPEGTS_SECTION (section)->section_type)
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-06-23 06:41:12 +00:00
|
|
|
GType gst_mpegts_section_get_type (void);
|
|
|
|
|
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsSectionType:
|
2013-06-23 06:41:12 +00:00
|
|
|
* @GST_MPEGTS_SECTION_UNKNOWN: Unknown section type
|
|
|
|
* @GST_MPEGTS_SECTION_PAT: Program Association Table (ISO/IEC 13818-1)
|
|
|
|
* @GST_MPEGTS_SECTION_PMT: Program Map Table (ISO/IEC 13818-1)
|
|
|
|
* @GST_MPEGTS_SECTION_CAT: Conditional Access Table (ISO/IEC 13818-1)
|
|
|
|
* @GST_MPEGTS_SECTION_TSDT: Transport Stream Description Table (ISO/IEC 13818-1)
|
|
|
|
* @GST_MPEGTS_SECTION_EIT: Event Information Table (EN 300 468)
|
|
|
|
* @GST_MPEGTS_SECTION_NIT: Network Information Table (ISO/IEC 13818-1 / EN 300 468)
|
|
|
|
* @GST_MPEGTS_SECTION_BAT: Bouquet Association Table ((EN 300 468)
|
|
|
|
* @GST_MPEGTS_SECTION_SDT: Service Description Table (EN 300 468)
|
|
|
|
* @GST_MPEGTS_SECTION_TDT: Time and Date Table (EN 300 468)
|
|
|
|
* @GST_MPEGTS_SECTION_TOT: Time Offset Table (EN 300 468)
|
2014-04-09 08:04:46 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_TVCT: ATSC Terrestrial Virtual Channel Table (A65)
|
2014-05-23 04:41:18 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_CVCT: ATSC Cable Virtual Channel Table (A65)
|
2014-05-15 15:31:05 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_MGT: ATSC Master Guide Table (A65)
|
2014-05-19 16:46:03 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_ETT: ATSC Extended Text Table (A65)
|
2014-05-28 18:59:23 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_EIT: ATSC Event Information Table (A65)
|
2014-05-22 04:47:48 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_STT: ATSC System Time Table (A65)
|
2020-12-14 09:50:02 +00:00
|
|
|
* @GST_MPEGTS_SECTION_ATSC_RRT: ATSC Rating Region Table (A65)
|
2019-09-26 15:28:27 +00:00
|
|
|
* @GST_MPEGTS_SECTION_SCTE_SIT: SCTE Splice Information Table (SCTE-35)
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* Types of #GstMpegtsSection that the library handles. This covers all the
|
|
|
|
* MPEG-TS and derivate specification that the library can properly identify and
|
|
|
|
* use.
|
2013-06-23 06:41:12 +00:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_MPEGTS_SECTION_UNKNOWN = 0,
|
2018-11-05 15:21:35 +00:00
|
|
|
GST_MPEGTS_SECTION_PAT,
|
|
|
|
GST_MPEGTS_SECTION_PMT,
|
|
|
|
GST_MPEGTS_SECTION_CAT,
|
2013-06-23 06:41:12 +00:00
|
|
|
GST_MPEGTS_SECTION_TSDT,
|
2018-11-05 15:21:35 +00:00
|
|
|
GST_MPEGTS_SECTION_EIT,
|
|
|
|
GST_MPEGTS_SECTION_NIT,
|
|
|
|
GST_MPEGTS_SECTION_BAT,
|
|
|
|
GST_MPEGTS_SECTION_SDT,
|
|
|
|
GST_MPEGTS_SECTION_TDT,
|
2014-04-09 08:04:46 +00:00
|
|
|
GST_MPEGTS_SECTION_TOT,
|
2020-11-22 17:48:08 +00:00
|
|
|
/**
|
|
|
|
* GST_MPEGTS_SECTION_SIT:
|
|
|
|
*
|
|
|
|
* Selection Information Table (EN 300 468)
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
GST_MPEGTS_SECTION_SIT,
|
2014-05-23 04:41:18 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_TVCT,
|
2014-05-15 15:31:05 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_CVCT,
|
2014-05-19 16:46:03 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_MGT,
|
2014-05-22 04:47:48 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_ETT,
|
2014-05-28 18:59:23 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_EIT,
|
2019-05-21 00:53:20 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_STT,
|
2019-09-26 15:28:27 +00:00
|
|
|
GST_MPEGTS_SECTION_ATSC_RRT,
|
|
|
|
GST_MPEGTS_SECTION_SCTE_SIT
|
2014-06-25 12:50:05 +00:00
|
|
|
} GstMpegtsSectionType;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsSectionTableID:
|
2020-12-14 09:50:02 +00:00
|
|
|
* @GST_MTS_TABLE_ID_PROGRAM_ASSOCIATION: Program Association Table (PAT)
|
|
|
|
* @GST_MTS_TABLE_ID_CONDITIONAL_ACCESS: Conditional Access Table (CAT)
|
|
|
|
* @GST_MTS_TABLE_ID_TS_PROGRAM_MAP: Program Map Table (PMT)
|
|
|
|
* @GST_MTS_TABLE_ID_TS_DESCRIPTION: Transport Stream Description Table
|
|
|
|
* @GST_MTS_TABLE_ID_14496_SCENE_DESCRIPTION: ISO/IEC 14496 Scene Description Table
|
|
|
|
* @GST_MTS_TABLE_ID_14496_OBJET_DESCRIPTOR: ISO/IEC 14496 Object Descriptor Table
|
|
|
|
* @GST_MTS_TABLE_ID_METADATA: Metadata Section
|
|
|
|
* @GST_MTS_TABLE_ID_IPMP_CONTROL_INFORMATION: IPMP Control Information
|
|
|
|
* @GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA: DSM-CC Multi-Protocol Encapsulated (MPE) Data
|
|
|
|
* @GST_MTS_TABLE_ID_DSM_CC_U_N_MESSAGES: DSM-CC U-N Messages
|
|
|
|
* @GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES: DSM-CC Download Data Messages
|
|
|
|
* @GST_MTS_TABLE_ID_DSM_CC_STREAM_DESCRIPTORS: DSM-CC Stream Descriptors
|
|
|
|
* @GST_MTS_TABLE_ID_DSM_CC_PRIVATE_DATA: DSM-CC Private Data
|
|
|
|
* @GST_MTS_TABLE_ID_DSM_CC_ADDRESSABLE_SECTIONS: DSM-CC Addressable Section
|
|
|
|
* @GST_MTS_TABLE_ID_UNSET: Unset section table_id (value is forbidden to use in actual sections)
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
2014-06-25 12:50:05 +00:00
|
|
|
* Values for a #GstMpegtsSection table_id
|
2013-07-03 15:59:02 +00:00
|
|
|
*
|
|
|
|
* These are the registered ITU H.222.0 | ISO/IEC 13818-1 table_id variants.
|
|
|
|
*
|
2014-06-25 12:50:05 +00:00
|
|
|
* see also #GstMpegtsSectionATSCTableID, #GstMpegtsSectionDVBTableID, and
|
|
|
|
* #GstMpegtsSectionSCTETableID
|
2013-06-23 06:41:12 +00:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
/* ITU H.222.0 / IEC 13818-1 */
|
|
|
|
GST_MTS_TABLE_ID_PROGRAM_ASSOCIATION = 0x00,
|
|
|
|
GST_MTS_TABLE_ID_CONDITIONAL_ACCESS = 0x01,
|
|
|
|
GST_MTS_TABLE_ID_TS_PROGRAM_MAP = 0x02,
|
|
|
|
GST_MTS_TABLE_ID_TS_DESCRIPTION = 0x03,
|
|
|
|
GST_MTS_TABLE_ID_14496_SCENE_DESCRIPTION = 0x04,
|
|
|
|
GST_MTS_TABLE_ID_14496_OBJET_DESCRIPTOR = 0x05,
|
|
|
|
GST_MTS_TABLE_ID_METADATA = 0x06,
|
|
|
|
GST_MTS_TABLE_ID_IPMP_CONTROL_INFORMATION = 0x07,
|
2020-12-14 09:50:02 +00:00
|
|
|
/**
|
|
|
|
* GST_MTS_TABLE_ID_14496_SECTION:
|
|
|
|
*
|
|
|
|
* ISO/IEC 14496 Section.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
GST_MTS_TABLE_ID_14496_SECTION = 0x08,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_MTS_TABLE_ID_23001_11_SECTION:
|
|
|
|
*
|
|
|
|
* ISO/IEC 23001-11 (Green Access Unit) Section.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
GST_MTS_TABLE_ID_23001_11_SECTION = 0x09,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_MTS_TABLE_ID_23001_10_SECTION:
|
|
|
|
*
|
|
|
|
* ISO/ISO 23001-10 (Quality Access Unit) Section.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
GST_MTS_TABLE_ID_23001_10_SECTION = 0x0A,
|
2013-07-03 15:59:02 +00:00
|
|
|
|
|
|
|
/* 0x08 - 0x39 : ITU H.222.0 | ISO/IEC 13818-1 reserved */
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/* IEC 13818-6 (DSM-CC) */
|
|
|
|
GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA = 0x3A,
|
|
|
|
GST_MTS_TABLE_ID_DSM_CC_U_N_MESSAGES = 0x3B,
|
|
|
|
GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES = 0x3C,
|
|
|
|
GST_MTS_TABLE_ID_DSM_CC_STREAM_DESCRIPTORS = 0x3D,
|
|
|
|
GST_MTS_TABLE_ID_DSM_CC_PRIVATE_DATA = 0x3E,
|
|
|
|
GST_MTS_TABLE_ID_DSM_CC_ADDRESSABLE_SECTIONS = 0x3F,
|
|
|
|
|
|
|
|
/* Unset */
|
|
|
|
GST_MTS_TABLE_ID_UNSET = 0xFF
|
2018-11-05 15:21:35 +00:00
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
} GstMpegtsSectionTableID;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2020-12-14 09:50:02 +00:00
|
|
|
/**
|
|
|
|
* GstMpegtsPacketizeFunc: (attributes doc.skip=true)
|
|
|
|
*/
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef gboolean (*GstMpegtsPacketizeFunc) (GstMpegtsSection *section);
|
2013-10-28 13:44:13 +00:00
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsSection:
|
2020-12-14 09:50:02 +00:00
|
|
|
* @section_type: The type of section.
|
|
|
|
* @pid: The PID on which this section was found or belongs to.
|
|
|
|
* @table_id: The table id of this section. See %GstMpegtsSectionTableID and
|
|
|
|
* derivates for more information.
|
2013-06-23 06:41:12 +00:00
|
|
|
* @subtable_extension: This meaning differs per section. See the documentation
|
2020-12-14 09:50:02 +00:00
|
|
|
* of the parsed section type for the meaning of this field
|
2013-06-23 06:41:12 +00:00
|
|
|
* @version_number: Version of the section.
|
|
|
|
* @current_next_indicator: Applies to current/next stream or not
|
|
|
|
* @section_number: Number of the section (if multiple)
|
|
|
|
* @last_section_number: Number of the last expected section (if multiple)
|
2020-12-14 09:50:02 +00:00
|
|
|
* @crc: Checksum (if applicable)
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* Mpeg-TS Section Information (SI) (ISO/IEC 13818-1) object.
|
2013-06-23 06:41:12 +00:00
|
|
|
*/
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsSection
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
GstMiniObject parent;
|
|
|
|
|
|
|
|
/*< public >*/
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsSectionType section_type;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
guint16 pid;
|
2013-07-03 15:59:02 +00:00
|
|
|
guint8 table_id;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
guint16 subtable_extension;
|
|
|
|
guint8 version_number;
|
|
|
|
|
|
|
|
gboolean current_next_indicator;
|
|
|
|
|
|
|
|
guint8 section_number;
|
|
|
|
guint8 last_section_number;
|
|
|
|
|
|
|
|
guint32 crc;
|
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
/* data: Points to beginning of section data
|
|
|
|
* i.e. the first byte is the table_id field */
|
|
|
|
guint8 *data;
|
|
|
|
/* section_length: length of data (including final CRC if present) */
|
|
|
|
guint section_length;
|
|
|
|
/* cached_parsed: cached copy of parsed section */
|
|
|
|
gpointer *cached_parsed;
|
2013-07-03 15:59:02 +00:00
|
|
|
/* destroy_parsed: function to clear cached_parsed */
|
|
|
|
GDestroyNotify destroy_parsed;
|
2013-06-23 06:41:12 +00:00
|
|
|
/* offset: offset of the section within the container stream */
|
|
|
|
guint64 offset;
|
|
|
|
/* short_section: TRUE if section_syntax_indicator == 0
|
|
|
|
* FIXME : Maybe make public later on when allowing creation of
|
|
|
|
* sections to that people can create private short sections ? */
|
|
|
|
gboolean short_section;
|
2020-12-14 09:50:02 +00:00
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsPacketizeFunc packetizer;
|
2014-07-09 05:38:38 +00:00
|
|
|
|
|
|
|
/* Padding for future extension */
|
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2013-06-23 06:41:12 +00:00
|
|
|
};
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GBytes *gst_mpegts_section_get_data (GstMpegtsSection *section);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
/* PAT */
|
2013-08-21 06:40:16 +00:00
|
|
|
#define GST_TYPE_MPEGTS_PAT_PROGRAM (gst_mpegts_pat_program_get_type())
|
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef struct _GstMpegtsPatProgram GstMpegtsPatProgram;
|
2013-06-23 06:41:12 +00:00
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsPatProgram:
|
2013-06-23 06:41:12 +00:00
|
|
|
* @program_number: the program number
|
|
|
|
* @network_or_program_map_PID: the network of program map PID
|
|
|
|
*
|
|
|
|
* A program entry from a Program Association Table (ITU H.222.0, ISO/IEC 13818-1).
|
|
|
|
*/
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsPatProgram
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
guint16 program_number;
|
|
|
|
guint16 network_or_program_map_PID;
|
|
|
|
};
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GPtrArray *gst_mpegts_section_get_pat (GstMpegtsSection *section);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-08-21 06:40:16 +00:00
|
|
|
GType gst_mpegts_pat_program_get_type (void);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-11-20 10:06:03 +00:00
|
|
|
GPtrArray *gst_mpegts_pat_new (void);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsPatProgram *gst_mpegts_pat_program_new (void);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsSection *gst_mpegts_section_from_pat (GPtrArray * programs,
|
2013-11-20 10:06:03 +00:00
|
|
|
guint16 ts_id);
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/* CAT */
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GPtrArray *gst_mpegts_section_get_cat (GstMpegtsSection *section);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
/* PMT */
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef struct _GstMpegtsPMTStream GstMpegtsPMTStream;
|
|
|
|
typedef struct _GstMpegtsPMT GstMpegtsPMT;
|
2013-06-23 06:41:12 +00:00
|
|
|
#define GST_TYPE_MPEGTS_PMT (gst_mpegts_pmt_get_type())
|
|
|
|
#define GST_TYPE_MPEGTS_PMT_STREAM (gst_mpegts_pmt_stream_get_type())
|
|
|
|
|
2013-07-04 05:45:12 +00:00
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsStreamType:
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_RESERVED_00: ITU-T | ISO/IEC Reserved
|
2020-12-14 09:50:02 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1: ISO/IEC 11172-2 Video (i.e. MPEG-1 Video)
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2: Rec. ITU-T H.262 | ISO/IEC 13818-2
|
2020-12-14 09:50:02 +00:00
|
|
|
* Video or ISO/IEC 11172-2 constrained parameter video stream (i.e.
|
|
|
|
* MPEG-2 Video)
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG1: ISO/IEC 11172-3 Audio
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG2: ISO/IEC 13818-3 Audio
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_PRIVATE_SECTIONS: private sections
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_PRIVATE_PES_PACKETS: PES packets containing private data
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_MHEG: ISO/IEC 13522 MHEG
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_DSM_CC: Annex A DSM-CC
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_H_222_1: Rec. ITU-T H.222.1
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_DSMCC_A: ISO/IEC 13818-6 type A
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_DSMCC_B: ISO/IEC 13818-6 type B
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_DSMCC_C: ISO/IEC 13818-6 type C
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_DSMCC_D: ISO/IEC 13818-6 type D
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_AUXILIARY: auxiliary streams
|
2020-12-14 09:50:02 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_ADTS: ISO/IEC 13818-7 Audio (AAC) with ADTS
|
|
|
|
* transport syntax
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4: ISO/IEC 14496-2 Visual (MPEG-4 Video)
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_LATM: ISO/IEC 14496-3 Audio (AAC) with the LATM
|
|
|
|
* transport syntax as defined in ISO/IEC 14496-3
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_PES_PACKETS: ISO/IEC 14496-1
|
2020-12-14 09:50:02 +00:00
|
|
|
* SL-packetized stream or FlexMux stream carried in PES packets
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_SECTIONS: ISO/IEC 14496-1 SL-packetized
|
2020-12-14 09:50:02 +00:00
|
|
|
* stream or FlexMux stream carried in ISO/IEC 14496_sections
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_SYNCHRONIZED_DOWNLOAD: ISO/IEC 13818-6 Synchronized
|
2020-12-14 09:50:02 +00:00
|
|
|
* Download Protocol
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_METADATA_PES_PACKETS: Metadata carried in PES packets
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_METADATA_SECTIONS: Metadata carried in metadata_sections
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_METADATA_DATA_CAROUSEL: Metadata carried in ISO/IEC
|
2020-12-14 09:50:02 +00:00
|
|
|
* 13818-6 Data Carousel
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL: Metadata carried in
|
2020-12-14 09:50:02 +00:00
|
|
|
* ISO/IEC 13818-6 Object Carousel
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD: Metadata carried in
|
2020-12-14 09:50:02 +00:00
|
|
|
* ISO/IEC 13818-6 Synchronized Download Protocol
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_MPEG2_IPMP: IPMP stream (defined in ISO/IEC 13818-11,
|
2020-12-14 09:50:02 +00:00
|
|
|
* MPEG-2 IPMP)
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_H264: AVC video stream conforming to one or
|
2013-07-04 05:45:12 +00:00
|
|
|
* more profiles defined in Annex A of Rec. ITU-T H.264 | ISO/IEC 14496-10 or
|
|
|
|
* AVC video sub-bitstream of SVC as defined in 2.1.78 or MVC base view
|
|
|
|
* sub-bitstream, as defined in 2.1.85, or AVC video sub-bitstream of MVC, as
|
|
|
|
* defined in 2.1.88
|
2020-12-14 09:50:02 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_CLEAN: ISO/IEC 14496-3 (AAC) Audio, without
|
|
|
|
* using any additional transport syntax, such as DST, ALS and SLS
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_MPEG4_TIMED_TEXT: ISO/IEC 14496-17 Text
|
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_RVC: Auxiliary video stream as defined in
|
2013-07-04 05:45:12 +00:00
|
|
|
* ISO/IEC 23002-3
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM: SVC video sub-bitstream
|
2013-07-04 05:45:12 +00:00
|
|
|
* of an AVC video stream conforming to one or more profiles defined in Annex G
|
|
|
|
* of Rec. ITU-T H.264 | ISO/IEC 14496-10
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM: MVC video sub-bitstream
|
2013-07-04 05:45:12 +00:00
|
|
|
* of an AVC video stream conforming to one or more profiles defined in Annex H
|
|
|
|
* of Rec. ITU-T H.264 | ISO/IEC 14496-10
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K: Video stream conforming to one or more
|
2020-12-14 09:50:02 +00:00
|
|
|
* profiles as defined in Rec. ITU-T T.800 | ISO/IEC 15444-1 (i.e. JPEG 2000)
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW: Additional view
|
2013-07-04 05:45:12 +00:00
|
|
|
* Rec. ITU-T H.262 | ISO/IEC 13818-2 video stream for service-compatible
|
|
|
|
* stereoscopic 3D services
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW: Additional view
|
2013-07-04 05:45:12 +00:00
|
|
|
* Rec. ITU-T H.264 | ISO/IEC 14496-10 video stream conforming to one or more
|
|
|
|
* profiles defined in Annex A for service-compatible stereoscopic 3D services
|
2020-12-14 09:50:02 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC: Rec. ITU-T H.265 | ISO/IEC 23008-2 video
|
|
|
|
* stream or an HEVC temporal video sub-bitstream
|
2014-06-25 12:50:05 +00:00
|
|
|
* @GST_MPEGTS_STREAM_TYPE_IPMP_STREAM: IPMP stream
|
2013-07-04 05:45:12 +00:00
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* Type of MPEG-TS stream type.
|
2013-07-04 05:45:12 +00:00
|
|
|
*
|
|
|
|
* These values correspond to the base standard registered types. Depending
|
|
|
|
* on the variant of mpeg-ts being used (Bluray, ATSC, DVB, ...), other
|
|
|
|
* types might also be used, but will not conflict with these.
|
|
|
|
*
|
|
|
|
* Corresponds to table 2-34 of ITU H.222.0 | ISO/IEC 13818-1
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2014-06-25 12:50:05 +00:00
|
|
|
GST_MPEGTS_STREAM_TYPE_RESERVED_00 = 0x00,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1 = 0x01,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2 = 0x02,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG1 = 0x03,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG2 = 0x04,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_PRIVATE_SECTIONS = 0x05,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_PRIVATE_PES_PACKETS = 0x06,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_MHEG = 0x07,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_DSM_CC = 0x08,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_H_222_1 = 0x09,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_DSMCC_A = 0x0a,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_DSMCC_B = 0x0b,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_DSMCC_C = 0x0c,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_DSMCC_D = 0x0d,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_AUXILIARY = 0x0e,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_ADTS = 0x0f,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4 = 0x10,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_LATM = 0x11,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_PES_PACKETS = 0x12,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_SECTIONS = 0x13,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_SYNCHRONIZED_DOWNLOAD = 0x14,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_METADATA_PES_PACKETS = 0x15,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_METADATA_SECTIONS = 0x16,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_METADATA_DATA_CAROUSEL = 0x17,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL = 0x18,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD = 0x19,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_MPEG2_IPMP = 0x1a,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_H264 = 0x1b,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_CLEAN = 0x1c,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_MPEG4_TIMED_TEXT = 0x1d,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_RVC = 0x1e,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM = 0x1f,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM = 0x20,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K = 0x21,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW = 0x22,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW = 0x23,
|
|
|
|
GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC = 0x24,
|
2013-07-04 05:45:12 +00:00
|
|
|
/* 0x24 - 0x7e : Rec. ITU-T H.222.0 | ISO/IEC 13818-1 Reserved */
|
2020-12-14 09:50:02 +00:00
|
|
|
GST_MPEGTS_STREAM_TYPE_IPMP_STREAM = 0x7f,
|
2013-07-04 05:45:12 +00:00
|
|
|
/* 0x80 - 0xff : User Private (or defined in other specs) */
|
2020-12-14 09:50:02 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_MPEGTS_STREAM_TYPE_USER_PRIVATE_EA:
|
|
|
|
*
|
|
|
|
* User Private stream id (used for VC-1) as defined by SMPTE RP227.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
GST_MPEGTS_STREAM_TYPE_USER_PRIVATE_EA = 0xea,
|
2014-06-25 12:50:05 +00:00
|
|
|
} GstMpegtsStreamType;
|
2013-07-04 05:45:12 +00:00
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsPMTStream:
|
|
|
|
* @stream_type: the type of stream. See #GstMpegtsStreamType
|
2013-06-23 06:41:12 +00:00
|
|
|
* @pid: the PID of the stream
|
2014-06-25 12:50:05 +00:00
|
|
|
* @descriptors: (element-type GstMpegtsDescriptor): the descriptors of the
|
2013-06-23 06:41:12 +00:00
|
|
|
* stream
|
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* An individual stream definition of a #GstMpegtsPMT.
|
2013-06-23 06:41:12 +00:00
|
|
|
*/
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsPMTStream
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
guint8 stream_type;
|
|
|
|
guint16 pid;
|
|
|
|
|
2014-06-24 13:41:36 +00:00
|
|
|
GPtrArray *descriptors;
|
2013-06-23 06:41:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsPMT:
|
2020-12-14 09:50:02 +00:00
|
|
|
* @pcr_pid: PID of the stream containing the PCR for this program.
|
|
|
|
* @program_number: The program to which this PMT is applicable.
|
|
|
|
* @descriptors: (element-type GstMpegtsDescriptor): Array of #GstMpegtsDescriptor
|
2014-06-25 12:50:05 +00:00
|
|
|
* @streams: (element-type GstMpegtsPMTStream): Array of #GstMpegtsPMTStream
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* Program Map Table (ISO/IEC 13818-1). Provides the mappings between program
|
|
|
|
* numbers and the program elements that comprise them.
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
|
|
|
* The program_number is contained in the subtable_extension field of the
|
2014-06-25 12:50:05 +00:00
|
|
|
* container #GstMpegtsSection.
|
2013-06-23 06:41:12 +00:00
|
|
|
*/
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsPMT
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
guint16 pcr_pid;
|
2013-11-20 10:04:58 +00:00
|
|
|
guint16 program_number;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2014-06-24 13:41:36 +00:00
|
|
|
GPtrArray *descriptors;
|
2013-06-23 06:41:12 +00:00
|
|
|
GPtrArray *streams;
|
|
|
|
};
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-06-23 06:41:12 +00:00
|
|
|
GType gst_mpegts_pmt_get_type (void);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-06-23 06:41:12 +00:00
|
|
|
GType gst_mpegts_pmt_stream_get_type (void);
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsPMT *gst_mpegts_pmt_new (void);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsPMTStream *gst_mpegts_pmt_stream_new (void);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
const GstMpegtsPMT *gst_mpegts_section_get_pmt (GstMpegtsSection *section);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsSection *gst_mpegts_section_from_pmt (GstMpegtsPMT *pmt, guint16 pid);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
/* TSDT */
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GPtrArray *gst_mpegts_section_get_tsdt (GstMpegtsSection *section);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* generic */
|
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
#define gst_mpegts_section_ref(section) ((GstMpegtsSection*) gst_mini_object_ref (GST_MINI_OBJECT_CAST (section)))
|
2013-06-23 06:41:12 +00:00
|
|
|
#define gst_mpegts_section_unref(section) (gst_mini_object_unref (GST_MINI_OBJECT_CAST (section)))
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMessage *gst_message_new_mpegts_section (GstObject *parent, GstMpegtsSection *section);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
gboolean gst_mpegts_section_send_event (GstMpegtsSection * section, GstElement * element);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsSection *gst_event_parse_mpegts_section (GstEvent * event);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsSection *gst_message_parse_mpegts_section (GstMessage *message);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsSection *gst_mpegts_section_new (guint16 pid,
|
2013-06-23 06:41:12 +00:00
|
|
|
guint8 * data,
|
|
|
|
gsize data_size);
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
guint8 *gst_mpegts_section_packetize (GstMpegtsSection * section, gsize * output_size);
|
2013-10-28 13:44:13 +00:00
|
|
|
|
2014-01-06 15:01:22 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
#endif /* GST_MPEGTS_SECTION_H */
|