gst-gmyth/mythsrc/gstmythtvsrc.h
author renatofilho
Wed Jul 04 21:51:42 2007 +0100 (2007-07-04)
branchtrunk
changeset 784 f635d7c4f789
parent 751 3cf3c6019e3b
child 812 cf7e02ee3db4
permissions -rwxr-xr-x
[svn r790] removed progress log
     1 /*
     2  * GStreamer Copyright (C) <2006> Rosfran Borges
     3  * <rosfran.borges@indt.org.br> This library is free software; you can
     4  * redistribute it and/or modify it under the terms of the GNU Library
     5  * General Public License as published by the Free Software Foundation;
     6  * either version 2 of the License, or (at your option) any later version.
     7  * This library is distributed in the hope that it will be useful, but
     8  * WITHOUT ANY WARRANTY; without even the implied warranty of
     9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library 
    10  * General Public License for more details. You should have received a copy 
    11  * of the GNU Library General Public License along with this library; if
    12  * not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 
    13  * 330, Boston, MA 02111-1307, USA. 
    14  */
    15 
    16 #ifndef __GST_MYTHTV_SRC_H__
    17 #define __GST_MYTHTV_SRC_H__
    18 
    19 #include <gst/gst.h>
    20 #include <gst/base/gstbasesrc.h>
    21 #include <gst/base/gstpushsrc.h>
    22 #include <stdio.h>
    23 
    24 #include <gmyth/gmyth_socket.h>
    25 #include <gmyth/gmyth_file.h>
    26 #include <gmyth/gmyth_file_transfer.h>
    27 #include <gmyth/gmyth_file_local.h>
    28 #include <gmyth/gmyth_livetv.h>
    29 #include <gmyth/gmyth_backendinfo.h>
    30 
    31 G_BEGIN_DECLS
    32 #define GST_TYPE_MYTHTV_SRC \
    33   (gst_mythtv_src_get_type())
    34 #define GST_MYTHTV_SRC(obj) \
    35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc))
    36 #define GST_MYTHTV_SRC_CLASS(klass) \
    37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass))
    38 #define GST_IS_MYTHTV_SRC(obj) \
    39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
    40 #define GST_IS_MYTHTV_SRC_CLASS(klass) \
    41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
    42 typedef struct _GstMythtvSrc GstMythtvSrc;
    43 typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
    44 
    45 typedef enum {
    46     GST_MYTHTV_SRC_FILE_TRANSFER,
    47     GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN,
    48     GST_MYTHTV_SRC_INVALID_DATA
    49 } GstMythtvState;
    50 
    51 struct _GstMythtvSrc {
    52     GstPushSrc      element;
    53 
    54     /*
    55      * MythFileTransfer 
    56      */
    57     GMythFile      *file;
    58 
    59     GMythLiveTV    *spawn_livetv;
    60 
    61     GMythBackendInfo *backend_info;
    62 
    63     GstMythtvState  state;
    64 
    65     gchar          *uri_name;
    66     gchar          *user_agent;
    67 
    68     gchar          *live_chain_id;
    69 
    70     gint            mythtv_version;
    71 
    72     gint64          content_size;
    73 
    74     gint64          prev_content_size;
    75 
    76     gint64          content_size_last;
    77 
    78     guint64         bytes_read;
    79 
    80     gint64          read_offset;
    81 
    82     gint            buffer_remain;
    83 
    84     gboolean        eos;
    85 
    86     gboolean        do_start;
    87 
    88     gboolean        unique_setup;
    89 
    90     gboolean        live_tv;
    91 
    92     gboolean        enable_timing_position;
    93 
    94     gint            live_tv_id;
    95 
    96     gchar          *channel_name;
    97 
    98     guint           mode;
    99 
   100     /*
   101      * MythTV capabilities 
   102      */
   103     GstCaps        *mythtv_caps;
   104 
   105     GByteArray     *bytes_queue;
   106 
   107 #ifndef GST_DISABLE_GST_DEBUG
   108     /*
   109      * enable Myth TV debug messages 
   110      */
   111     gboolean        mythtv_msgs_dbg;
   112 #endif
   113 
   114     gboolean        update_prog_chain;
   115 
   116     /*
   117      * stablish a maximum iteration value to the IS_RECORDING message 
   118      */
   119     guint           wait_to_transfer;
   120 
   121     /*
   122      * max try number to get freerecorder 
   123      */
   124     gint            max_try;
   125     gint            try_number;
   126 
   127 };
   128 
   129 struct _GstMythtvSrcClass {
   130     GstPushSrcClass parent_class;
   131 };
   132 
   133 GType           gst_mythtv_src_get_type(void);
   134 
   135 G_END_DECLS
   136 #endif                          /* __GST_MYTHTV_SRC_H__ */