|
a/libupnpp/control/avtransport.hxx |
|
b/libupnpp/control/avtransport.hxx |
|
... |
|
... |
52 |
enum TransportStatus {TPS_Unknown, TPS_Ok, TPS_Error};
|
52 |
enum TransportStatus {TPS_Unknown, TPS_Ok, TPS_Error};
|
53 |
enum PlayMode {PM_Unknown, PM_Normal, PM_Shuffle, PM_RepeatOne,
|
53 |
enum PlayMode {PM_Unknown, PM_Normal, PM_Shuffle, PM_RepeatOne,
|
54 |
PM_RepeatAll, PM_Random, PM_Direct1};
|
54 |
PM_RepeatAll, PM_Random, PM_Direct1};
|
55 |
|
55 |
|
56 |
|
56 |
|
57 |
int setAVTransportURI(const string& uri, const string& metadata,
|
57 |
int setAVTransportURI(const std::string& uri, const std::string& metadata,
|
58 |
int instanceID=0)
|
58 |
int instanceID=0)
|
59 |
{
|
59 |
{
|
60 |
return setURI(uri, metadata, instanceID, false);
|
60 |
return setURI(uri, metadata, instanceID, false);
|
61 |
}
|
61 |
}
|
62 |
|
62 |
|
63 |
int setNextAVTransportURI(const string& uri, const string& metadata,
|
63 |
int setNextAVTransportURI(const std::string& uri, const std::string& md,
|
64 |
int instanceID=0)
|
64 |
int instanceID=0)
|
65 |
{
|
65 |
{
|
66 |
return setURI(uri, metadata, instanceID, true);
|
66 |
return setURI(uri, md, instanceID, true);
|
67 |
}
|
67 |
}
|
68 |
|
68 |
|
69 |
int setPlayMode(PlayMode pm, int instanceID=0);
|
69 |
int setPlayMode(PlayMode pm, int instanceID=0);
|
|
|
70 |
|
70 |
struct MediaInfo {
|
71 |
struct MediaInfo {
|
71 |
int nrtracks;
|
72 |
int nrtracks;
|
72 |
int mduration; // seconds
|
73 |
int mduration; // seconds
|
73 |
std::string cururi;
|
74 |
std::string cururi;
|
74 |
UPnPDirObject curmeta;
|
75 |
UPnPDirObject curmeta;
|
|
... |
|
... |
113 |
int getTransportSettings(TransportSettings& info, int instanceID=0);
|
114 |
int getTransportSettings(TransportSettings& info, int instanceID=0);
|
114 |
|
115 |
|
115 |
int stop(int instanceID=0);
|
116 |
int stop(int instanceID=0);
|
116 |
int pause(int instanceID=0);
|
117 |
int pause(int instanceID=0);
|
117 |
int play(int speed = 1, int instanceID = 0);
|
118 |
int play(int speed = 1, int instanceID = 0);
|
|
|
119 |
|
118 |
enum SeekMode {SEEK_TRACK_NR, SEEK_ABS_TIME,
|
120 |
enum SeekMode {SEEK_TRACK_NR, SEEK_ABS_TIME,
|
119 |
SEEK_REL_TIME, SEEK_ABS_COUNT,
|
121 |
SEEK_REL_TIME, SEEK_ABS_COUNT,
|
120 |
SEEK_REL_COUNT, SEEK_CHANNEL_FREQ,
|
122 |
SEEK_REL_COUNT, SEEK_CHANNEL_FREQ,
|
121 |
SEEK_TAPE_INDEX, SEEK_FRAME};
|
123 |
SEEK_TAPE_INDEX, SEEK_FRAME};
|
122 |
// Target in seconds for times.
|
124 |
// Target in seconds for times.
|
|
... |
|
... |
131 |
|
133 |
|
132 |
/** Test service type from discovery message */
|
134 |
/** Test service type from discovery message */
|
133 |
static bool isAVTService(const std::string& st);
|
135 |
static bool isAVTService(const std::string& st);
|
134 |
|
136 |
|
135 |
protected:
|
137 |
protected:
|
136 |
static const string SType;
|
138 |
static const std::string SType;
|
137 |
int setURI(const string& uri, const string& metadata,
|
139 |
int setURI(const std::string& uri, const std::string& metadata,
|
138 |
int instanceID, bool next);
|
140 |
int instanceID, bool next);
|
139 |
private:
|
141 |
private:
|
140 |
void evtCallback(const std::unordered_map<std::string, std::string>&);
|
142 |
void evtCallback(const std::unordered_map<std::string, std::string>&);
|
141 |
void registerCallback();
|
143 |
void registerCallback();
|
142 |
|
144 |
|