1.1 --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Wed Jan 10 17:19:07 2007 +0000
1.2 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.c Wed Jan 10 17:19:50 2007 +0000
1.3 @@ -660,6 +660,9 @@
1.4 "format", GST_TYPE_FOURCC, nuv->priv->eh.i_audio_fcc,
1.5 "channels", G_TYPE_INT, nuv->priv->eh.i_audio_channels,
1.6 "mpegversion", G_TYPE_INT, nuv->priv->eh.i_version, NULL);
1.7 +
1.8 + char *tmp = gst_caps_to_string (audio_caps);
1.9 + printf ("XXXXXXXX audio caps: %s\n", tmp);
1.10
1.11 nuv->priv->src_audio_pad = gst_nuv_demux_create_pad (nuv, audio_caps, &audio_src_template, "audio_src");
1.12 gst_caps_unref (audio_caps);
2.1 --- a/libgnomevfs2-mythtv/modules/mythtv-method.c Wed Jan 10 17:19:07 2007 +0000
2.2 +++ b/libgnomevfs2-mythtv/modules/mythtv-method.c Wed Jan 10 17:19:50 2007 +0000
2.3 @@ -27,8 +27,9 @@
2.4 #include <libgnomevfs/gnome-vfs-module.h>
2.5 #include <libgnomevfs/gnome-vfs-utils.h>
2.6
2.7 -#include "gmyth_file_transfer.h"
2.8 -#include "gmyth_backendinfo.h"
2.9 +#include <gmyth_file_transfer.h>
2.10 +#include <gmyth_backendinfo.h>
2.11 +#include <gmyth_util.h>
2.12
2.13 #define GST_MYTHTV_ID_NUM 1
2.14 #define MYTHTV_VERSION_DEFAULT 30
2.15 @@ -91,6 +92,13 @@
2.16 NULL, NULL, NULL,
2.17 gnome_vfs_uri_get_host_port (uri));
2.18
2.19 +
2.20 + /* Verifies if the file exists */
2.21 + if (!gmyth_util_file_exists (backend_info, gnome_vfs_uri_get_path (uri))) {
2.22 + g_object_unref (backend_info);
2.23 + return GNOME_VFS_ERROR_NOT_FOUND;
2.24 + }
2.25 +
2.26 /* Connect to the backend */
2.27 myth_handle->file_transfer = gmyth_file_transfer_new (backend_info);
2.28 g_object_unref (backend_info);
2.29 @@ -104,8 +112,6 @@
2.30 return GNOME_VFS_ERROR_NOT_OPEN;
2.31 }
2.32
2.33 - // TODO: Verify if file exists in the backend
2.34 -
2.35 myth_handle->content_size = myth_handle->file_transfer->filesize;
2.36
2.37 myth_handle->buffer = g_byte_array_sized_new (MYTHTV_BUFFER_SIZE);
2.38 @@ -147,11 +153,15 @@
2.39 gint len = gmyth_file_transfer_read (myth_handle->file_transfer,
2.40 tmp_buffer, MYTHTV_BUFFER_SIZE - myth_handle->buffer_remain, TRUE);
2.41
2.42 - if (len < 0) {
2.43 + if (len < 0) {
2.44 g_byte_array_free (tmp_buffer, TRUE);
2.45 g_warning ("Fail to read bytes");
2.46 - return GNOME_VFS_ERROR_IO;
2.47 - }
2.48 + return GNOME_VFS_ERROR_IO;
2.49 + } else if (len == 0) {
2.50 + g_byte_array_free (tmp_buffer, TRUE);
2.51 + g_warning ("End of file probably achieved");
2.52 + return GNOME_VFS_ERROR_EOF;
2.53 + }
2.54
2.55 myth_handle->buffer = g_byte_array_append (myth_handle->buffer,
2.56 tmp_buffer->data, len);