1 /* GStreamer
2  * Copyright (C) <2008> Sebastian Dröge <sebastian.droege@collabora.co.uk>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 #ifdef HAVE_CONFIG_H
20 #include <config.h>
21 #endif
22 
23 #include <gst/gst.h>
24 
25 #include "mxfquark.h"
26 #include "mxfdemux.h"
27 #include "mxfmux.h"
28 /*#include "mxfdms1.h"*/
29 #include "mxfaes-bwf.h"
30 #include "mxfalaw.h"
31 #include "mxfd10.h"
32 #include "mxfdv-dif.h"
33 #include "mxfjpeg2000.h"
34 #include "mxfmpeg.h"
35 #include "mxfup.h"
36 #include "mxfvc3.h"
37 
38 GST_DEBUG_CATEGORY (mxf_debug);
39 #define GST_CAT_DEFAULT mxf_debug
40 
41 static void
mxf_init(void)42 mxf_init (void)
43 {
44   gst_tag_register (GST_TAG_MXF_UMID, GST_TAG_FLAG_META,
45       G_TYPE_STRING, "UMID", "Unique Material Identifier", NULL);
46   gst_tag_register (GST_TAG_MXF_STRUCTURE, GST_TAG_FLAG_META,
47       GST_TYPE_STRUCTURE, "Structure", "Structural metadata of "
48       "the MXF file", NULL);
49   gst_tag_register (GST_TAG_MXF_DESCRIPTIVE_METADATA_FRAMEWORK,
50       GST_TAG_FLAG_META, GST_TYPE_STRUCTURE, "DM Framework",
51       "Descriptive metadata framework", NULL);
52 }
53 
54 static gboolean
plugin_init(GstPlugin * plugin)55 plugin_init (GstPlugin * plugin)
56 {
57   GST_DEBUG_CATEGORY_INIT (mxf_debug, "mxf", 0, "MXF");
58 
59   mxf_init ();
60   mxf_quark_initialize ();
61   mxf_metadata_init_types ();
62 /*  mxf_dms1_initialize ();*/
63   mxf_aes_bwf_init ();
64   mxf_alaw_init ();
65   mxf_d10_init ();
66   mxf_dv_dif_init ();
67   mxf_jpeg2000_init ();
68   mxf_mpeg_init ();
69   mxf_up_init ();
70   mxf_vc3_init ();
71 
72   /* mxfmux is disabled for now - it compiles but is completely untested */
73   if (!gst_element_register (plugin, "mxfdemux", GST_RANK_PRIMARY,
74           GST_TYPE_MXF_DEMUX)
75       || !gst_element_register (plugin, "mxfmux", GST_RANK_PRIMARY,
76           GST_TYPE_MXF_MUX))
77     return FALSE;
78 
79   return TRUE;
80 }
81 
82 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
83     GST_VERSION_MINOR,
84     mxf,
85     "MXF plugin library",
86     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
87