upload tizen1.0 source
[framework/multimedia/gst-plugins-good0.10.git] / gst / multifile / gstmultifilesink.h
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.h:
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., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24
25 #ifndef __GST_MULTIFILESINK_H__
26 #define __GST_MULTIFILESINK_H__
27
28 #include <gst/gst.h>
29 #include <gst/base/gstbasesink.h>
30 #include <errno.h>
31 #include <stdio.h>
32 #include <string.h>
33 #include <sys/stat.h>
34 #include <sys/types.h>
35 #ifdef HAVE_UNISTD_H
36 #include <unistd.h>
37 #endif
38
39 G_BEGIN_DECLS
40
41 #define GST_TYPE_MULTI_FILE_SINK \
42   (gst_multi_file_sink_get_type())
43 #define GST_MULTI_FILE_SINK(obj) \
44   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTI_FILE_SINK,GstMultiFileSink))
45 #define GST_MULTI_FILE_SINK_CLASS(klass) \
46   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTI_FILE_SINK,GstMultiFileSinkClass))
47 #define GST_IS_MULTI_FILE_SINK(obj) \
48   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTI_FILE_SINK))
49 #define GST_IS_MULTI_FILE_SINK_CLASS(klass) \
50   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTI_FILE_SINK))
51
52 typedef struct _GstMultiFileSink GstMultiFileSink;
53 typedef struct _GstMultiFileSinkClass GstMultiFileSinkClass;
54
55 typedef enum {
56   GST_MULTI_FILE_SINK_NEXT_BUFFER,
57   GST_MULTI_FILE_SINK_NEXT_DISCONT,
58   GST_MULTI_FILE_SINK_NEXT_KEY_FRAME
59 } GstMultiFileSinkNext;
60
61 struct _GstMultiFileSink
62 {
63   GstBaseSink parent;
64
65   gchar *filename;
66   gint index;
67   gboolean post_messages;
68   GstMultiFileSinkNext next_file;
69   FILE *file;
70
71   gint64 next_segment;
72
73   int n_streamheaders;
74   GstBuffer **streamheaders;
75 };
76
77 struct _GstMultiFileSinkClass
78 {
79   GstBaseSinkClass parent_class;
80 };
81
82 GType gst_multi_file_sink_get_type (void);
83
84 G_END_DECLS
85
86 #endif /* __GST_MULTIFILESINK_H__ */