Commit 12cbd4c8 authored by Clément Stenac's avatar Clément Stenac

* include/vlc_playlist.h

  src/playlist/playlist.c:
     * Implemented a boolean b_enabled to disable a playlist item
     * Implemented the idea of group (p_item->i_group), that allows
       to enable/disable and to sort some series of items
     * Implemented an unused (at the moment), psz_author field
     * Started to implement a new playlist format to store all of these

* modules/gui/wxwindows/interface.cpp:
     Added a hiddeable panel to put some important options.
     (Menu Preferences->Extra GUI)
     At the moment, we put the adjust filter and aspect ratio, and must
     decide what options we want here

* modules/gui/wxwindows/playlist.cpp
  modules/gui/wxwindows/iteminfo.cpp:
     Added "Enable/disable group button", options to enable/disable selection
     Added an item info dialog box

* modules/misc/sap.c :
     Added a sap-group-id option: the SAP playlist items are in a separate group
     (defaults to 42)

* modules/visualization/visual/effects.c:
     Minor coding style fixes

Todo:
-----

* Advanced sort (alphabetical and/or by group)
* Ability to load 0_6 playlists
* Really use the libid3tag
parent de2868c4
......@@ -2,7 +2,7 @@
* vlc_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_playlist.h,v 1.13 2003/09/08 12:02:16 zorglub Exp $
* $Id: vlc_playlist.h,v 1.14 2003/10/06 16:23:30 zorglub Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -48,10 +48,15 @@ struct playlist_item_t
* ppsz_options array */
int i_type; /**< unused yet */
int i_status; /**< unused yet */
vlc_bool_t b_autodeletion; /**< Indicates wether this item is to
vlc_bool_t b_autodeletion; /**< Indicates whther this item is to
* be deleted after playback. True mean
* that this item is to be deleted
* after playback, false otherwise */
vlc_bool_t b_enabled; /**< Indicates whether this item is to be
* played or skipped */
int i_group; /**< unused yet */
char * psz_author; /**< Author */
};
/**
......@@ -73,7 +78,7 @@ struct playlist_t
int i_index; /**< current index into the playlist */
playlist_status_t i_status; /**< current status of playlist */
int i_size; /**< total size of the list */
int i_enabled; /**< How many items are enabled ? */
playlist_item_t ** pp_items; /**< array of pointers to the
* playlist items */
......@@ -85,6 +90,9 @@ struct playlist_t
#define SORT_NORMAL 0
#define SORT_REVERSE 1
#define PLAYLIST_TYPE_MANUAL 0
#define PLAYLIST_TYPE_SAP 1
/*****************************************************************************
* Prototypes
*****************************************************************************/
......@@ -105,6 +113,10 @@ VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char **,
VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, mtime_t, const char **, int, int, int ) );
VLC_EXPORT( int, playlist_AddItem, ( playlist_t *, playlist_item_t *, int, int ) );
VLC_EXPORT( int, playlist_Delete, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_Disable, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_Enable, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_DisableGroup, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_EnableGroup, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_Sort, ( playlist_t *, int) );
VLC_EXPORT( int, playlist_Move, ( playlist_t *, int, int ) );
VLC_EXPORT( int, playlist_LoadFile, ( playlist_t *, const char * ) );
......
......@@ -7,6 +7,7 @@ SOURCES_wxwindows = \
streamout.cpp \
messages.cpp \
playlist.cpp \
iteminfo.cpp \
menus.cpp \
preferences.cpp \
timer.cpp \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.62 2003/09/22 14:40:10 zorglub Exp $
* $Id: wxwindows.h,v 1.63 2003/10/06 16:23:30 zorglub Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -141,19 +141,33 @@ public:
virtual ~Interface();
void TogglePlayButton( int i_playing_status );
// wxFlexGridSizer *frame_sizer;
wxBoxSizer *frame_sizer;
wxStatusBar *statusbar;
wxSlider *slider;
wxWindow *slider_frame;
wxWindow *extra_frame;
wxStaticBox *slider_box;
vlc_bool_t b_extra;
wxStaticBox *adjust_box;
wxSlider *brightness_slider;
wxSlider *contrast_slider;
wxSlider *saturation_slider;
wxSlider *hue_slider;
wxStaticBox *other_box;
wxComboBox *ratio_combo;
wxGauge *volctrl;
private:
void UpdateAcceleratorTable();
void CreateOurMenuBar();
void CreateOurToolBar();
void CreateOurExtraPanel();
void CreateOurSlider();
void Open( int i_access_method );
......@@ -167,6 +181,7 @@ private:
void OnOpenNet( wxCommandEvent& event );
void OnOpenSat( wxCommandEvent& event );
void OnOpenV4L( wxCommandEvent& event );
void OnExtra( wxCommandEvent& event );
void OnShowDialog( wxCommandEvent& event );
void OnPlayStream( wxCommandEvent& event );
void OnStopStream( wxCommandEvent& event );
......@@ -176,6 +191,14 @@ private:
void OnSlowStream( wxCommandEvent& event );
void OnFastStream( wxCommandEvent& event );
void OnEnableAdjust( wxCommandEvent& event );
void OnHueUpdate( wxScrollEvent& event );
void OnContrastUpdate( wxScrollEvent& event );
void OnBrightnessUpdate( wxScrollEvent& event );
void OnSaturationUpdate( wxScrollEvent& event );
void OnRatio( wxCommandEvent& event );
void OnMenuOpen( wxMenuEvent& event );
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
......@@ -638,6 +661,7 @@ private:
};
/* Playlist */
class ItemInfoDialog;
class Playlist: public wxFrame
{
public:
......@@ -661,9 +685,13 @@ private:
void OnRSort( wxCommandEvent& event );
void OnClose( wxCommandEvent& event );
void OnSearch( wxCommandEvent& event );
void OnEnDis( wxCommandEvent& event );
void OnInfos( wxCommandEvent& event );
void OnSearchTextChange( wxCommandEvent& event );
void OnOpen( wxCommandEvent& event );
void OnSave( wxCommandEvent& event );
void OnEnableSelection( wxCommandEvent& event );
void OnDisableSelection( wxCommandEvent& event );
void OnInvertSelection( wxCommandEvent& event );
void OnDeleteSelection( wxCommandEvent& event );
void OnSelectAll( wxCommandEvent& event );
......@@ -678,11 +706,56 @@ private:
wxButton *search_button;
DECLARE_EVENT_TABLE();
ItemInfoDialog *iteminfo_dialog;
intf_thread_t *p_intf;
wxListView *listview;
int i_update_counter;
};
/* ItemInfo Dialog */
class ItemInfoDialog: public wxDialog
{
public:
/* Constructor */
ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
wxWindow *p_parent );
virtual ~ItemInfoDialog();
wxArrayString GetOptions();
private:
wxPanel *InfoPanel( wxWindow* parent );
wxPanel *GroupPanel( wxWindow* parent );
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
void OnCancel( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
playlist_item_t *p_item;
wxWindow *p_parent;
/* Controls for the iteminfo dialog box */
wxPanel *info_subpanel;
wxPanel *info_panel;
wxPanel *group_subpanel;
wxPanel *group_panel;
wxTextCtrl *uri_text;
wxTextCtrl *name_text;
wxTextCtrl *author_text;
wxCheckBox *enabled_checkbox;
wxSpinCtrl *group_spin;
};
/* File Info */
class FileInfo: public wxFrame
{
......
......@@ -2,7 +2,7 @@
* sap.c : SAP interface module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: sap.c,v 1.23 2003/09/15 08:33:29 zorglub Exp $
* $Id: sap.c,v 1.24 2003/10/06 16:23:30 zorglub Exp $
*
* Authors: Arnaud Schauly <gitan@via.ecp.fr>
* Clment Stenac <zorglub@via.ecp.fr>
......@@ -160,6 +160,9 @@ struct attr_descr_t
#define SAP_IPV6_LONGTEXT N_("Set this if you want SAP to listen for IPv6 announces")
#define SAP_SCOPE_TEXT N_("IPv6 SAP scope")
#define SAP_SCOPE_LONGTEXT N_("Sets the scope for IPv6 announces (default is 8)")
#define SAP_GROUP_ID_TEXT N_("SAP Playlist group ID")
#define SAP_GROUP_ID_LONGTEXT N_("Sets the default group ID in which" \
"SAP items are put" )
vlc_module_begin();
add_category_hint( N_("SAP"), NULL, VLC_TRUE );
......@@ -175,6 +178,9 @@ vlc_module_begin();
add_string( "sap-ipv6-scope", "8" , NULL,
SAP_SCOPE_TEXT, SAP_SCOPE_LONGTEXT, VLC_TRUE);
add_integer( "sap-group-id", 42, NULL,
SAP_GROUP_ID_TEXT, SAP_GROUP_ID_LONGTEXT, VLC_TRUE);
set_description( _("SAP interface") );
set_capability( "interface", 0 );
set_callbacks( Activate, NULL);
......@@ -463,6 +469,9 @@ static int sess_toitem( intf_thread_t * p_intf, sess_descr_t * p_sd )
if( p_item )
{
p_item->i_group = config_GetInt( p_intf, "sap-group-id" );
p_item->b_enabled = VLC_TRUE;
p_item->psz_author = NULL;
p_playlist = vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
......
......@@ -2,7 +2,7 @@
* effects.c : Effects for the visualization system
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: effects.c,v 1.7 2003/09/20 00:37:53 fenrir Exp $
* $Id: effects.c,v 1.8 2003/10/06 16:23:30 zorglub Exp $
*
* Authors: Clment Stenac <zorglub@via.ecp.fr>
*
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment