NxPlayer: Misc changes to better integrate with NxWM::CMediaPlayer

This commit is contained in:
Gregory Nutt 2014-07-23 18:21:08 -06:00
parent b374046933
commit a2faaa1f32
3 changed files with 24 additions and 7 deletions

View File

@ -97,7 +97,7 @@ extern "C"
* Name: nsh_initialize * Name: nsh_initialize
* *
* Description: * Description:
* This nterfaces is used to initialize the NuttShell (NSH). * This interface is used to initialize the NuttShell (NSH).
* nsh_initialize() should be called one during application start-up prior * nsh_initialize() should be called one during application start-up prior
* to executing either nsh_consolemain() or nsh_telnetstart(). * to executing either nsh_consolemain() or nsh_telnetstart().
* *
@ -132,7 +132,7 @@ void nsh_initialize(void);
* Returned Values: * Returned Values:
* This function does not normally return. exit() is usually called to * This function does not normally return. exit() is usually called to
* terminate the NSH session. This function will return in the event of * terminate the NSH session. This function will return in the event of
* an error. In that case, a nonzero value is returned (EXIT_FAILURE=1). * an error. In that case, a non-zero value is returned (EXIT_FAILURE=1).
* *
****************************************************************************/ ****************************************************************************/

View File

@ -89,6 +89,18 @@ typedef int (*nxplayer_func)(FAR struct nxplayer_s* pPlayer, char* pargs);
* Public Data * Public Data
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/**************************************************************************** /****************************************************************************
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
@ -165,7 +177,7 @@ void nxplayer_reference(FAR struct nxplayer_s *pPlayer);
* *
**************************************************************************/ **************************************************************************/
int nxplayer_setdevice(FAR struct nxplayer_s *pPlayer, char* device); int nxplayer_setdevice(FAR struct nxplayer_s *pPlayer, FAR const char *device);
/**************************************************************************** /****************************************************************************
* Name: nxplayer_playfile * Name: nxplayer_playfile
@ -188,8 +200,8 @@ int nxplayer_setdevice(FAR struct nxplayer_s *pPlayer, char* device);
* *
**************************************************************************/ **************************************************************************/
int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, char* filename, int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, FAR char *filename,
int filefmt, int subfmt); int filefmt, int subfmt);
/**************************************************************************** /****************************************************************************
* Name: nxplayer_stop * Name: nxplayer_stop
@ -296,7 +308,7 @@ int nxplayer_setbalance(FAR struct nxplayer_s *pPlayer, uint16_t balance);
* *
**************************************************************************/ **************************************************************************/
inline void nxplayer_setmediadir(FAR struct nxplayer_s *pPlayer, char* mediadir); void nxplayer_setmediadir(FAR struct nxplayer_s *pPlayer, FAR char *mediadir);
/**************************************************************************** /****************************************************************************
* Name: nxplayer_setbass * Name: nxplayer_setbass
@ -354,4 +366,9 @@ int nxplayer_settreble(FAR struct nxplayer_s *pPlayer, uint8_t treble);
int nxplayer_systemreset(FAR struct nxplayer_s *pPlayer); int nxplayer_systemreset(FAR struct nxplayer_s *pPlayer);
#endif #endif
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* __APPS_SYSTEM_NXPLAYER_NXPLAYER_H */ #endif /* __APPS_SYSTEM_NXPLAYER_NXPLAYER_H */

View File

@ -1120,7 +1120,7 @@ int nxplayer_resume(FAR struct nxplayer_s *pPlayer)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE #ifdef CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE
int nxplayer_setdevice(FAR struct nxplayer_s *pPlayer, char* pDevice) int nxplayer_setdevice(FAR struct nxplayer_s *pPlayer, FAR const char *pDevice)
{ {
int tempFd; int tempFd;
struct audio_caps_s caps; struct audio_caps_s caps;