2003-11-21 21:34:27 +00:00
|
|
|
/* GStreamer Matroska muxer/demuxer
|
|
|
|
* (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
|
|
*
|
|
|
|
* matroska.c: plugin loader
|
|
|
|
*
|
|
|
|
* 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., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2005-10-18 18:12:31 +00:00
|
|
|
#include "matroska-demux.h"
|
2011-02-18 01:59:25 +00:00
|
|
|
#include "matroska-parse.h"
|
2011-08-03 12:50:05 +00:00
|
|
|
#include "matroska-read-common.h"
|
Riff, EBML, fourcc etc. work. Not fully finished, but better than what we used to have and definately worth a first b...
Original commit message from CVS:
Riff, EBML, fourcc etc. work. Not fully finished, but better than
what we used to have and definately worth a first broad testing.
I've revived rifflib. Rifflib used to be a bytestream-for-riff, which
just dup'ed bytestream. I've rewritten rifflib to be a modern riff-
chunk parser that uses bytestream fully, plus adds some extra functions
so that riff file parsing becomes extremely easy. It also contains some
small usability functions for strh/strf and metadata parsing. Note that
it doesn't use the new tagging yet, that's a TODO.
Avidemux has been rewritten to use this. I think we all agreed that
avidemux was pretty much a big mess, which is because it used all
sort of bytestream magic all around the place. It was just ugly.
This is a lot nicer, very complete and safe. I think this is far more
robust than what the old avidemux could ever have been. Of course, it
might contain bugs, please let me know.
EBML writing has also been implemented. This is useful for matroska.
I'm intending to modify avidemux (with a riffwriter) similarly. Maybe
I'll change wavparse/-enc too to use rifflib.
Lastly, several plugins have been modified to use rifflib's fourcc
parsing instead of their own. this puts fourcc parsing in one central
place, which should make it a lot simpler to add new fourccs. We might
want to move this to its own lib instead of rifflib.
Enjoy!
2003-12-07 20:00:41 +00:00
|
|
|
#include "matroska-mux.h"
|
2008-06-16 10:59:39 +00:00
|
|
|
#include "matroska-ids.h"
|
2010-05-21 11:47:03 +00:00
|
|
|
#include "webm-mux.h"
|
2003-11-21 21:34:27 +00:00
|
|
|
|
2010-04-30 15:30:31 +00:00
|
|
|
#include <gst/pbutils/pbutils.h>
|
|
|
|
|
2003-11-21 21:34:27 +00:00
|
|
|
static gboolean
|
2004-03-14 22:34:33 +00:00
|
|
|
plugin_init (GstPlugin * plugin)
|
2003-11-21 21:34:27 +00:00
|
|
|
{
|
2010-05-21 11:47:03 +00:00
|
|
|
gboolean ret;
|
|
|
|
|
2010-04-30 15:30:31 +00:00
|
|
|
gst_pb_utils_init ();
|
|
|
|
|
2008-06-16 10:59:39 +00:00
|
|
|
gst_matroska_register_tags ();
|
2010-05-21 11:47:03 +00:00
|
|
|
|
2011-08-03 12:50:05 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (matroskareadcommon_debug, "matroskareadcommon", 0,
|
|
|
|
"Matroska demuxer/parser shared debug");
|
|
|
|
|
2010-05-21 11:47:03 +00:00
|
|
|
ret = gst_matroska_demux_plugin_init (plugin);
|
2011-02-18 01:59:25 +00:00
|
|
|
ret &= gst_matroska_parse_plugin_init (plugin);
|
2010-05-21 11:47:03 +00:00
|
|
|
ret &= gst_element_register (plugin, "matroskamux", GST_RANK_PRIMARY,
|
|
|
|
GST_TYPE_MATROSKA_MUX);
|
|
|
|
ret &= gst_element_register (plugin, "webmmux", GST_RANK_PRIMARY,
|
|
|
|
GST_TYPE_WEBM_MUX);
|
|
|
|
|
|
|
|
return ret;
|
2003-11-21 21:34:27 +00:00
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
2012-04-05 15:36:38 +00:00
|
|
|
matroska,
|
2010-05-21 12:01:30 +00:00
|
|
|
"Matroska and WebM stream handling",
|
2005-11-14 02:13:35 +00:00
|
|
|
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|