[svn r557] Added the URI property change, just in the case the LiveTV finishs the channel setup. trunk
authorrosfran
Mon Apr 16 16:01:17 2007 +0100 (2007-04-16)
branchtrunk
changeset 55273c5aaff98a9
parent 551 3b459aedfce7
child 553 424babd6b788
[svn r557] Added the URI property change, just in the case the LiveTV finishs the channel setup.
gmyth/src/gmyth_file.c
gmyth/src/gmyth_file.h
     1.1 --- a/gmyth/src/gmyth_file.c	Fri Apr 13 22:41:14 2007 +0100
     1.2 +++ b/gmyth/src/gmyth_file.c	Mon Apr 16 16:01:17 2007 +0100
     1.3 @@ -365,6 +365,23 @@
     1.4      priv->offset = offset;
     1.5  }
     1.6  
     1.7 +gchar*
     1.8 +gmyth_file_get_uri (GMythFile *file)
     1.9 +{
    1.10 +    GMythFilePrivate *priv = GMYTH_FILE_GET_PRIVATE(file);
    1.11 +    gchar *uri = NULL;
    1.12 +
    1.13 +    g_return_val_if_fail( file != NULL, NULL );
    1.14 +    
    1.15 +    if ( g_strstr_len( priv->filename, strlen(priv->filename), "://" ) != NULL )
    1.16 +        uri = g_strdup( priv->filename );
    1.17 +    else
    1.18 +        uri = g_strdup_printf( "myth://%s:%d/%s", gmyth_backend_info_get_hostname( priv->backend_info ), 
    1.19 +                gmyth_backend_info_get_port( priv->backend_info ), priv->filename );
    1.20 +    
    1.21 +    return uri;
    1.22 +}
    1.23 +
    1.24  static void
    1.25  gmyth_file_set_property (GObject * object, guint prop_id,
    1.26      const GValue * value, GParamSpec * pspec)
     2.1 --- a/gmyth/src/gmyth_file.h	Fri Apr 13 22:41:14 2007 +0100
     2.2 +++ b/gmyth/src/gmyth_file.h	Mon Apr 16 16:01:17 2007 +0100
     2.3 @@ -88,6 +88,8 @@
     2.4  gint64              gmyth_file_get_offset       (GMythFile *file);
     2.5  void                gmyth_file_set_offset       (GMythFile *file, gint64 offset);
     2.6  
     2.7 +gchar*              gmyth_file_get_uri          (GMythFile *file);
     2.8 +
     2.9  G_END_DECLS
    2.10  
    2.11  #endif /* __GMYTH_FILE_H__ */