1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gst-gmyth/mythsrc/gstmythtvsrc.h Fri May 04 20:45:38 2007 +0100
1.3 @@ -0,0 +1,133 @@
1.4 +/* GStreamer
1.5 + * Copyright (C) <2006> Rosfran Borges <rosfran.borges@indt.org.br>
1.6 + *
1.7 + * This library is free software; you can redistribute it and/or
1.8 + * modify it under the terms of the GNU Library General Public
1.9 + * License as published by the Free Software Foundation; either
1.10 + * version 2 of the License, or (at your option) any later version.
1.11 + *
1.12 + * This library is distributed in the hope that it will be useful,
1.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.15 + * Library General Public License for more details.
1.16 + *
1.17 + * You should have received a copy of the GNU Library General Public
1.18 + * License along with this library; if not, write to the
1.19 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
1.20 + * Boston, MA 02111-1307, USA.
1.21 + */
1.22 +
1.23 +#ifndef __GST_MYTHTV_SRC_H__
1.24 +#define __GST_MYTHTV_SRC_H__
1.25 +
1.26 +#include <gst/gst.h>
1.27 +#include <gst/base/gstbasesrc.h>
1.28 +#include <gst/base/gstpushsrc.h>
1.29 +#include <stdio.h>
1.30 +
1.31 +#include <gmyth/gmyth_socket.h>
1.32 +#include <gmyth/gmyth_file.h>
1.33 +#include <gmyth/gmyth_file_transfer.h>
1.34 +#include <gmyth/gmyth_file_local.h>
1.35 +#include <gmyth/gmyth_livetv.h>
1.36 +#include <gmyth/gmyth_backendinfo.h>
1.37 +
1.38 +G_BEGIN_DECLS
1.39 +
1.40 +#define GST_TYPE_MYTHTV_SRC \
1.41 + (gst_mythtv_src_get_type())
1.42 +#define GST_MYTHTV_SRC(obj) \
1.43 + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc))
1.44 +#define GST_MYTHTV_SRC_CLASS(klass) \
1.45 + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass))
1.46 +#define GST_IS_MYTHTV_SRC(obj) \
1.47 + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
1.48 +#define GST_IS_MYTHTV_SRC_CLASS(klass) \
1.49 + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
1.50 +
1.51 +typedef struct _GstMythtvSrc GstMythtvSrc;
1.52 +typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
1.53 +
1.54 +typedef enum {
1.55 + GST_MYTHTV_SRC_FILE_TRANSFER,
1.56 + GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN,
1.57 + GST_MYTHTV_SRC_INVALID_DATA
1.58 +} GstMythtvState;
1.59 +
1.60 +struct _GstMythtvSrc {
1.61 + GstPushSrc element;
1.62 +
1.63 + /* MythFileTransfer */
1.64 + GMythFile *file;
1.65 +
1.66 + GMythLiveTV *spawn_livetv;
1.67 +
1.68 + GMythBackendInfo *backend_info;
1.69 +
1.70 + GstMythtvState state;
1.71 +
1.72 + gchar *uri_name;
1.73 + gchar *user_agent;
1.74 +
1.75 + gchar *live_chain_id;
1.76 +
1.77 + gint mythtv_version;
1.78 +
1.79 + gint64 content_size;
1.80 +
1.81 + gint64 prev_content_size;
1.82 +
1.83 + gint64 content_size_last;
1.84 +
1.85 + guint64 bytes_read;
1.86 +
1.87 + gint64 read_offset;
1.88 +
1.89 + gint buffer_remain;
1.90 +
1.91 + gboolean eos;
1.92 +
1.93 + gboolean do_start;
1.94 +
1.95 + gboolean unique_setup;
1.96 +
1.97 + gboolean live_tv;
1.98 +
1.99 + gboolean enable_timing_position;
1.100 +
1.101 + gint live_tv_id;
1.102 +
1.103 + gchar* channel_name;
1.104 +
1.105 + guint mode;
1.106 +
1.107 + /* MythTV capabilities */
1.108 + GstCaps *mythtv_caps;
1.109 +
1.110 + GByteArray *bytes_queue;
1.111 +
1.112 +#ifndef GST_DISABLE_GST_DEBUG
1.113 + /* enable Myth TV debug messages */
1.114 + gboolean mythtv_msgs_dbg;
1.115 +#endif
1.116 +
1.117 + gboolean update_prog_chain;
1.118 +
1.119 + /* stablish a maximum iteration value to the IS_RECORDING message */
1.120 + guint wait_to_transfer;
1.121 +
1.122 + /* max try number to get freerecorder */
1.123 + gint max_try;
1.124 + gint try_number;
1.125 +
1.126 +};
1.127 +
1.128 +struct _GstMythtvSrcClass {
1.129 + GstPushSrcClass parent_class;
1.130 +};
1.131 +
1.132 +GType gst_mythtv_src_get_type (void);
1.133 +
1.134 +G_END_DECLS
1.135 +
1.136 +#endif /* __GST_MYTHTV_SRC_H__ */