![]() |
![]() |
![]() |
GStreamer Bad Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <gst/mpegts/mpegts.h> struct GstMpegtsDescriptor; enum GstMpegtsDescriptorType; enum GstMpegtsMiscDescriptorType; const GstMpegtsDescriptor * gst_mpegts_find_descriptor (GPtrArray *descriptors
,guint8 tag
); GPtrArray * gst_mpegts_parse_descriptors (guint8 *buffer
,gsize buf_len
); GstMpegtsDescriptor * gst_mpegts_descriptor_from_custom (guint8 tag
,const guint8 *data
,gsize length
); GstMpegtsDescriptor * gst_mpegts_descriptor_from_registration (const gchar *format_identifier
,guint8 *additional_info
,gsize additional_info_length
); struct GstMpegtsISO639LanguageDescriptor; enum GstMpegtsIso639AudioType; gboolean gst_mpegts_descriptor_parse_iso_639_language (const GstMpegtsDescriptor *descriptor
,GstMpegtsISO639LanguageDescriptor **res
); gboolean gst_mpegts_descriptor_parse_iso_639_language_idx (const GstMpegtsDescriptor *descriptor
,guint idx
,gchar **lang
,GstMpegtsIso639AudioType *audio_type
); guint gst_mpegts_descriptor_parse_iso_639_language_nb (const GstMpegtsDescriptor *descriptor
); void gst_mpegts_iso_639_language_descriptor_free (GstMpegtsISO639LanguageDescriptor *desc
); struct GstMpegtsLogicalChannel; struct GstMpegtsLogicalChannelDescriptor; gboolean gst_mpegts_descriptor_parse_logical_channel (const GstMpegtsDescriptor *descriptor
,GstMpegtsLogicalChannelDescriptor *res
);
GBoxed +----GstMpegtsDescriptor
GEnum +----GstMpegtsDescriptorType
GEnum +----GstMpegtsIso639AudioType
These are the base descriptor types and methods.
For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications and other specifications mentionned in the documentation.
struct GstMpegtsDescriptor { guint8 tag; guint8 tag_extension; guint8 length; guint8 *data; };
Mpeg-TS descriptor (ISO/IEC 13818-1).
the type of descriptor | |
the extended type (if descriptor_tag is 0x7f) |
|
the length of the descriptor content (excluding tag/length field) | |
the full descriptor data (including tag, extension, length). The first
two bytes are the tag and tag_extension . |
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 */ } GstMpegtsDescriptorType;
The type of GstMpegtsDescriptor
These values correspond to the registered descriptor type from the base MPEG-TS specifications (ITU H.222.0 | ISO/IEC 13818-1).
Consult the relevant specifications for more details.
typedef enum { /* 0x80 - 0xFE are user defined */ GST_MTS_DESC_AC3_AUDIO_STREAM = 0x81, GST_MTS_DESC_DTG_LOGICAL_CHANNEL = 0x83, /* from DTG D-Book */ } GstMpegtsMiscDescriptorType;
The type of GstMpegtsDescriptor
These values correspond to miscellaneous descriptor types that are not yet identified from known specifications.
const GstMpegtsDescriptor * gst_mpegts_find_descriptor (GPtrArray *descriptors
,guint8 tag
);
Finds the first descriptor of type tag
in the array.
Note: To look for descriptors that can be present more than once in an array of descriptors, iterate the GArray manually.
|
an array of GstMpegtsDescriptor. [element-type GstMpegtsDescriptor][transfer none] |
|
the tag to look for |
Returns : |
the first descriptor matchin tag , else NULL . [transfer none]
|
GPtrArray * gst_mpegts_parse_descriptors (guint8 *buffer
,gsize buf_len
);
Parses the descriptors present in buffer
and returns them as an
array.
Note: The data provided in buffer
will not be copied.
|
descriptors to parse. [transfer none] |
|
Size of buffer
|
Returns : |
an
array of the parsed descriptors or NULL if there was an error.
Release with g_array_unref when done with it. [transfer full][element-type GstMpegtsDescriptor]
|
GstMpegtsDescriptor * gst_mpegts_descriptor_from_custom (guint8 tag
,const guint8 *data
,gsize length
);
Creates a GstMpegtsDescriptor with custom tag
and data
|
descriptor tag |
|
descriptor data (after tag and length field). [transfer none] |
|
length of data
|
Returns : |
GstMpegtsDescriptor |
GstMpegtsDescriptor * gst_mpegts_descriptor_from_registration (const gchar *format_identifier
,guint8 *additional_info
,gsize additional_info_length
);
Creates a GST_MTS_DESC_REGISTRATION
GstMpegtsDescriptor
Return: GstMpegtsDescriptor, NULL
on failure
|
a 4 character format identifier string. [transfer none] |
|
pointer to optional additional info. [transfer none][allow-none] |
|
length of the optional additional_info
|
struct GstMpegtsISO639LanguageDescriptor { guint nb_language; gchar *language[64]; GstMpegtsIso639AudioType audio_type[64]; };
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 } GstMpegtsIso639AudioType;
gboolean gst_mpegts_descriptor_parse_iso_639_language (const GstMpegtsDescriptor *descriptor
,GstMpegtsISO639LanguageDescriptor **res
);
Extracts the iso 639-2 language information from descriptor
.
Note: Use gst_tag_get_language_code if you want to get the the ISO 639-1 language code from the returned ISO 639-2 one.
|
a GST_MTS_DESC_ISO_639_LANGUAGE GstMpegtsDescriptor
|
|
the GstMpegtsISO639LanguageDescriptor to fill. [out][transfer full] |
Returns : |
TRUE if parsing succeeded, else FALSE . |
gboolean gst_mpegts_descriptor_parse_iso_639_language_idx (const GstMpegtsDescriptor *descriptor
,guint idx
,gchar **lang
,GstMpegtsIso639AudioType *audio_type
);
Extracts the iso 639-2 language information from specific table id in descriptor
.
Note: Use gst_tag_get_language_code if you want to get the the ISO 639-1 language code from the returned ISO 639-2 one.
|
a GST_MTS_DESC_ISO_639_LANGUAGE GstMpegtsDescriptor
|
|
Table id of the language to parse |
|
4-byte gchar array to hold the language code. [out][transfer full] |
|
the GstMpegtsIso639AudioType to set. [out][transfer none][allow-none] |
Returns : |
TRUE if parsing succeeded, else FALSE . |
guint gst_mpegts_descriptor_parse_iso_639_language_nb
(const GstMpegtsDescriptor *descriptor
);
|
a GST_MTS_DESC_ISO_639_LANGUAGE GstMpegtsDescriptor
|
Returns : |
The number of languages in descriptor
|
void gst_mpegts_iso_639_language_descriptor_free
(GstMpegtsISO639LanguageDescriptor *desc
);
struct GstMpegtsLogicalChannel { guint16 service_id; gboolean visible_service; guint16 logical_channel_number; };
struct GstMpegtsLogicalChannelDescriptor { guint nb_channels; GstMpegtsLogicalChannel channels[64]; };
gboolean gst_mpegts_descriptor_parse_logical_channel (const GstMpegtsDescriptor *descriptor
,GstMpegtsLogicalChannelDescriptor *res
);
Extracts the logical channels from descriptor
.
|
a GST_MTS_DESC_DTG_LOGICAL_CHANNEL GstMpegtsDescriptor
|
|
the GstMpegtsLogicalChannelDescriptor to fill. [out][transfer none] |
Returns : |
TRUE if parsing succeeded, else FALSE . |