summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-24 15:01:05 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-24 15:01:05 -0600
commit6249b5955d7bd29c264c2be642943ef18068bc34 (patch)
tree6d2e2d249cadef687e8f3e0e27ed6308d4e1dc05 /NxWidgets/nxwm/include
parent9db3101b8c4a1f25eb08108d3e6bf7bc2156b72f (diff)
downloadnuttx-6249b5955d7bd29c264c2be642943ef18068bc34.tar.gz
nuttx-6249b5955d7bd29c264c2be642943ef18068bc34.tar.bz2
nuttx-6249b5955d7bd29c264c2be642943ef18068bc34.zip
Lots of changes to integrate with Ken's NxPlayer
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r--NxWidgets/nxwm/include/cmediaplayer.hxx25
1 files changed, 17 insertions, 8 deletions
diff --git a/NxWidgets/nxwm/include/cmediaplayer.hxx b/NxWidgets/nxwm/include/cmediaplayer.hxx
index 17b174f5d..4f664d8e5 100644
--- a/NxWidgets/nxwm/include/cmediaplayer.hxx
+++ b/NxWidgets/nxwm/include/cmediaplayer.hxx
@@ -143,10 +143,11 @@ namespace NxWM
enum EMediaPlayerState m_state; /**< Media player current state */
enum EMediaPlayerState m_prevState; /**< Media player previous state */
enum EPendingRelease m_pending; /**< Pending image release event */
+ NXWidgets::CNxString m_filePath; /**< The full path to the selected file */
+ bool m_fileReady; /**< True: Ready to play */
#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
- int m_level; /**< Current volume level */
+ uint8_t m_level; /**< Current volume level, range 0-100 */
#endif
- int m_fileIndex; /**< Index to selected file in the list box */
/**
* Media player geometry.
@@ -187,18 +188,26 @@ namespace NxWM
NXWidgets::CRlePaletteBitmap *m_volumeBitmap; /**< Volume control grip bitmap */
/**
- * Open a media file for playing. Called after a file has been selected
- * from the list box.
+ * Get the full media file path and make ready for playing. Called
+ * after a file has been selected from the list box.
*/
- inline bool openMediaFile(const NXWidgets::CListBoxDataItem *item);
+ bool getMediaFile(const NXWidgets::CListBoxDataItem *item);
/**
- * Close media file. Called when a new media file is selected, when a
- * media file is de-selected, or when destroying the media player instance.
+ * Get the full media file path and make ready for playing. Called
+ * after a file has been selected from the list box.
*/
- inline void closeMediaFile(void);
+ bool openMediaFile(const NXWidgets::CListBoxDataItem *item);
+
+ /**
+ * Stop playing the current file. Called when a new media file is selected,
+ * when a media file is de-selected, or when destroying the media player
+ * instance.
+ */
+
+ void stopPlaying(void);
/**
* Select the geometry of the media player given the current window size.