2013-06-23 06:41:12 +00:00
|
|
|
/*
|
2018-11-05 15:21:35 +00:00
|
|
|
* gstmpegtsdescriptor.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.
|
|
|
|
*
|
|
|
|
* Some parts of this code come from the Fluendo MPEG Demuxer plugin.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Fluendo, S.L.
|
|
|
|
* Portions created by Fluendo, S.L. are Copyright (C) 2005
|
|
|
|
* Fluendo, S.L. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s): Wim Taymans <wim@fluendo.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_MPEGTS_DESCRIPTOR_H
|
|
|
|
#define GST_MPEGTS_DESCRIPTOR_H
|
|
|
|
|
2023-03-30 09:06:33 +00:00
|
|
|
#include "gst-metadata-descriptor.h"
|
2013-06-23 06:41:12 +00:00
|
|
|
#include <gst/gst.h>
|
2018-03-13 12:47:03 +00:00
|
|
|
#include <gst/mpegts/mpegts-prelude.h>
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2014-01-06 15:01:22 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/*
|
|
|
|
* descriptor_tag TS PS Identification
|
|
|
|
* 0 n/a n/a Reserved
|
|
|
|
* 1 n/a n/a Reserved
|
|
|
|
* 2 X X video_stream_descriptor
|
|
|
|
* 3 X X audio_stream_descriptor
|
|
|
|
* 4 X X hierarchy_descriptor
|
|
|
|
* 5 X X registration_descriptor
|
|
|
|
* 6 X X data_stream_alignment_descriptor
|
|
|
|
* 7 X X target_background_grid_descriptor
|
|
|
|
* 8 X X video_window_descriptor
|
|
|
|
* 9 X X CA_descriptor
|
|
|
|
* 10 X X ISO_639_language_descriptor
|
|
|
|
* 11 X X system_clock_descriptor
|
|
|
|
* 12 X X multiplex_buffer_utilization_descriptor
|
|
|
|
* 13 X X copyright_descriptor
|
|
|
|
* 14 X maximum bitrate descriptor
|
|
|
|
* 15 X X private data indicator descriptor
|
|
|
|
* 16 X X smoothing buffer descriptor
|
|
|
|
* 17 X STD_descriptor
|
|
|
|
* 18 X X IBP descriptor
|
|
|
|
* 19-63 n/a n/a ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved
|
|
|
|
* 64-255 n/a n/a User Private
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsDescriptorType:
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
2014-06-25 12:50:05 +00:00
|
|
|
* The type of #GstMpegtsDescriptor
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
2013-07-04 06:43:37 +00:00
|
|
|
* These values correspond to the registered descriptor type from
|
|
|
|
* the base MPEG-TS specifications (ITU H.222.0 | ISO/IEC 13818-1).
|
|
|
|
*
|
2013-06-23 06:41:12 +00:00
|
|
|
* Consult the relevant specifications for more details.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
/* 0-18 ISO/IEC 13818-1 (H222.0 06/2012) */
|
|
|
|
GST_MTS_DESC_RESERVED_00 = 0x00,
|
|
|
|
GST_MTS_DESC_RESERVED_01 = 0x01,
|
|
|
|
GST_MTS_DESC_VIDEO_STREAM = 0x02,
|
|
|
|
GST_MTS_DESC_AUDIO_STREAM = 0x03,
|
|
|
|
GST_MTS_DESC_HIERARCHY = 0x04,
|
|
|
|
GST_MTS_DESC_REGISTRATION = 0x05,
|
|
|
|
GST_MTS_DESC_DATA_STREAM_ALIGNMENT = 0x06,
|
|
|
|
GST_MTS_DESC_TARGET_BACKGROUND_GRID = 0x07,
|
|
|
|
GST_MTS_DESC_VIDEO_WINDOW = 0x08,
|
|
|
|
GST_MTS_DESC_CA = 0x09,
|
|
|
|
GST_MTS_DESC_ISO_639_LANGUAGE = 0x0A,
|
|
|
|
GST_MTS_DESC_SYSTEM_CLOCK = 0x0B,
|
|
|
|
GST_MTS_DESC_MULTIPLEX_BUFFER_UTILISATION = 0x0C,
|
|
|
|
GST_MTS_DESC_COPYRIGHT = 0x0D,
|
|
|
|
GST_MTS_DESC_MAXIMUM_BITRATE = 0x0E,
|
|
|
|
GST_MTS_DESC_PRIVATE_DATA_INDICATOR = 0x0F,
|
|
|
|
GST_MTS_DESC_SMOOTHING_BUFFER = 0x10,
|
|
|
|
GST_MTS_DESC_STD = 0x11,
|
|
|
|
GST_MTS_DESC_IBP = 0x12,
|
|
|
|
|
|
|
|
/* 19-26 Defined in ISO/IEC 13818-6 (Extensions for DSM-CC) */
|
|
|
|
GST_MTS_DESC_DSMCC_CAROUSEL_IDENTIFIER = 0x13,
|
|
|
|
GST_MTS_DESC_DSMCC_ASSOCIATION_TAG = 0x14,
|
|
|
|
GST_MTS_DESC_DSMCC_DEFERRED_ASSOCIATION_TAG = 0x15,
|
|
|
|
/* 0x16 is reserved (so far) */
|
|
|
|
GST_MTS_DESC_DSMCC_NPT_REFERENCE = 0x17,
|
|
|
|
GST_MTS_DESC_DSMCC_NPT_ENDPOINT = 0x18,
|
|
|
|
GST_MTS_DESC_DSMCC_STREAM_MODE = 0x19,
|
|
|
|
GST_MTS_DESC_DSMCC_STREAM_EVENT = 0x1A,
|
|
|
|
|
|
|
|
/* 27-54 Later additions to ISO/IEC 13818-1 (H222.0 06/2012) */
|
|
|
|
GST_MTS_DESC_MPEG4_VIDEO = 0x1B,
|
|
|
|
GST_MTS_DESC_MPEG4_AUDIO = 0x1C,
|
|
|
|
GST_MTS_DESC_IOD = 0x1D,
|
|
|
|
GST_MTS_DESC_SL = 0x1E,
|
|
|
|
GST_MTS_DESC_FMC = 0x1F,
|
|
|
|
GST_MTS_DESC_EXTERNAL_ES_ID = 0x20,
|
|
|
|
GST_MTS_DESC_MUX_CODE = 0x21,
|
|
|
|
GST_MTS_DESC_FMX_BUFFER_SIZE = 0x22,
|
|
|
|
GST_MTS_DESC_MULTIPLEX_BUFFER = 0x23,
|
|
|
|
GST_MTS_DESC_CONTENT_LABELING = 0x24,
|
|
|
|
GST_MTS_DESC_METADATA_POINTER = 0x25,
|
|
|
|
GST_MTS_DESC_METADATA = 0x26,
|
|
|
|
GST_MTS_DESC_METADATA_STD = 0x27,
|
|
|
|
GST_MTS_DESC_AVC_VIDEO = 0x28,
|
|
|
|
/* defined in ISO/IEC 13818-11, MPEG-2 IPMP */
|
|
|
|
GST_MTS_DESC_IPMP = 0x29,
|
|
|
|
GST_MTS_DESC_AVC_TIMING_AND_HRD = 0x2A,
|
|
|
|
GST_MTS_DESC_MPEG2_AAC_AUDIO = 0x2B,
|
|
|
|
GST_MTS_DESC_FLEX_MUX_TIMING = 0x2C,
|
|
|
|
GST_MTS_DESC_MPEG4_TEXT = 0x2D,
|
|
|
|
GST_MTS_DESC_MPEG4_AUDIO_EXTENSION = 0x2E,
|
|
|
|
GST_MTS_DESC_AUXILIARY_VIDEO_STREAM = 0x2F,
|
|
|
|
GST_MTS_DESC_SVC_EXTENSION = 0x30,
|
|
|
|
GST_MTS_DESC_MVC_EXTENSION = 0x31,
|
|
|
|
GST_MTS_DESC_J2K_VIDEO = 0x32,
|
|
|
|
GST_MTS_DESC_MVC_OPERATION_POINT = 0x33,
|
|
|
|
GST_MTS_DESC_MPEG2_STEREOSCOPIC_VIDEO_FORMAT = 0x34,
|
|
|
|
GST_MTS_DESC_STEREOSCOPIC_PROGRAM_INFO = 0x35,
|
|
|
|
GST_MTS_DESC_STEREOSCOPIC_VIDEO_INFO = 0x36,
|
|
|
|
|
|
|
|
/* 55-63 ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved */
|
2014-06-25 12:50:05 +00:00
|
|
|
} GstMpegtsDescriptorType;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2013-07-04 06:43:37 +00:00
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsMiscDescriptorType:
|
2013-07-04 06:43:37 +00:00
|
|
|
*
|
2014-06-25 12:50:05 +00:00
|
|
|
* The type of #GstMpegtsDescriptor
|
2013-07-04 06:43:37 +00:00
|
|
|
*
|
|
|
|
* These values correspond to miscellaneous descriptor types that are
|
|
|
|
* not yet identified from known specifications.
|
|
|
|
*/
|
2013-07-03 11:56:22 +00:00
|
|
|
typedef enum {
|
2013-06-23 06:41:12 +00:00
|
|
|
/* 0x80 - 0xFE are user defined */
|
2020-12-14 09:50:02 +00:00
|
|
|
GST_MTS_DESC_DTG_LOGICAL_CHANNEL = 0x83, /* from DTG D-Book, only present in NIT */
|
2014-06-25 12:50:05 +00:00
|
|
|
} GstMpegtsMiscDescriptorType;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2013-07-04 06:43:37 +00:00
|
|
|
/**
|
2020-12-14 09:50:02 +00:00
|
|
|
* GstMpegtsSCTEDescriptorType:
|
2013-07-04 06:43:37 +00:00
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* These values correspond to the ones defined by SCTE (amongst other in ANSI/SCTE 57)
|
2013-07-04 06:43:37 +00:00
|
|
|
*
|
2020-12-14 09:50:02 +00:00
|
|
|
* Since: 1.20
|
2013-07-04 06:43:37 +00:00
|
|
|
*/
|
2013-07-03 11:56:22 +00:00
|
|
|
typedef enum {
|
2020-12-14 09:50:02 +00:00
|
|
|
GST_MTS_DESC_SCTE_STUFFING = 0x80,
|
|
|
|
GST_MTS_DESC_SCTE_AC3 = 0x81,
|
|
|
|
GST_MTS_DESC_SCTE_FRAME_RATE = 0x82,
|
|
|
|
GST_MTS_DESC_SCTE_EXTENDED_VIDEO = 0x83,
|
|
|
|
GST_MTS_DESC_SCTE_COMPONENT_NAME = 0x84,
|
|
|
|
GST_MTS_DESC_SCTE_FREQUENCY_SPEC = 0x90,
|
|
|
|
GST_MTS_DESC_SCTE_MODULATION_PARAMS = 0x91,
|
|
|
|
GST_MTS_DESC_SCTE_TRANSPORT_STREAM_ID = 0x92
|
|
|
|
} GstMpegtsSCTEDescriptorType;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef struct _GstMpegtsDescriptor GstMpegtsDescriptor;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
#define GST_TYPE_MPEGTS_DESCRIPTOR (gst_mpegts_descriptor_get_type())
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-06-23 06:41:12 +00:00
|
|
|
GType gst_mpegts_descriptor_get_type (void);
|
|
|
|
|
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsDescriptor:
|
2013-08-21 06:40:16 +00:00
|
|
|
* @tag: the type of descriptor
|
|
|
|
* @tag_extension: the extended type (if @descriptor_tag is 0x7f)
|
|
|
|
* @length: the length of the descriptor content (excluding tag/length field)
|
|
|
|
* @data: the full descriptor data (including tag, extension, length). The first
|
2016-11-09 08:10:21 +00:00
|
|
|
* two bytes are the @tag and @length.
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
|
|
|
* Mpeg-TS descriptor (ISO/IEC 13818-1).
|
|
|
|
*/
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsDescriptor
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
2013-08-21 06:40:16 +00:00
|
|
|
guint8 tag;
|
|
|
|
guint8 tag_extension;
|
|
|
|
guint8 length;
|
2013-10-28 13:39:49 +00:00
|
|
|
guint8 *data;
|
2014-07-09 05:38:38 +00:00
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
/* 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-07-01 08:03:05 +00:00
|
|
|
void gst_mpegts_descriptor_free (GstMpegtsDescriptor *desc);
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-08-21 06:40:16 +00:00
|
|
|
GPtrArray *gst_mpegts_parse_descriptors (guint8 * buffer, gsize buf_len);
|
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
|
|
|
const GstMpegtsDescriptor * gst_mpegts_find_descriptor (GPtrArray *descriptors,
|
2013-06-23 06:41:12 +00:00
|
|
|
guint8 tag);
|
|
|
|
|
2020-09-04 15:28:58 +00:00
|
|
|
GST_MPEGTS_API
|
|
|
|
const GstMpegtsDescriptor * gst_mpegts_find_descriptor_with_extension (GPtrArray *descriptors,
|
|
|
|
guint8 tag, guint8 tag_extension);
|
2020-12-14 09:50:02 +00:00
|
|
|
/**
|
|
|
|
* GstMpegtsRegistrationId:
|
|
|
|
* @GST_MTS_REGISTRATION_0: Undefined registration id
|
|
|
|
* @GST_MTS_REGISTRATION_AC_3: Audio AC-3, ATSC A/52
|
|
|
|
* @GST_MTS_REGISTRATION_AC_4: Audio AC-4, ETSI 103 190-2
|
|
|
|
* @GST_MTS_REGISTRATION_CUEI: SCTE 35, "Digital Program Insertion Cueing Message"
|
|
|
|
* @GST_MTS_REGISTRATION_drac: Dirac Video codec
|
|
|
|
* @GST_MTS_REGISTRATION_DTS1: DTS Audio
|
|
|
|
* @GST_MTS_REGISTRATION_DTS2: DTS Audio
|
|
|
|
* @GST_MTS_REGISTRATION_DTS3: DTS Audio
|
|
|
|
* @GST_MTS_REGISTRATION_EAC3: Enhanced AC-3 (i.e. EAC3)
|
|
|
|
* @GST_MTS_REGISTRATION_ETV1: Cablelabs ETV
|
|
|
|
* @GST_MTS_REGISTRATION_BSSD: SMPTE 302M, Mapping of AES3 Data in mpeg-ts
|
|
|
|
* @GST_MTS_REGISTRATION_GA94: ATSC A/53 compliant stream (i.e. ATSC)
|
|
|
|
* @GST_MTS_REGISTRATION_HDMV: Blu-ray, "System Description Blu-ray Disc
|
|
|
|
* Read-Only Format part 3 Audio Visual Basic Specifications"
|
|
|
|
* @GST_MTS_REGISTRATION_KLVA: SMPTE RP217 : Non-synchronized Mapping of KLV
|
|
|
|
* Packets in mpeg-ts
|
|
|
|
* @GST_MTS_REGISTRATION_OPUS: Opus Audio
|
|
|
|
* @GST_MTS_REGISTRATION_TSHV: HDV (Sony)
|
|
|
|
* @GST_MTS_REGISTRATION_VC_1: Video VC-1, SMPTE RP227 "VC-1 Bitstream Transport Encodings"
|
|
|
|
* @GST_MTS_REGISTRATION_OTHER_HEVC: HEVC / h265
|
|
|
|
*
|
|
|
|
* Well-known registration ids, expressed as native-endian 32bit integers. These
|
|
|
|
* are used in descriptors of type %GST_MTS_DESC_REGISTRATION. Unless specified
|
|
|
|
* otherwise (by use of the "OTHER" prefix), they are all registered by the
|
|
|
|
* [SMPTE Registration Authority](https://smpte-ra.org/) or specified in
|
|
|
|
* "official" documentation for the given format.
|
|
|
|
*
|
|
|
|
* Since: 1.20
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* REG_TO_UINT32: (skip) (attributes doc.skip=true)
|
|
|
|
*/
|
|
|
|
#define REG_TO_UINT32(a,b,c,d)((a) << 24 | (b) << 16 | (c) << 8 | (d))
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_MTS_REGISTRATION_0 = 0,
|
|
|
|
|
|
|
|
/* SMPTE-RA registered */
|
|
|
|
GST_MTS_REGISTRATION_AC_3 = REG_TO_UINT32 ('A', 'C', '-', '3'),
|
|
|
|
GST_MTS_REGISTRATION_CUEI = REG_TO_UINT32 ('C', 'U', 'E', 'I'),
|
|
|
|
GST_MTS_REGISTRATION_drac = REG_TO_UINT32 ('d', 'r', 'a', 'c'),
|
|
|
|
GST_MTS_REGISTRATION_DTS1 = REG_TO_UINT32 ('D', 'T', 'S', '1'),
|
|
|
|
GST_MTS_REGISTRATION_DTS2 = REG_TO_UINT32 ('D', 'T', 'S', '2'),
|
|
|
|
GST_MTS_REGISTRATION_DTS3 = REG_TO_UINT32 ('D', 'T', 'S', '3'),
|
|
|
|
GST_MTS_REGISTRATION_BSSD = REG_TO_UINT32 ('B', 'S', 'S', 'D'),
|
|
|
|
GST_MTS_REGISTRATION_EAC3 = REG_TO_UINT32 ('E', 'A', 'C', '3'),
|
|
|
|
GST_MTS_REGISTRATION_ETV1 = REG_TO_UINT32 ('E', 'T', 'V', '1'),
|
|
|
|
GST_MTS_REGISTRATION_GA94 = REG_TO_UINT32 ('G', 'A', '9', '4'),
|
|
|
|
GST_MTS_REGISTRATION_HDMV = REG_TO_UINT32 ('H', 'D', 'M', 'V'),
|
|
|
|
GST_MTS_REGISTRATION_KLVA = REG_TO_UINT32 ('K', 'L', 'V', 'A'),
|
|
|
|
GST_MTS_REGISTRATION_OPUS = REG_TO_UINT32 ('O', 'P', 'U', 'S'),
|
|
|
|
GST_MTS_REGISTRATION_TSHV = REG_TO_UINT32 ('T', 'S', 'H', 'V'),
|
|
|
|
GST_MTS_REGISTRATION_VC_1 = REG_TO_UINT32 ('V', 'C', '-', '1'),
|
|
|
|
|
|
|
|
/* Self-registered by formats, but not in SMPTE-RA registry */
|
|
|
|
GST_MTS_REGISTRATION_AC_4 = REG_TO_UINT32 ('A', 'C', '-', '4'),
|
|
|
|
|
|
|
|
/* Found elsewhere */
|
|
|
|
GST_MTS_REGISTRATION_OTHER_HEVC = REG_TO_UINT32 ('H', 'E', 'V', 'C')
|
|
|
|
} GstMpegtsRegistrationId;
|
2020-09-04 15:28:58 +00:00
|
|
|
|
2013-11-19 10:30:33 +00:00
|
|
|
/* GST_MTS_DESC_REGISTRATION (0x05) */
|
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsDescriptor *gst_mpegts_descriptor_from_registration (
|
2013-11-19 10:30:33 +00:00
|
|
|
const gchar *format_identifier,
|
|
|
|
guint8 *additional_info, gsize additional_info_length);
|
|
|
|
|
2020-12-14 09:50:02 +00:00
|
|
|
GST_MPEGTS_API
|
|
|
|
gboolean gst_mpegts_descriptor_parse_registration(GstMpegtsDescriptor *descriptor,
|
|
|
|
guint32 *registration_id,
|
|
|
|
guint8 **additional_info,
|
|
|
|
gsize *additional_info_length);
|
|
|
|
|
2014-07-10 09:24:12 +00:00
|
|
|
/* GST_MTS_DESC_CA (0x09) */
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-07-10 09:24:12 +00:00
|
|
|
gboolean gst_mpegts_descriptor_parse_ca (GstMpegtsDescriptor *descriptor,
|
|
|
|
guint16 *ca_system_id,
|
|
|
|
guint16 *ca_pid,
|
|
|
|
const guint8 **private_data,
|
|
|
|
gsize *private_data_size);
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/* GST_MTS_DESC_ISO_639_LANGUAGE (0x0A) */
|
|
|
|
/**
|
2014-06-25 12:50:05 +00:00
|
|
|
* GstMpegtsISO639AudioType:
|
2013-06-23 06:41:12 +00:00
|
|
|
*
|
|
|
|
* Type of audio streams
|
|
|
|
*
|
|
|
|
* Defined in ITU H.222.0 Table 2-60
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_MPEGTS_AUDIO_TYPE_UNDEFINED = 0,
|
|
|
|
GST_MPEGTS_AUDIO_TYPE_CLEAN_EFFECTS,
|
|
|
|
GST_MPEGTS_AUDIO_TYPE_HEARING_IMPAIRED,
|
|
|
|
GST_MPEGTS_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY
|
2014-06-25 12:50:05 +00:00
|
|
|
} GstMpegtsIso639AudioType;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef struct _GstMpegtsISO639LanguageDescriptor GstMpegtsISO639LanguageDescriptor;
|
|
|
|
struct _GstMpegtsISO639LanguageDescriptor
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
guint nb_language;
|
2014-06-01 08:44:23 +00:00
|
|
|
gchar *language[64];
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsIso639AudioType audio_type[64];
|
2013-06-23 06:41:12 +00:00
|
|
|
};
|
|
|
|
|
2014-06-01 08:44:23 +00:00
|
|
|
#define GST_TYPE_MPEGTS_ISO_639_LANGUAGE (gst_mpegts_iso_639_language_get_type ())
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2014-06-01 08:44:23 +00:00
|
|
|
GType gst_mpegts_iso_639_language_get_type (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
|
|
|
void gst_mpegts_iso_639_language_descriptor_free (GstMpegtsISO639LanguageDescriptor * desc);
|
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_descriptor_parse_iso_639_language (const GstMpegtsDescriptor *descriptor,
|
|
|
|
GstMpegtsISO639LanguageDescriptor **res);
|
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_descriptor_parse_iso_639_language_idx (const GstMpegtsDescriptor *descriptor,
|
2014-06-01 08:44:23 +00:00
|
|
|
guint idx, gchar **lang,
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsIso639AudioType *audio_type);
|
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
|
|
|
guint gst_mpegts_descriptor_parse_iso_639_language_nb (const GstMpegtsDescriptor *descriptor);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2016-04-19 13:27:43 +00:00
|
|
|
GstMpegtsDescriptor * gst_mpegts_descriptor_from_iso_639_language (const gchar * language);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2023-03-30 09:06:33 +00:00
|
|
|
GST_MPEGTS_API
|
|
|
|
gboolean gst_mpegts_descriptor_parse_metadata (const GstMpegtsDescriptor *descriptor, GstMpegtsMetadataDescriptor **res);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2023-03-30 09:06:33 +00:00
|
|
|
GST_MPEGTS_API
|
|
|
|
gboolean gst_mpegts_descriptor_parse_metadata_std (const GstMpegtsDescriptor *descriptor,
|
|
|
|
guint32 *metadata_input_leak_rate,
|
|
|
|
guint32 *metadata_buffer_size,
|
|
|
|
guint32 *metadata_output_leak_rate);
|
2013-06-23 06:41:12 +00:00
|
|
|
|
|
|
|
/* GST_MTS_DESC_DTG_LOGICAL_CHANNEL (0x83) */
|
2014-06-25 12:50:05 +00:00
|
|
|
typedef struct _GstMpegtsLogicalChannelDescriptor GstMpegtsLogicalChannelDescriptor;
|
|
|
|
typedef struct _GstMpegtsLogicalChannel GstMpegtsLogicalChannel;
|
2013-06-23 06:41:12 +00:00
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsLogicalChannel
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
guint16 service_id;
|
|
|
|
gboolean visible_service;
|
|
|
|
guint16 logical_channel_number;
|
|
|
|
};
|
|
|
|
|
2014-06-25 12:50:05 +00:00
|
|
|
struct _GstMpegtsLogicalChannelDescriptor
|
2013-06-23 06:41:12 +00:00
|
|
|
{
|
|
|
|
guint nb_channels;
|
2014-06-25 12:50:05 +00:00
|
|
|
GstMpegtsLogicalChannel channels[64];
|
2013-06-23 06:41:12 +00:00
|
|
|
};
|
|
|
|
|
2018-11-08 08:15:41 +00:00
|
|
|
#define GST_TYPE_MPEGTS_LOGICAL_CHANNEL_DESCRIPTOR (gst_mpegts_logical_channel_descriptor_get_type())
|
|
|
|
|
|
|
|
GST_MPEGTS_API
|
|
|
|
GType gst_mpegts_logical_channel_descriptor_get_type(void);
|
|
|
|
|
|
|
|
#define GST_TYPE_MPEGTS_LOGICAL_CHANNEL (gst_mpegts_logical_channel_get_type())
|
|
|
|
|
|
|
|
GST_MPEGTS_API
|
|
|
|
GType gst_mpegts_logical_channel_get_type(void);
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
/* FIXME : Maybe make two methods. One for getting the number of channels,
|
|
|
|
* and the other for getting the content for one channel ? */
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2013-06-23 06:41:12 +00:00
|
|
|
gboolean
|
2014-06-25 12:50:05 +00:00
|
|
|
gst_mpegts_descriptor_parse_logical_channel (const GstMpegtsDescriptor *descriptor,
|
|
|
|
GstMpegtsLogicalChannelDescriptor *res);
|
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
|
|
|
GstMpegtsDescriptor *
|
2013-11-19 10:30:33 +00:00
|
|
|
gst_mpegts_descriptor_from_custom (guint8 tag, const guint8 *data, gsize length);
|
2017-07-18 00:10:56 +00:00
|
|
|
|
2020-09-04 15:28:58 +00:00
|
|
|
|
2018-03-13 12:47:03 +00:00
|
|
|
GST_MPEGTS_API
|
2015-10-25 16:09:24 +00:00
|
|
|
GstMpegtsDescriptor *
|
|
|
|
gst_mpegts_descriptor_from_custom_with_extension (guint8 tag, guint8 tag_extension, const guint8 *data, gsize length);
|
2013-11-19 10:30:33 +00:00
|
|
|
|
2014-01-06 15:01:22 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2013-06-23 06:41:12 +00:00
|
|
|
#endif /* GST_MPEGTS_DESCRIPTOR_H */
|