# HG changeset patch # User rosfran # Date 1176735677 -3600 # Node ID 73c5aaff98a911f816c8ccbde736ace9defd5d20 # Parent 3b459aedfce782969a96000244a565f2e38e8866 [svn r557] Added the URI property change, just in the case the LiveTV finishs the channel setup. diff -r 3b459aedfce7 -r 73c5aaff98a9 gmyth/src/gmyth_file.c --- a/gmyth/src/gmyth_file.c Fri Apr 13 22:41:14 2007 +0100 +++ b/gmyth/src/gmyth_file.c Mon Apr 16 16:01:17 2007 +0100 @@ -365,6 +365,23 @@ priv->offset = offset; } +gchar* +gmyth_file_get_uri (GMythFile *file) +{ + GMythFilePrivate *priv = GMYTH_FILE_GET_PRIVATE(file); + gchar *uri = NULL; + + g_return_val_if_fail( file != NULL, NULL ); + + if ( g_strstr_len( priv->filename, strlen(priv->filename), "://" ) != NULL ) + uri = g_strdup( priv->filename ); + else + uri = g_strdup_printf( "myth://%s:%d/%s", gmyth_backend_info_get_hostname( priv->backend_info ), + gmyth_backend_info_get_port( priv->backend_info ), priv->filename ); + + return uri; +} + static void gmyth_file_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) diff -r 3b459aedfce7 -r 73c5aaff98a9 gmyth/src/gmyth_file.h --- a/gmyth/src/gmyth_file.h Fri Apr 13 22:41:14 2007 +0100 +++ b/gmyth/src/gmyth_file.h Mon Apr 16 16:01:17 2007 +0100 @@ -88,6 +88,8 @@ gint64 gmyth_file_get_offset (GMythFile *file); void gmyth_file_set_offset (GMythFile *file, gint64 offset); +gchar* gmyth_file_get_uri (GMythFile *file); + G_END_DECLS #endif /* __GMYTH_FILE_H__ */