Commit 7066ed29 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

cppcx: Fix slave API build

parent 1ef3ed66
......@@ -128,17 +128,17 @@ namespace libVLCX
{
}
bool addSlave(MediaSlave::Type type, unsigned priority, Platform::String^ uri)
bool Media::addSlave(SlaveType type, unsigned priority, Platform::String^ uri)
{
m_media.addSlave(type, priority, FromPlatformString(uri));
return m_media.addSlave((VLC::MediaSlave::Type)type, priority, FromPlatformString(uri));
}
void slavesClear()
void Media::slavesClear()
{
m_media.slavesClear();
}
Platform::Foundation::Collections::IVector<MediaSlave^>^ slaves() const
Windows::Foundation::Collections::IVector<MediaSlave^>^ Media::slaves()
{
return MarshallVector<MediaSlave, VLC::MediaSlave>(m_media.slaves());
}
......
......@@ -326,7 +326,7 @@ namespace libVLCX
*
* \return true on success, false on error.
*/
bool addSlave(MediaSlave::Type type, unsigned priority, Platform::String^ uri);
bool addSlave(SlaveType type, unsigned priority, Platform::String^ uri);
/**
* Clear all slaves previously added by addSlave() or
......@@ -349,7 +349,7 @@ namespace libVLCX
*
* \return a vector of MediaSlave
*/
Platform::Foundation::Collections::IVector<MediaSlave^>^ slaves() const;
Windows::Foundation::Collections::IVector<MediaSlave^>^ slaves();
private:
~Media(){}
......
......@@ -258,17 +258,17 @@ namespace libVLCX
m_uri = ToPlatformString(m_obj.uri());
}
Type MediaSlave::type() const
SlaveType MediaSlave::type()
{
return (Type)m_obj.type();
return (SlaveType)m_obj.type();
}
unsigned MediaSlave::priority() const
unsigned MediaSlave::priority()
{
return m_obj.priority();
}
Platform::String^ MediaSlave::uri() const
Platform::String^ MediaSlave::uri()
{
return m_uri;
}
......
......@@ -190,6 +190,12 @@ namespace libVLCX
int64_t m_startTime;
};
public enum class SlaveType
{
Subtitle = VLC::MediaSlave::Type::Subtitle,
Audio = VLC::MediaSlave::Type::Audio,
};
public ref class MediaSlave sealed
{
private:
......@@ -200,17 +206,8 @@ namespace libVLCX
explicit MediaSlave(const VLC::MediaSlave& slave);
public:
public enum class Type
{
Subtitle = VLC::MediaSlave::Subtitle,
Audio = VLC::MediaSlave::Audio
}
Type type() const;
unsigned priority() const;
Platform::String^ uri() const;
SlaveType type();
unsigned priority();
Platform::String^ uri();
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment