From 85f2c09e98e0f0a658ce162ada362274b90a72d9 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko Date: Sat, 18 Jun 2011 14:29:41 +0300 Subject: [PATCH] playlist preparation --- src/Makefile.am | 1 + src/omnplay.cpp | 7 +++++++ src/omnplay.h | 2 ++ src/playlist.c | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 src/playlist.c diff --git a/src/Makefile.am b/src/Makefile.am index 1c83cb8..3cbd28d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,6 +13,7 @@ omnplay_SOURCES = \ ui.c ui.h ui_utils.h \ ui_buttons.c ui_buttons.h \ opts.c opts.h \ + playlist.c \ omnplay.cpp omnplay.h omnplay_LDADD = @GTHREAD_LIBS@ @GTK_LIBS@ @OM_LIBS@ diff --git a/src/omnplay.cpp b/src/omnplay.cpp index b670129..6c726da 100644 --- a/src/omnplay.cpp +++ b/src/omnplay.cpp @@ -205,7 +205,11 @@ static gboolean omnplay_button_click(omnplay_instance_t* app, control_buttons_t case BUTTON_PLAYLIST_ITEM_DEL: case BUTTON_PLAYLIST_ITEM_EDIT: case BUTTON_PLAYLIST_LOAD: + omnplay_playlist_load(app); + break; case BUTTON_PLAYLIST_SAVE: + omnplay_playlist_save(app); + break; case BUTTON_PLAYLIST_BLOCK_SINGLE: case BUTTON_PLAYLIST_BLOCK_LOOP: case BUTTON_PLAYLIST_ITEM_UP: @@ -277,4 +281,7 @@ void omnplay_release(omnplay_instance_t* app) pthread_mutex_destroy(&app->players.item[i].lock); }; + + /* create lock */ + pthread_mutex_destroy(&app->playlist.lock); }; diff --git a/src/omnplay.h b/src/omnplay.h index 9efdf5b..9b2a3e2 100644 --- a/src/omnplay.h +++ b/src/omnplay.h @@ -140,6 +140,8 @@ omnplay_instance_t* omnplay_create(int argc, char** argv); void omnplay_init(omnplay_instance_t* app); void omnplay_release(omnplay_instance_t* app); void omnplay_destroy(omnplay_instance_t* app); +void omnplay_playlist_load(omnplay_instance_t* app); +void omnplay_playlist_save(omnplay_instance_t* app); #ifdef __cplusplus }; diff --git a/src/playlist.c b/src/playlist.c new file mode 100644 index 0000000..686f2f6 --- /dev/null +++ b/src/playlist.c @@ -0,0 +1,41 @@ +/* + * playlist.c -- GTK+ 2 omnplay + * Copyright (C) 2011 Maksym Veremeyenko + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include + +#include "omnplay.h" +#include "ui.h" + +void omnplay_playlist_load(omnplay_instance_t* app) +{ +}; + +void omnplay_playlist_save(omnplay_instance_t* app) +{ +}; + -- 1.7.4.4