1 /* GStreamer 2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> 3 * 2000 Wim Taymans <wtay@chello.be> 4 * 2002 Kristian Rietveld <kris@gtk.org> 5 * 2002,2003 Colin Walters <walters@gnu.org> 6 * 2001,2010 Bastien Nocera <hadess@hadess.net> 7 * 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk> 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 #ifndef __GST_RTMP_SRC_H__ 26 #define __GST_RTMP_SRC_H__ 27 28 #include <gst/base/gstbasesrc.h> 29 #include <gst/base/gstpushsrc.h> 30 31 #include <librtmp/rtmp.h> 32 #include <librtmp/log.h> 33 #include <librtmp/amf.h> 34 35 G_BEGIN_DECLS 36 37 #define GST_TYPE_RTMP_SRC \ 38 (gst_rtmp_src_get_type()) 39 #define GST_RTMP_SRC(obj) \ 40 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTMP_SRC,GstRTMPSrc)) 41 #define GST_RTMP_SRC_CLASS(klass) \ 42 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTMP_SRC,GstRTMPSrcClass)) 43 #define GST_IS_RTMP_SRC(obj) \ 44 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTMP_SRC)) 45 #define GST_IS_RTMP_SRC_CLASS(klass) \ 46 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTMP_SRC)) 47 48 typedef struct _GstRTMPSrc GstRTMPSrc; 49 typedef struct _GstRTMPSrcClass GstRTMPSrcClass; 50 51 /** 52 * GstRTMPSrc: 53 * 54 * Opaque data structure. 55 */ 56 struct _GstRTMPSrc 57 { 58 GstPushSrc parent; 59 60 /* < private > */ 61 gchar *uri; 62 gchar *swf_url; 63 gchar *page_url; 64 65 RTMP *rtmp; 66 int timeout; 67 gint64 cur_offset; 68 GstClockTime last_timestamp; 69 gboolean seekable; 70 gboolean discont; 71 }; 72 73 struct _GstRTMPSrcClass 74 { 75 GstPushSrcClass parent; 76 }; 77 78 GType gst_rtmp_src_get_type (void); 79 80 G_END_DECLS 81 82 #endif /* __GST_RTMP_SRC_H__ */ 83 84