[Player-dev] CN: player/app/gtk
Nicholas Hart nhart at real.comThis has been committed to HEAD and will show up in the next current
nightly build.
It's not the final solution, but it'll make the player a little more
useful for the time being.
On Wed, 2005-03-09 at 17:01, Nicholas Hart wrote:
> The attached changes gets us some rudimentary drag-n-drop playlist
> support in the player. When files are dropped we construct a SMIL file,
> encode it into base64, and then make a "data:" URL out of it. Why?
> Because if you bookmark the "data:" URL or keep it in the MRU list then
> we auto-magically store the playlist, since it's encoded into the URL
> itself.
>
> There are two new files, playlist.cpp and playlist.h (attached), as well
> as changes to mainapp.cpp and Umakefil (below).
>
> This is for Balto (ie: HEAD).
>
> Index: Umakefil
> ===================================================================
> RCS file: /cvsroot/player/app/gtk/Umakefil,v
> retrieving revision 1.86
> diff -u -w -r1.86 Umakefil
> --- Umakefil 10 Feb 2005 18:40:54 -0000 1.86
> +++ Umakefil 10 Mar 2005 00:55:38 -0000
> @@ -209,6 +209,7 @@
>
> project.AddSources("mainapp.cpp",
> "remote.cpp",
> + "playlist.cpp",
> "prefsdialog.cpp",
> "mimetypes.cpp",
> "commonapp.cpp",
> Index: mainapp.cpp
> ===================================================================
> RCS file: /cvsroot/player/app/gtk/mainapp.cpp,v
> retrieving revision 1.93
> diff -u -w -r1.93 mainapp.cpp
> --- mainapp.cpp 29 Dec 2004 18:29:04 -0000 1.93
> +++ mainapp.cpp 10 Mar 2005 00:55:38 -0000
> @@ -122,6 +122,8 @@
> #include "switchboard.h"
> #include "setup.h"
> #include "sysinfo.h"
> +#include "playlist.h"
> +
>
> #ifdef HELIX_FEATURE_RP_SIGN_IN
> #include "signin.h"
> @@ -2669,10 +2671,10 @@
> gchar** url_list = g_strsplit((gchar*)selection_data->data, "\r\n",
> -1);
> if (url_list)
> {
> - // XXXNH: for now just use the first URL, later we'll turn them
> into
> - // a playlist
> - hxwindow_open (window, url_list[0]);
> -
> + gchar* pPlayListURL = playlist_create(url_list);
> + g_assert(pPlayListURL != NULL);
> + hxwindow_open (window, pPlayListURL);
> + g_free(pPlayListURL);
> // cleanup
> g_strfreev(url_list);
> }
--
Nicholas Hart
nhart at real.com
Technical Lead, Helix Player
https://player.helixcommunity.org
http://www.real.com