1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *                    2006 Wim Taymans <wim@fluendo.com>
5  *                    2006 David A. Schleef <ds@schleef.org>
6  *
7  * gstmultifilesink.c:
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24 
25 #ifdef HAVE_CONFIG_H
26 #  include "config.h"
27 #endif
28 
29 #include <gst/gst.h>
30 
31 #include "gstmultifilesink.h"
32 #include "gstmultifilesrc.h"
33 #include "gstsplitfilesrc.h"
34 #include "gstsplitmuxsink.h"
35 #include "gstsplitmuxsrc.h"
36 
37 static gboolean
plugin_init(GstPlugin * plugin)38 plugin_init (GstPlugin * plugin)
39 {
40   gst_element_register (plugin, "multifilesrc", GST_RANK_NONE,
41       gst_multi_file_src_get_type ());
42   gst_element_register (plugin, "multifilesink", GST_RANK_NONE,
43       gst_multi_file_sink_get_type ());
44   gst_element_register (plugin, "splitfilesrc", GST_RANK_NONE,
45       gst_split_file_src_get_type ());
46 
47   if (!register_splitmuxsink (plugin))
48     return FALSE;
49 
50   if (!register_splitmuxsrc (plugin))
51     return FALSE;
52 
53   return TRUE;
54 }
55 
56 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
57     GST_VERSION_MINOR,
58     multifile,
59     "Reads/Writes buffers from/to sequentially named files",
60     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
61