mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
matroska: Remove the doctype enum, it's not needed anymore
This commit is contained in:
parent
6a25cd475c
commit
82e4807d10
4 changed files with 7 additions and 31 deletions
|
@ -2576,11 +2576,8 @@ gst_matroska_demux_parse_header (GstMatroskaDemux * demux)
|
|||
|
||||
ret = GST_FLOW_ERROR;
|
||||
if (doctype) {
|
||||
GEnumClass *doctype_class;
|
||||
GEnumValue *doctype_value;
|
||||
doctype_class = g_type_class_ref (GST_TYPE_MATROSKA_DOCTYPE);
|
||||
doctype_value = g_enum_get_value_by_nick (doctype_class, doctype);
|
||||
if (doctype_value) {
|
||||
if (g_str_equal (doctype, GST_MATROSKA_DOCTYPE_MATROSKA) ||
|
||||
g_str_equal (doctype, GST_MATROSKA_DOCTYPE_WEBM)) {
|
||||
if (version <= 2) {
|
||||
GST_INFO_OBJECT (demux, "Input is %s version %d", doctype, version);
|
||||
ret = GST_FLOW_OK;
|
||||
|
@ -2593,7 +2590,6 @@ gst_matroska_demux_parse_header (GstMatroskaDemux * demux)
|
|||
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE, (NULL),
|
||||
("Input is not a matroska stream (doctype=%s)", doctype));
|
||||
}
|
||||
g_type_class_unref (doctype_class);
|
||||
g_free (doctype);
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE, (NULL),
|
||||
|
|
|
@ -26,23 +26,6 @@
|
|||
|
||||
#include "matroska-ids.h"
|
||||
|
||||
GType
|
||||
gst_matroska_doctype_get_type (void)
|
||||
{
|
||||
static GType doctype_type = 0;
|
||||
|
||||
static const GEnumValue doctype_types[] = {
|
||||
{GST_MATROSKA_DOCTYPE_MATROSKA, "Matroska", "matroska"},
|
||||
{GST_MATROSKA_DOCTYPE_WEBM, "WebM", "webm"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
if (!doctype_type) {
|
||||
doctype_type = g_enum_register_static ("GstMatroskaDoctype", doctype_types);
|
||||
}
|
||||
return doctype_type;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_matroska_track_init_video_context (GstMatroskaTrackContext ** p_context)
|
||||
{
|
||||
|
|
|
@ -27,14 +27,11 @@
|
|||
#include "ebml-ids.h"
|
||||
|
||||
/*
|
||||
* EBML DocType. enum.
|
||||
* EBML DocType.
|
||||
*/
|
||||
|
||||
#define GST_MATROSKA_DOCTYPE_MATROSKA 0
|
||||
#define GST_MATROSKA_DOCTYPE_WEBM 1
|
||||
|
||||
#define GST_TYPE_MATROSKA_DOCTYPE (gst_matroska_doctype_get_type())
|
||||
extern GType gst_matroska_doctype_get_type (void);
|
||||
#define GST_MATROSKA_DOCTYPE_MATROSKA "matroska"
|
||||
#define GST_MATROSKA_DOCTYPE_WEBM "webm"
|
||||
|
||||
/*
|
||||
* Matroska element IDs. max. 32-bit.
|
||||
|
|
|
@ -340,9 +340,9 @@ gst_matroska_mux_init (GstMatroskaMux * mux, GstMatroskaMuxClass * g_class)
|
|||
mux);
|
||||
|
||||
mux->ebml_write = gst_ebml_write_new (mux->srcpad);
|
||||
mux->doctype = GST_MATROSKA_DOCTYPE_MATROSKA;
|
||||
|
||||
/* property defaults */
|
||||
mux->doctype = "matroska";
|
||||
mux->doctype_version = DEFAULT_DOCTYPE_VERSION;
|
||||
mux->writing_app = g_strdup (DEFAULT_WRITING_APP);
|
||||
mux->min_index_interval = DEFAULT_MIN_INDEX_INTERVAL;
|
||||
|
@ -2880,7 +2880,7 @@ gst_webm_mux_class_init (GstWebMMuxClass * klass)
|
|||
static void
|
||||
gst_webm_mux_init (GstWebMMux * mux, GstWebMMuxClass * g_class)
|
||||
{
|
||||
mux->doctype = "webm";
|
||||
mux->doctype = GST_MATROSKA_DOCTYPE_WEBM;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in a new issue