#ifndef _GPAC_MEDIA_RENDER_H_
#define _GPAC_MEDIA_RENDER_H_
#include "Neptune.h"
#include "PltMediaRenderer.h"
#include "PltService.h"
class GF_UPnP;
class GPAC_MediaRenderer : public PLT_DeviceHost,
public PLT_MediaRendererDelegate
{
public:
GPAC_MediaRenderer (GF_UPnP *upnp, const char* friendly_name,
bool show_ip = false,
const char* uuid = NULL,
unsigned int port = 0);
virtual NPT_Result SetupServices();
virtual NPT_Result OnAction(PLT_ActionReference &action, const PLT_HttpRequestContext& context);
void SetDuration(Double duration, Bool can_seek);
void SetTime(Double time);
void SetConnected(const char *url);
protected:
virtual ~GPAC_MediaRenderer();
virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action);
virtual NPT_Result OnNext(PLT_ActionReference& action);
virtual NPT_Result OnPause(PLT_ActionReference& action);
virtual NPT_Result OnPlay(PLT_ActionReference& action);
virtual NPT_Result OnPrevious(PLT_ActionReference& action);
virtual NPT_Result OnSeek(PLT_ActionReference& action);
virtual NPT_Result OnStop(PLT_ActionReference& action);
virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action);
virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action);
virtual NPT_Result OnSetVolume(PLT_ActionReference& action);
virtual NPT_Result OnSetVolumeDB(PLT_ActionReference& action);
virtual NPT_Result OnSetMute(PLT_ActionReference& action);
virtual NPT_Result OnGetVolumeDBRange(PLT_ActionReference &action);
private:
GF_UPnP *m_pUPnP;
Bool m_connected;
PLT_Service *m_pAVService;
PLT_Service *m_pMigrationService;
GF_List *m_mediaHistoryList;
u32 m_track_pos;
NPT_String m_ip_src;
Double m_Duration, m_Time;
};
#endif