[MPlayer-cvslog] r37972 - in trunk/gui: interface.c ui/actions.c ui/actions.h
ib
subversion at mplayerhq.hu
Thu Oct 5 15:21:58 EEST 2017
Author: ib
Date: Thu Oct 5 15:21:58 2017
New Revision: 37972
Log:
Improve cue sheet playlist playback.
No matter what playback position had been selected, the displayed
title was continually the title of the currently played track. It
did not change when selecting a playback position before or after
the current track.
Check the playback position. If inside the currently played track,
display the track title, If not, display the file's name.
Modified:
trunk/gui/interface.c
trunk/gui/ui/actions.c
trunk/gui/ui/actions.h
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Thu Oct 5 14:02:14 2017 (r37971)
+++ trunk/gui/interface.c Thu Oct 5 15:21:58 2017 (r37972)
@@ -448,7 +448,8 @@ int gui(int what, void *data)
wsMouseAutohide();
gtkEvents();
- uiCueCheckNext(&last_playlistnext);
+ if (uiCueCheckNext(&last_playlistnext) == False)
+ uiCueSetTitle();
break;
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Thu Oct 5 14:02:14 2017 (r37971)
+++ trunk/gui/ui/actions.c Thu Oct 5 15:21:58 2017 (r37972)
@@ -1025,3 +1025,24 @@ int uiCueCheckNext(int *set)
} else
return False;
}
+
+/**
+ * @brief Set or unset #guiInfo member @ref guiInterface_t.Title "Title"
+ * depending on whether playback position is within the current
+ * cue sheet playlist track or not.
+ */
+void uiCueSetTitle(void)
+{
+ if (guiInfo.MediumChanged)
+ return;
+
+ if (guiInfo.Stop) {
+ if (guiInfo.ElapsedTime >= guiInfo.Start && guiInfo.ElapsedTime <= guiInfo.Stop) {
+ plItem *curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0);
+
+ if (curr && !guiInfo.Title)
+ guiInfo.Title = gstrdup(curr->title);
+ } else
+ nfree(guiInfo.Title);
+ }
+}
Modified: trunk/gui/ui/actions.h
==============================================================================
--- trunk/gui/ui/actions.h Thu Oct 5 14:02:14 2017 (r37971)
+++ trunk/gui/ui/actions.h Thu Oct 5 15:21:58 2017 (r37972)
@@ -26,6 +26,7 @@ extern int uiLoadPlay;
void uiAbsSeek(float sec);
void uiChangeSkin(char *name);
int uiCueCheckNext(int *);
+void uiCueSetTitle(void);
void uiCurr(void);
void uiEvent(int ev, float param);
void uiFullScreen(void);
More information about the MPlayer-cvslog
mailing list