playlist preparation
authorMaksym Veremeyenko <verem@m1stereo.tv>
Sat, 18 Jun 2011 11:29:41 +0000 (14:29 +0300)
committerMaksym Veremeyenko <verem@m1stereo.tv>
Sat, 18 Jun 2011 11:29:41 +0000 (14:29 +0300)
src/Makefile.am
src/omnplay.cpp
src/omnplay.h
src/playlist.c [new file with mode: 0644]

index 1c83cb8..3cbd28d 100644 (file)
@@ -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@
index b670129..6c726da 100644 (file)
@@ -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);
 };
index 9efdf5b..9b2a3e2 100644 (file)
@@ -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 (file)
index 0000000..686f2f6
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * playlist.c -- GTK+ 2 omnplay
+ * Copyright (C) 2011 Maksym Veremeyenko <verem@m1stereo.tv>
+ *
+ * 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 <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <pthread.h>
+
+#include "omnplay.h"
+#include "ui.h"
+
+void omnplay_playlist_load(omnplay_instance_t* app)
+{
+};
+
+void omnplay_playlist_save(omnplay_instance_t* app)
+{
+};
+