# HG changeset patch # User melunko # Date 1168449590 0 # Node ID 9f0346db9a46382d73d21c4c796a1305925967e4 # Parent ac3ca128dbca668ef869eb45f592ca19438871bd [svn r252] Added gmyth-upnp library diff -r ac3ca128dbca -r 9f0346db9a46 gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Wed Jan 10 17:19:07 2007 +0000 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Wed Jan 10 17:19:50 2007 +0000 @@ -660,6 +660,9 @@ "format", GST_TYPE_FOURCC, nuv->priv->eh.i_audio_fcc, "channels", G_TYPE_INT, nuv->priv->eh.i_audio_channels, "mpegversion", G_TYPE_INT, nuv->priv->eh.i_version, NULL); + + char *tmp = gst_caps_to_string (audio_caps); + printf ("XXXXXXXX audio caps: %s\n", tmp); nuv->priv->src_audio_pad = gst_nuv_demux_create_pad (nuv, audio_caps, &audio_src_template, "audio_src"); gst_caps_unref (audio_caps); diff -r ac3ca128dbca -r 9f0346db9a46 libgnomevfs2-mythtv/modules/mythtv-method.c --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Wed Jan 10 17:19:07 2007 +0000 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Wed Jan 10 17:19:50 2007 +0000 @@ -27,8 +27,9 @@ #include #include -#include "gmyth_file_transfer.h" -#include "gmyth_backendinfo.h" +#include +#include +#include #define GST_MYTHTV_ID_NUM 1 #define MYTHTV_VERSION_DEFAULT 30 @@ -91,6 +92,13 @@ NULL, NULL, NULL, gnome_vfs_uri_get_host_port (uri)); + + /* Verifies if the file exists */ + if (!gmyth_util_file_exists (backend_info, gnome_vfs_uri_get_path (uri))) { + g_object_unref (backend_info); + return GNOME_VFS_ERROR_NOT_FOUND; + } + /* Connect to the backend */ myth_handle->file_transfer = gmyth_file_transfer_new (backend_info); g_object_unref (backend_info); @@ -104,8 +112,6 @@ return GNOME_VFS_ERROR_NOT_OPEN; } - // TODO: Verify if file exists in the backend - myth_handle->content_size = myth_handle->file_transfer->filesize; myth_handle->buffer = g_byte_array_sized_new (MYTHTV_BUFFER_SIZE); @@ -147,11 +153,15 @@ gint len = gmyth_file_transfer_read (myth_handle->file_transfer, tmp_buffer, MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain, TRUE); - if (len < 0) { + if (len < 0) { g_byte_array_free (tmp_buffer, TRUE); g_warning ("Fail to read bytes"); - return GNOME_VFS_ERROR_IO; - } + return GNOME_VFS_ERROR_IO; + } else if (len == 0) { + g_byte_array_free (tmp_buffer, TRUE); + g_warning ("End of file probably achieved"); + return GNOME_VFS_ERROR_EOF; + } myth_handle->buffer = g_byte_array_append (myth_handle->buffer, tmp_buffer->data, len);