[MPlayer-cvslog] r37497 - in trunk/gui/ui: actions.c actions.h
ib
subversion at mplayerhq.hu
Tue Sep 8 11:51:22 CEST 2015
Author: ib
Date: Tue Sep 8 11:51:22 2015
New Revision: 37497
Log:
Add uiSetFileFromPlaylist().
Make use of the new title, start and stop time information. Ensure that
the information is applied when an item from the playlist is being used.
Modified:
trunk/gui/ui/actions.c
trunk/gui/ui/actions.h
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Tue Sep 8 11:44:37 2015 (r37496)
+++ trunk/gui/ui/actions.c Tue Sep 8 11:51:22 2015 (r37497)
@@ -34,7 +34,6 @@
#include "gui/app/gui.h"
#include "gui/dialog/dialog.h"
#include "gui/skin/skin.h"
-#include "gui/util/list.h"
#include "gui/util/mem.h"
#include "gui/util/string.h"
#include "gui/wm/ws.h"
@@ -712,6 +711,24 @@ void uiChangeSkin(char *name)
}
/**
+ * @brief Set the file to be played from a playlist item.
+ *
+ * @note This allows a file to be played partially (seeking before playback
+ * and stopping before its end).
+ *
+ * @param item pointer to the playlist item
+ *
+ * @note All #guiInfo members associated with the file will be cleared.
+ */
+void uiSetFileFromPlaylist(plItem *item)
+{
+ uiSetFile(item->path, item->name, STREAMTYPE_FILE);
+ guiInfo.Start = item->start;
+ guiInfo.Stop = item->stop;
+ guiInfo.Title = gstrdup(item->title);
+}
+
+/**
* @brief Set the file to be played.
*
* @param dir directory (optional, else NULL)
Modified: trunk/gui/ui/actions.h
==============================================================================
--- trunk/gui/ui/actions.h Tue Sep 8 11:44:37 2015 (r37496)
+++ trunk/gui/ui/actions.h Tue Sep 8 11:51:22 2015 (r37497)
@@ -19,6 +19,8 @@
#ifndef MPLAYER_GUI_ACTIONS_H
#define MPLAYER_GUI_ACTIONS_H
+#include "gui/util/list.h"
+
extern int uiLoadPlay;
void uiAbsSeek(float sec);
@@ -33,6 +35,7 @@ void uiPlay(void);
void uiPrev(void);
void uiRelSeek(float sec);
void uiSetFile(const char *dir, const char *name, int type);
+void uiSetFileFromPlaylist(plItem *item);
void uiState(void);
void uiUnsetFile(void);
void uiUnsetMedia(int totals);
More information about the MPlayer-cvslog
mailing list