2006-04-25 16:38:50 +00:00
|
|
|
/* GStreamer Matroska muxer/demuxer
|
|
|
|
* (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
|
|
* (C) 2006 Tim-Philipp Müller <tim centricular net>
|
|
|
|
*
|
|
|
|
* matroska-ids.c: matroska track context utility functions
|
|
|
|
*
|
|
|
|
* 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
|
2012-11-04 00:07:18 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2006-04-25 16:38:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "matroska-ids.h"
|
|
|
|
|
2012-09-27 23:43:38 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2006-04-25 16:38:50 +00:00
|
|
|
gboolean
|
|
|
|
gst_matroska_track_init_video_context (GstMatroskaTrackContext ** p_context)
|
|
|
|
{
|
|
|
|
GstMatroskaTrackVideoContext *video_context;
|
|
|
|
|
|
|
|
g_assert (p_context != NULL && *p_context != NULL);
|
|
|
|
|
|
|
|
/* already set up? (track info might come before track type) */
|
|
|
|
if ((*p_context)->type == GST_MATROSKA_TRACK_TYPE_VIDEO) {
|
|
|
|
GST_LOG ("video context already set up");
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* it better not have been set up as some other track type ... */
|
|
|
|
if ((*p_context)->type != 0) {
|
|
|
|
g_return_val_if_reached (FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
video_context = g_renew (GstMatroskaTrackVideoContext, *p_context, 1);
|
|
|
|
*p_context = (GstMatroskaTrackContext *) video_context;
|
|
|
|
|
|
|
|
/* defaults */
|
|
|
|
(*p_context)->type = GST_MATROSKA_TRACK_TYPE_VIDEO;
|
|
|
|
video_context->display_width = 0;
|
|
|
|
video_context->display_height = 0;
|
|
|
|
video_context->pixel_width = 0;
|
|
|
|
video_context->pixel_height = 0;
|
|
|
|
video_context->asr_mode = 0;
|
|
|
|
video_context->fourcc = 0;
|
2006-12-11 13:59:33 +00:00
|
|
|
video_context->default_fps = 0.0;
|
2018-10-23 11:04:34 +00:00
|
|
|
video_context->interlace_mode = GST_MATROSKA_INTERLACE_MODE_UNKNOWN;
|
2019-08-07 14:01:34 +00:00
|
|
|
video_context->field_order = GST_VIDEO_FIELD_ORDER_UNKNOWN;
|
2018-10-23 11:04:34 +00:00
|
|
|
video_context->earliest_time = GST_CLOCK_TIME_NONE;
|
|
|
|
video_context->dirac_unit = NULL;
|
2010-05-23 07:32:08 +00:00
|
|
|
video_context->earliest_time = GST_CLOCK_TIME_NONE;
|
2015-06-10 14:22:54 +00:00
|
|
|
video_context->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
|
|
|
|
video_context->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
|
2021-04-23 18:37:46 +00:00
|
|
|
video_context->alpha_mode = FALSE;
|
2017-11-07 09:03:53 +00:00
|
|
|
video_context->colorimetry.range = GST_VIDEO_COLOR_RANGE_UNKNOWN;
|
|
|
|
video_context->colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_UNKNOWN;
|
|
|
|
video_context->colorimetry.transfer = GST_VIDEO_TRANSFER_UNKNOWN;
|
|
|
|
video_context->colorimetry.primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
|
2019-02-18 14:28:50 +00:00
|
|
|
gst_video_mastering_display_info_init
|
|
|
|
(&video_context->mastering_display_info);
|
2019-06-16 01:07:31 +00:00
|
|
|
video_context->mastering_display_info_present = FALSE;
|
2019-02-18 14:28:50 +00:00
|
|
|
gst_video_content_light_level_init (&video_context->content_light_level);
|
2015-06-10 14:22:54 +00:00
|
|
|
|
2006-04-25 16:38:50 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gst_matroska_track_init_audio_context (GstMatroskaTrackContext ** p_context)
|
|
|
|
{
|
|
|
|
GstMatroskaTrackAudioContext *audio_context;
|
|
|
|
|
|
|
|
g_assert (p_context != NULL && *p_context != NULL);
|
|
|
|
|
|
|
|
/* already set up? (track info might come before track type) */
|
|
|
|
if ((*p_context)->type == GST_MATROSKA_TRACK_TYPE_AUDIO)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* it better not have been set up as some other track type ... */
|
|
|
|
if ((*p_context)->type != 0) {
|
|
|
|
g_return_val_if_reached (FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
audio_context = g_renew (GstMatroskaTrackAudioContext, *p_context, 1);
|
|
|
|
*p_context = (GstMatroskaTrackContext *) audio_context;
|
|
|
|
|
|
|
|
/* defaults */
|
|
|
|
(*p_context)->type = GST_MATROSKA_TRACK_TYPE_AUDIO;
|
|
|
|
audio_context->channels = 1;
|
|
|
|
audio_context->samplerate = 8000;
|
2018-10-23 11:04:34 +00:00
|
|
|
audio_context->bitdepth = 16;
|
|
|
|
audio_context->wvpk_block_index = 0;
|
2006-04-25 16:38:50 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gst_matroska_track_init_subtitle_context (GstMatroskaTrackContext ** p_context)
|
|
|
|
{
|
|
|
|
GstMatroskaTrackSubtitleContext *subtitle_context;
|
|
|
|
|
|
|
|
g_assert (p_context != NULL && *p_context != NULL);
|
|
|
|
|
|
|
|
/* already set up? (track info might come before track type) */
|
|
|
|
if ((*p_context)->type == GST_MATROSKA_TRACK_TYPE_SUBTITLE)
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* it better not have been set up as some other track type ... */
|
|
|
|
if ((*p_context)->type != 0) {
|
|
|
|
g_return_val_if_reached (FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
subtitle_context = g_renew (GstMatroskaTrackSubtitleContext, *p_context, 1);
|
|
|
|
*p_context = (GstMatroskaTrackContext *) subtitle_context;
|
|
|
|
|
|
|
|
(*p_context)->type = GST_MATROSKA_TRACK_TYPE_SUBTITLE;
|
2018-10-23 11:04:34 +00:00
|
|
|
subtitle_context->check_utf8 = TRUE;
|
2006-06-22 16:27:03 +00:00
|
|
|
subtitle_context->invalid_utf8 = FALSE;
|
2018-10-23 11:04:34 +00:00
|
|
|
subtitle_context->check_markup = TRUE;
|
2011-11-26 16:06:59 +00:00
|
|
|
subtitle_context->seen_markup_tag = FALSE;
|
2006-04-25 16:38:50 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2008-06-16 10:59:39 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
gst_matroska_register_tags (void)
|
|
|
|
{
|
|
|
|
/* TODO: register other custom tags */
|
|
|
|
}
|
2012-09-27 23:43:38 +00:00
|
|
|
|
|
|
|
GstBufferList *
|
|
|
|
gst_matroska_parse_xiph_stream_headers (gpointer codec_data,
|
|
|
|
gsize codec_data_size)
|
|
|
|
{
|
|
|
|
GstBufferList *list = NULL;
|
|
|
|
guint8 *p = codec_data;
|
|
|
|
gint i, offset, num_packets;
|
|
|
|
guint *length, last;
|
|
|
|
|
|
|
|
GST_MEMDUMP ("xiph codec data", codec_data, codec_data_size);
|
|
|
|
|
|
|
|
if (codec_data == NULL || codec_data_size == 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* start of the stream and vorbis audio or theora video, need to
|
|
|
|
* send the codec_priv data as first three packets */
|
|
|
|
num_packets = p[0] + 1;
|
|
|
|
GST_DEBUG ("%u stream headers, total length=%" G_GSIZE_FORMAT " bytes",
|
|
|
|
(guint) num_packets, codec_data_size);
|
|
|
|
|
|
|
|
length = g_alloca (num_packets * sizeof (guint));
|
|
|
|
last = 0;
|
|
|
|
offset = 1;
|
|
|
|
|
|
|
|
/* first packets, read length values */
|
|
|
|
for (i = 0; i < num_packets - 1; i++) {
|
|
|
|
length[i] = 0;
|
|
|
|
while (offset < codec_data_size) {
|
|
|
|
length[i] += p[offset];
|
|
|
|
if (p[offset++] != 0xff)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
last += length[i];
|
|
|
|
}
|
|
|
|
if (offset + last > codec_data_size)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* last packet is the remaining size */
|
|
|
|
length[i] = codec_data_size - offset - last;
|
|
|
|
|
|
|
|
list = gst_buffer_list_new ();
|
|
|
|
|
|
|
|
for (i = 0; i < num_packets; i++) {
|
|
|
|
GstBuffer *hdr;
|
|
|
|
|
|
|
|
GST_DEBUG ("buffer %d: %u bytes", i, (guint) length[i]);
|
|
|
|
|
|
|
|
if (offset + length[i] > codec_data_size)
|
|
|
|
goto error;
|
|
|
|
|
2024-09-30 16:19:42 +00:00
|
|
|
if (length[i] > 0) {
|
|
|
|
hdr = gst_buffer_new_memdup (p + offset, length[i]);
|
|
|
|
gst_buffer_list_add (list, hdr);
|
|
|
|
}
|
2012-09-27 23:43:38 +00:00
|
|
|
|
|
|
|
offset += length[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
|
|
|
/* ERRORS */
|
|
|
|
error:
|
|
|
|
{
|
|
|
|
if (list != NULL)
|
|
|
|
gst_buffer_list_unref (list);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GstBufferList *
|
|
|
|
gst_matroska_parse_speex_stream_headers (gpointer codec_data,
|
|
|
|
gsize codec_data_size)
|
|
|
|
{
|
|
|
|
GstBufferList *list = NULL;
|
|
|
|
GstBuffer *hdr;
|
|
|
|
guint8 *pdata = codec_data;
|
|
|
|
|
|
|
|
GST_MEMDUMP ("speex codec data", codec_data, codec_data_size);
|
|
|
|
|
|
|
|
if (codec_data == NULL || codec_data_size < 80) {
|
|
|
|
GST_WARNING ("not enough codec priv data for speex headers");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (memcmp (pdata, "Speex ", 8) != 0) {
|
|
|
|
GST_WARNING ("no Speex marker at start of stream headers");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
list = gst_buffer_list_new ();
|
|
|
|
|
2021-05-23 00:28:11 +00:00
|
|
|
hdr = gst_buffer_new_memdup (pdata, 80);
|
2012-09-27 23:43:38 +00:00
|
|
|
gst_buffer_list_add (list, hdr);
|
|
|
|
|
|
|
|
if (codec_data_size > 80) {
|
2021-05-23 00:28:11 +00:00
|
|
|
hdr = gst_buffer_new_memdup (pdata + 80, codec_data_size - 80);
|
2012-09-27 23:43:38 +00:00
|
|
|
gst_buffer_list_add (list, hdr);
|
|
|
|
}
|
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
|
|
|
GstBufferList *
|
2014-12-17 17:36:18 +00:00
|
|
|
gst_matroska_parse_opus_stream_headers (gpointer codec_data,
|
|
|
|
gsize codec_data_size)
|
|
|
|
{
|
|
|
|
GstBufferList *list = NULL;
|
|
|
|
GstBuffer *hdr;
|
|
|
|
guint8 *pdata = codec_data;
|
|
|
|
|
|
|
|
GST_MEMDUMP ("opus codec data", codec_data, codec_data_size);
|
|
|
|
|
|
|
|
if (codec_data == NULL || codec_data_size < 19) {
|
|
|
|
GST_WARNING ("not enough codec priv data for opus headers");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (memcmp (pdata, "OpusHead", 8) != 0) {
|
|
|
|
GST_WARNING ("no OpusHead marker at start of stream headers");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
list = gst_buffer_list_new ();
|
|
|
|
|
2021-05-23 00:28:11 +00:00
|
|
|
hdr = gst_buffer_new_memdup (pdata, codec_data_size);
|
2014-12-17 17:36:18 +00:00
|
|
|
gst_buffer_list_add (list, hdr);
|
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
|
|
|
GstBufferList *
|
2012-09-27 23:43:38 +00:00
|
|
|
gst_matroska_parse_flac_stream_headers (gpointer codec_data,
|
|
|
|
gsize codec_data_size)
|
|
|
|
{
|
|
|
|
GstBufferList *list = NULL;
|
|
|
|
GstBuffer *hdr;
|
|
|
|
guint8 *pdata = codec_data;
|
|
|
|
guint len, off;
|
|
|
|
|
|
|
|
GST_MEMDUMP ("flac codec data", codec_data, codec_data_size);
|
|
|
|
|
|
|
|
/* need at least 'fLaC' marker + STREAMINFO metadata block */
|
|
|
|
if (codec_data == NULL || codec_data_size < ((4) + (4 + 34))) {
|
|
|
|
GST_WARNING ("not enough codec priv data for flac headers");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (memcmp (pdata, "fLaC", 4) != 0) {
|
|
|
|
GST_WARNING ("no flac marker at start of stream headers");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
list = gst_buffer_list_new ();
|
|
|
|
|
2021-05-23 00:28:11 +00:00
|
|
|
hdr = gst_buffer_new_memdup (pdata, 4);
|
2012-09-27 23:43:38 +00:00
|
|
|
gst_buffer_list_add (list, hdr);
|
|
|
|
|
|
|
|
/* skip fLaC marker */
|
|
|
|
off = 4;
|
|
|
|
|
2016-11-22 18:01:20 +00:00
|
|
|
while (off < codec_data_size - 3) {
|
2012-09-27 23:43:38 +00:00
|
|
|
len = GST_READ_UINT8 (pdata + off + 1) << 16;
|
|
|
|
len |= GST_READ_UINT8 (pdata + off + 2) << 8;
|
|
|
|
len |= GST_READ_UINT8 (pdata + off + 3);
|
|
|
|
|
|
|
|
GST_DEBUG ("header packet: len=%u bytes, flags=0x%02x", len, pdata[off]);
|
|
|
|
|
2016-11-22 18:01:20 +00:00
|
|
|
if (off + len > codec_data_size) {
|
|
|
|
gst_buffer_list_unref (list);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2021-05-23 00:28:11 +00:00
|
|
|
hdr = gst_buffer_new_memdup (pdata + off, len + 4);
|
2012-09-27 23:43:38 +00:00
|
|
|
gst_buffer_list_add (list, hdr);
|
|
|
|
|
|
|
|
off += 4 + len;
|
|
|
|
}
|
|
|
|
return list;
|
|
|
|
}
|
2014-01-20 20:31:14 +00:00
|
|
|
|
2015-03-03 17:40:16 +00:00
|
|
|
GstClockTime
|
|
|
|
gst_matroska_track_get_buffer_timestamp (GstMatroskaTrackContext * track,
|
|
|
|
GstBuffer * buf)
|
|
|
|
{
|
|
|
|
if (track->dts_only) {
|
2015-10-27 09:48:00 +00:00
|
|
|
return GST_BUFFER_DTS_OR_PTS (buf);
|
2015-03-03 17:40:16 +00:00
|
|
|
} else {
|
|
|
|
return GST_BUFFER_PTS (buf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-20 20:31:14 +00:00
|
|
|
void
|
|
|
|
gst_matroska_track_free (GstMatroskaTrackContext * track)
|
|
|
|
{
|
|
|
|
g_free (track->codec_id);
|
|
|
|
g_free (track->codec_name);
|
|
|
|
g_free (track->name);
|
|
|
|
g_free (track->language);
|
|
|
|
g_free (track->codec_priv);
|
|
|
|
g_free (track->codec_state);
|
2018-10-17 10:58:08 +00:00
|
|
|
gst_caps_replace (&track->caps, NULL);
|
2014-01-20 20:31:14 +00:00
|
|
|
|
|
|
|
if (track->encodings != NULL) {
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < track->encodings->len; ++i) {
|
|
|
|
GstMatroskaTrackEncoding *enc = &g_array_index (track->encodings,
|
|
|
|
GstMatroskaTrackEncoding,
|
|
|
|
i);
|
|
|
|
|
|
|
|
g_free (enc->comp_settings);
|
|
|
|
}
|
2021-11-12 10:28:23 +00:00
|
|
|
g_array_unref (track->encodings);
|
2014-01-20 20:31:14 +00:00
|
|
|
}
|
|
|
|
|
2015-03-27 21:58:31 +00:00
|
|
|
if (track->tags)
|
|
|
|
gst_tag_list_unref (track->tags);
|
2014-01-20 20:31:14 +00:00
|
|
|
|
|
|
|
if (track->index_table)
|
2021-11-12 10:28:23 +00:00
|
|
|
g_array_unref (track->index_table);
|
2014-01-20 20:31:14 +00:00
|
|
|
|
|
|
|
if (track->stream_headers)
|
|
|
|
gst_buffer_list_unref (track->stream_headers);
|
|
|
|
|
matroska: Add the WebM encrypted content support in matroskademux
This commit:
1. Reads the WebM and Matroska ContentEncryption subelements.
2. Creates a GST_PROTECTION event for each ContentEncryption, which
will be sent before pushing the first source buffer.
The DRM system id field in this event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID,
because it isn't specified neither by Matroska nor by the WebM spec.
3. Reads the protection information of encrypted Block/SimpleBlock and
extracts the IV and the partitioning format (subsamples).
4. Creates the metadata protection for each encrypted Block/SimpleBlock,
with those informations: KeyID (extracted from ContentEncryption element),
IV and partitioning format.
5. Adds a new caps for WebM encrypted content named "application/x-webm-enc",
with the following new fields:
"encryption-algorithm": The encryption algorithm used.
values: "None", "DES", "3DES", "Twofish", "Blowfish", "AES".
"encoding-scope": The field that describes which Elements have been modified.
Values: "frame", "codec-data", "next-content".
"cipher-mode": The cipher mode used in the encryption.
Values: "None", "CTR".
https://bugzilla.gnome.org/show_bug.cgi?id=765275
2018-09-30 17:28:07 +00:00
|
|
|
g_queue_foreach (&track->protection_event_queue, (GFunc) gst_event_unref,
|
|
|
|
NULL);
|
|
|
|
g_queue_clear (&track->protection_event_queue);
|
|
|
|
|
|
|
|
if (track->protection_info)
|
|
|
|
gst_structure_free (track->protection_info);
|
|
|
|
|
2014-01-20 20:31:14 +00:00
|
|
|
g_free (track);
|
|
|
|
}
|
matroska: Add the WebM encrypted content support in matroskademux
This commit:
1. Reads the WebM and Matroska ContentEncryption subelements.
2. Creates a GST_PROTECTION event for each ContentEncryption, which
will be sent before pushing the first source buffer.
The DRM system id field in this event is set to GST_PROTECTION_UNSPECIFIED_SYSTEM_ID,
because it isn't specified neither by Matroska nor by the WebM spec.
3. Reads the protection information of encrypted Block/SimpleBlock and
extracts the IV and the partitioning format (subsamples).
4. Creates the metadata protection for each encrypted Block/SimpleBlock,
with those informations: KeyID (extracted from ContentEncryption element),
IV and partitioning format.
5. Adds a new caps for WebM encrypted content named "application/x-webm-enc",
with the following new fields:
"encryption-algorithm": The encryption algorithm used.
values: "None", "DES", "3DES", "Twofish", "Blowfish", "AES".
"encoding-scope": The field that describes which Elements have been modified.
Values: "frame", "codec-data", "next-content".
"cipher-mode": The cipher mode used in the encryption.
Values: "None", "CTR".
https://bugzilla.gnome.org/show_bug.cgi?id=765275
2018-09-30 17:28:07 +00:00
|
|
|
|
|
|
|
GType
|
|
|
|
matroska_track_encryption_algorithm_get_type (void)
|
|
|
|
{
|
|
|
|
static GType type = 0;
|
|
|
|
|
|
|
|
static const GEnumValue types[] = {
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_NONE, "Not encrypted",
|
|
|
|
"None"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_DES, "DES encryption algorithm",
|
|
|
|
"DES"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_3DES, "3DES encryption algorithm",
|
|
|
|
"3DES"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_TWOFISH,
|
|
|
|
"TwoFish encryption algorithm", "TwoFish"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_BLOWFISH,
|
|
|
|
"BlowFish encryption algorithm", "BlowFish"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_ALGORITHM_AES, "AES encryption algorithm",
|
|
|
|
"AES"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!type) {
|
|
|
|
type = g_enum_register_static ("MatroskaTrackEncryptionAlgorithm", types);
|
|
|
|
}
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
matroska_track_encryption_cipher_mode_get_type (void)
|
|
|
|
{
|
|
|
|
static GType type = 0;
|
|
|
|
|
|
|
|
static const GEnumValue types[] = {
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_NONE, "Not defined",
|
|
|
|
"None"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCRYPTION_CIPHER_MODE_CTR, "CTR encryption mode",
|
|
|
|
"CTR"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!type) {
|
|
|
|
type = g_enum_register_static ("MatroskaTrackEncryptionCipherMode", types);
|
|
|
|
}
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
matroska_track_encoding_scope_get_type (void)
|
|
|
|
{
|
|
|
|
static GType type = 0;
|
|
|
|
|
|
|
|
static const GEnumValue types[] = {
|
|
|
|
{GST_MATROSKA_TRACK_ENCODING_SCOPE_FRAME, "Encoding scope frame", "frame"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCODING_SCOPE_CODEC_DATA, "Encoding scope codec data",
|
|
|
|
"codec-data"},
|
|
|
|
{GST_MATROSKA_TRACK_ENCODING_SCOPE_NEXT_CONTENT_ENCODING,
|
|
|
|
"Encoding scope next content", "next-content"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!type) {
|
|
|
|
type = g_enum_register_static ("MatroskaTrackEncodingScope", types);
|
|
|
|
}
|
|
|
|
return type;
|
|
|
|
}
|