leo_sobral@2: /* vim: set sw=2: -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2; c-indent-level: 2 -*- */ leo_sobral@2: /* GStreamer leo_sobral@2: * Copyright (C) <2006> Rosfran Borges leo_sobral@2: * leo_sobral@2: * This library is free software; you can redistribute it and/or leo_sobral@2: * modify it under the terms of the GNU Library General Public leo_sobral@2: * License as published by the Free Software Foundation; either leo_sobral@2: * version 2 of the License, or (at your option) any later version. leo_sobral@2: * leo_sobral@2: * This library is distributed in the hope that it will be useful, leo_sobral@2: * but WITHOUT ANY WARRANTY; without even the implied warranty of leo_sobral@2: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU leo_sobral@2: * Library General Public License for more leo_sobral@2: */ leo_sobral@2: leo_sobral@2: #ifndef __GST_MYTHTV_SRC_H__ leo_sobral@2: #define __GST_MYTHTV_SRC_H__ leo_sobral@2: leo_sobral@2: #include leo_sobral@2: #include rosfran@70: #include leo_sobral@2: #include leo_sobral@2: leo_sobral@2: #include rosfran@52: #include rosfran@52: #include leo_sobral@2: leo_sobral@2: G_BEGIN_DECLS leo_sobral@2: leo_sobral@2: #define GST_TYPE_MYTHTV_SRC \ leo_sobral@2: (gst_mythtv_src_get_type()) leo_sobral@2: #define GST_MYTHTV_SRC(obj) \ leo_sobral@2: (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc)) leo_sobral@2: #define GST_MYTHTV_SRC_CLASS(klass) \ leo_sobral@2: (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass)) leo_sobral@2: #define GST_IS_MYTHTV_SRC(obj) \ leo_sobral@2: (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC)) leo_sobral@2: #define GST_IS_MYTHTV_SRC_CLASS(klass) \ leo_sobral@2: (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC)) leo_sobral@2: leo_sobral@2: typedef struct _GstMythtvSrc GstMythtvSrc; leo_sobral@2: typedef struct _GstMythtvSrcClass GstMythtvSrcClass; leo_sobral@2: rosfran@81: typedef enum { rosfran@70: GST_MYTHTV_SRC_FILE_TRANSFER, rosfran@70: GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN, rosfran@70: GST_MYTHTV_SRC_INVALID_DATA rosfran@70: } GstMythtvState; rosfran@70: leo_sobral@2: struct _GstMythtvSrc { rosfran@81: GstPushSrc element; leo_sobral@2: leo_sobral@2: /* MythFileTransfer */ rosfran@40: GMythFileTransfer *file_transfer; leo_sobral@2: rosfran@40: GMythLiveTV *spawn_livetv; rosfran@90: rosfran@70: GstMythtvState state; leo_sobral@2: leo_sobral@2: gchar *uri_name; leo_sobral@2: gchar *user_agent; leo_sobral@2: leo_sobral@2: gchar *live_chain_id; rosfran@90: leo_sobral@2: gint mythtv_version; leo_sobral@2: rosfran@52: gint64 content_size; leo_sobral@2: rosfran@63: gint64 prev_content_size; rosfran@63: rosfran@61: gint64 content_size_last; rosfran@61: leo_sobral@2: guint64 bytes_read; leo_sobral@2: rosfran@52: gint64 read_offset; rosfran@81: gint64 adapter_offset; leo_sobral@2: rosfran@90: //guint64 file_size; rosfran@90: /* added by melunko */ rosfran@90: guint8* buffer; rosfran@90: rosfran@90: gint buffer_offset; rosfran@90: gint buffer_remain; rosfran@90: leo_sobral@2: gboolean eos; rosfran@90: leo_sobral@2: gboolean do_start; leo_sobral@2: leo_sobral@2: gboolean unique_setup; leo_sobral@2: leo_sobral@2: gboolean live_tv; rosfran@90: rosfran@52: gboolean enable_timing_position; leo_sobral@2: leo_sobral@2: gint live_tv_id; rosfran@90: rosfran@81: gint channel_num; rosfran@90: rosfran@70: guint mode; leo_sobral@2: leo_sobral@2: /* MythTV capabilities */ leo_sobral@2: GstCaps *mythtv_caps; rosfran@90: rosfran@70: GstPad *sinkpad; rosfran@70: GstPad *srcpad; rosfran@90: rosfran@81: GstTask *th_read_ahead; rosfran@90: rosfran@90: GStaticRecMutex *th_mutex; rosfran@90: rosfran@70: GstAdapter *adapter; leo_sobral@2: leo_sobral@2: /* enable Myth TV debug messages */ leo_sobral@2: gboolean mythtv_msgs_dbg; rosfran@40: rosfran@40: gboolean update_prog_chain; leo_sobral@2: }; leo_sobral@2: leo_sobral@2: struct _GstMythtvSrcClass { rosfran@81: GstPushSrcClass parent_class; leo_sobral@2: }; leo_sobral@2: leo_sobral@2: GType gst_mythtv_src_get_type (void); leo_sobral@2: leo_sobral@2: G_END_DECLS leo_sobral@2: leo_sobral@2: #endif /* __GST_MYTHTV_SRC_H__ */