[vlc-devel] [PATCH] extvlc option for xspf playlist and remembering what is playing when vlc is closed

Pierre d'Herbemont pdherbemont at free.fr
Tue Apr 29 14:38:23 CEST 2008


On Apr 26, 2008, at 12:46 AM, Antoine Lejeune wrote:
> From 62c345267990b221283fbeb9b794688f7d3b6e0c Mon Sep 17 00:00:00 2001
> From: Antoine Lejeune <phytos at videolan.org>
> Date: Sat, 26 Apr 2008 00:31:04 +0200
> Subject: [PATCH] Ability to remember the item playing when VLC is  
> closed so that when VLC
>  is restarted the item can restart at its last position.

Sounds mostly ok to me.

> ---
>  modules/gui/qt4/qt4.cpp             |    2 +-
>  modules/gui/wxwidgets/wxwidgets.cpp |    2 +-

What about Mac OS X?

> +int playlist_RestorePlayingItem( playlist_t *p_playlist )
> +{
> +    const char *psz_datadir = p_playlist->p_libvlc->psz_datadir;
> +    char *psz_uri = NULL;
> +    input_item_t *p_input;
> +
> +    if( !config_GetInt( p_playlist, "remember-playing-item") )
> +        return VLC_SUCCESS;
> +    if( !psz_datadir ) /* XXX: This should never happen */
> +    {
> +        msg_Err( p_playlist,
> +                "no data directory, cannot restore the last played  
> item" );
> +        return VLC_EGENERIC;
> +    }

In such a case an assert() is a good idea...

Pierre.



More information about the vlc-devel mailing list