gst-gmyth/mythsrc/gstmythtvsrc.h
author melunko
Thu Aug 23 20:24:11 2007 +0100 (2007-08-23)
branchtrunk
changeset 824 e711a64ba03d
parent 812 cf7e02ee3db4
permissions -rwxr-xr-x
[svn r830] fixed config file to expand dir
     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     gboolean        eos;
    83 
    84     gboolean        do_start;
    85 
    86     gboolean        unique_setup;
    87 
    88     gboolean        live_tv;
    89 
    90     gboolean        enable_timing_position;
    91 
    92     gint            live_tv_id;
    93 
    94     gchar          *channel_name;
    95 
    96     guint           mode;
    97 
    98     /*
    99      * MythTV capabilities 
   100      */
   101     GstCaps        *mythtv_caps;
   102 
   103     gboolean        update_prog_chain;
   104 
   105     /*
   106      * stablish a maximum iteration value to the IS_RECORDING message 
   107      */
   108     guint           wait_to_transfer;
   109 };
   110 
   111 struct _GstMythtvSrcClass {
   112     GstPushSrcClass parent_class;
   113 };
   114 
   115 GType           gst_mythtv_src_get_type(void);
   116 
   117 G_END_DECLS
   118 #endif                          /* __GST_MYTHTV_SRC_H__ */