[gst-devel] Re: [gst-cvs] colinwalters gst-plugins: gst-plugins/ext/gnomevfs/
Thomas Vander Stichele
thomas at urgent.rug.ac.be
Tue Feb 4 10:49:05 CET 2003
Hey,
I'm having my doubts re: proper stability of multiple commits and so on.
I'd advise people work on patches and features in the HEAD branch and
backport in one fell swoop after supplying a complete working patch in
bugzilla.
The goal of 0.6 branch is to remain completely stable and always
releasable.
Thomas
> CVS Root: /cvsroot/gstreamer
> Module: gst-plugins
> Changes by: colinwalters
> Date: Mon Feb 03 2003 07:51:12 PST
> Branch: BRANCH-GSTREAMER-0_6
>
> Log message:
> (gst_gnomevfssrc_received_headers_callback): Remove previous silly
> code which tried to use Content-Type header.
> (gst_gnomevfssrc_open_file): Get GnomeVFSFileInfo structure from
> handle instead of URI. Set caps based on the mime type we
> received there.
>
> Modified files:
> ext/gnomevfs : gstgnomevfssrc.c
>
> Links:
> http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/gnomevfs/gstgnomevfssrc.c.diff?r1=1.25.6.3&r2=1.25.6.4
>
> ====Begin Diffs====
> Index: gstgnomevfssrc.c
> ===================================================================
> RCS file: /cvsroot/gstreamer/gst-plugins/ext/gnomevfs/gstgnomevfssrc.c,v
> retrieving revision 1.25.6.3
> retrieving revision 1.25.6.4
> diff -u -d -r1.25.6.3 -r1.25.6.4
> --- gstgnomevfssrc.c 3 Feb 2003 04:12:02 -0000 1.25.6.3
> +++ gstgnomevfssrc.c 3 Feb 2003 15:50:59 -0000 1.25.6.4
> @@ -693,6 +693,10 @@
> GnomeVFSModuleCallbackReceivedHeadersIn *in_args =
> (GnomeVFSModuleCallbackReceivedHeadersIn *)in;
>
> + /* This is only used for internet radio stuff right now */
> + if (!src->iradio_mode)
> + return;
> +
> for (i = in_args->headers; i; i = i->next) {
> char *data = (char *) i->data;
> char *key = data;
> @@ -705,18 +709,6 @@
> if (!strlen(value))
> continue;
>
> - if (!g_ascii_strncasecmp (data, "Content-Type:", 13))
> - {
> - GstCaps *caps = gst_pad_get_caps (src->srcpad);
> - gst_caps_set_mime (caps, value);
> - GST_DEBUG (0, "got Content-Type \"%s\", setting caps",
> - value);
> - }
> -
> - /* The rest of this stuff deals with Internet radio bits */
> - if (!src->iradio_mode)
> - return;
> -
> /* Icecast stuff */
> if (!strncmp (data, "icy-metaint:", 12)) /* ugh */
> {
> @@ -1047,7 +1039,7 @@
>
> src->new_seek = TRUE;
> } else {
> -
> + GnomeVFSFileInfo *info;
> if (!audiocast_init(src))
> return FALSE;
>
> @@ -1067,33 +1059,27 @@
> return FALSE;
> }
>
> - /* find the file length (but skip it in iradio mode,
> - * since it will require a separate request, and we
> - * know the length is undefined anyways) */
> - if (!src->iradio_mode)
> + info = gnome_vfs_file_info_new ();
> + if (gnome_vfs_get_file_info_from_handle (src->handle, info,
> + GNOME_VFS_FILE_INFO_DEFAULT) == GNOME_VFS_OK)
> {
> - GnomeVFSResult size_result;
> - GnomeVFSFileInfo *info;
> -
> - info = gnome_vfs_file_info_new ();
> - size_result = gnome_vfs_get_file_info_uri(src->uri,
> - info, GNOME_VFS_FILE_INFO_DEFAULT);
> -
> - if (size_result != GNOME_VFS_OK)
> - src->size = 0;
> - else
> + if (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE)
> src->size = info->size;
> -
> - gnome_vfs_file_info_unref(info);
> + if (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE)
> + {
> + GST_DEBUG (0, "got MIME type \"%s\", setting caps",
> + info->mime_type);
> + GstCaps *caps = gst_pad_get_caps (src->srcpad);
> + gst_caps_set_mime (caps, info->mime_type);
> + }
> }
> - else
> - src->size = 0;
> + gnome_vfs_file_info_unref(info);
>
> GST_DEBUG(0, "size %lld", src->size);
>
> audiocast_do_notifications(src);
>
> - GST_DEBUG(0, "open %s", gnome_vfs_result_to_string(result));
> + GST_DEBUG(0, "open %s", gnome_vfs_result_to_string (result));
> }
>
> GST_FLAG_SET(src, GST_GNOMEVFSSRC_OPEN);
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> gstreamer-cvs-verbose mailing list
> gstreamer-cvs-verbose at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose
>
--
The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*- thomas (dot) apestaart (dot) org -*->
There has to be a change, I'm sure
Today was just one day fading into the other
and that can't be what life is for
<-*- thomas (at) apestaart (dot) org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/
More information about the gstreamer-devel
mailing list