Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / ext / rtmp / gstrtmpsink.h
1 /* 
2  * GStreamer
3  * Copyright (C) 2010 Jan Schmidt <thaytan@noraisin.net>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20  
21 #ifndef __GST_RTMP_SINK_H__
22 #define __GST_RTMP_SINK_H__
23
24 #include <gst/gst.h>
25 #include <gst/base/gstbasesink.h>
26
27 #include <librtmp/rtmp.h>
28 #include <librtmp/log.h>
29 #include <librtmp/amf.h>
30
31 G_BEGIN_DECLS
32
33 #define GST_TYPE_RTMP_SINK \
34   (gst_rtmp_sink_get_type())
35 #define GST_RTMP_SINK(obj) \
36   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTMP_SINK,GstRTMPSink))
37 #define GST_RTMP_SINK_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTMP_SINK,GstRTMPSinkClass))
39 #define GST_IS_RTMP_SINK(obj) \
40   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTMP_SINK))
41 #define GST_IS_RTMP_SINK_CLASS(klass) \
42   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTMP_SINK))
43
44 typedef struct _GstRTMPSink      GstRTMPSink;
45 typedef struct _GstRTMPSinkClass GstRTMPSinkClass;
46
47 struct _GstRTMPSink {
48   GstBaseSink parent;
49
50   /* < private > */
51   gchar *uri;
52
53   RTMP *rtmp;
54   gchar *rtmp_uri; /* copy of url for librtmp */
55
56   GstBuffer *cache; /* Cached buffer */
57   gboolean first;
58 };
59
60 struct _GstRTMPSinkClass {
61   GstBaseSinkClass parent_class;
62 };
63
64 GType gst_rtmp_sink_get_type (void);
65
66 G_END_DECLS
67
68 #endif /* __GST_RTMP_SINK_H__ */