Commit 6ec7a0d9 authored by Thomas Nigro's avatar Thomas Nigro Committed by Hugo Beauzée-Luyssen

Use Title/ChapterDescription following API Changes

Signed-off-by: 's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 0a2f4e98
......@@ -417,14 +417,14 @@ namespace libVLCX
return m_mp.setSpuDelay(i_delay);
}
Windows::Foundation::Collections::IVector<TrackDescription^>^ MediaPlayer::titleDescription()
Windows::Foundation::Collections::IVector<TitleDescription^>^ MediaPlayer::titleDescription()
{
return MarshallVector<TrackDescription, VLC::TrackDescription>(m_mp.titleDescription());
return MarshallVector<TitleDescription, VLC::TitleDescription>(m_mp.titleDescription());
}
Windows::Foundation::Collections::IVector<TrackDescription^>^ MediaPlayer::chapterDescription(int i_title)
Windows::Foundation::Collections::IVector<ChapterDescription^>^ MediaPlayer::chapterDescription(int i_title)
{
return MarshallVector<TrackDescription, VLC::TrackDescription>(m_mp.chapterDescription(i_title));
return MarshallVector<ChapterDescription, VLC::ChapterDescription>(m_mp.chapterDescription(i_title));
}
Platform::String^ MediaPlayer::cropGeometry()
......
......@@ -897,7 +897,7 @@ namespace libVLCX
*
* \return list containing description of available titles
*/
Windows::Foundation::Collections::IVector<TrackDescription^>^ titleDescription();
Windows::Foundation::Collections::IVector<TitleDescription^>^ titleDescription();
/**
* Get the description of available chapters for specific title.
......@@ -907,7 +907,7 @@ namespace libVLCX
* \return list containing description of available chapter for title
* i_title
*/
Windows::Foundation::Collections::IVector<TrackDescription^>^ chapterDescription(int i_title);
Windows::Foundation::Collections::IVector<ChapterDescription^>^ chapterDescription(int i_title);
/**
* Get current crop filter geometry.
......
......@@ -179,20 +179,76 @@ namespace libVLCX
m_device = ToPlatformString(desc.device().c_str());
m_description = ToPlatformString(desc.description().c_str());
}
// TrackDescription
int TrackDescription::id()
{
return m_id;
return m_id;
}
Platform::String^ TrackDescription::name()
{
return m_name;
return m_name;
}
TrackDescription::TrackDescription(const VLC::TrackDescription& desc)
{
m_id = desc.id();
m_name = ToPlatformString(desc.name().c_str());
m_id = desc.id();
m_name = ToPlatformString(desc.name().c_str());
}
// TitleDescription
int64_t TitleDescription::duration()
{
return m_duration;
}
int TitleDescription::id()
{
return m_id;
}
Platform::String^ TitleDescription::name()
{
return m_name;
}
bool TitleDescription::isMenu()
{
return m_menu;
}
TitleDescription::TitleDescription(const VLC::TitleDescription& desc)
{
m_menu = desc.isMenu();
m_duration = desc.duration();
m_name = ToPlatformString(desc.name().c_str());
}
// Chapter decription
int ChapterDescription::id()
{
return m_id;
}
int64_t ChapterDescription::startTime()
{
return m_startTime;
}
int64_t ChapterDescription::duration()
{
return m_duration;
}
Platform::String^ ChapterDescription::name()
{
return m_name;
}
ChapterDescription::ChapterDescription(const VLC::ChapterDescription& desc)
{
m_duration = desc.duration();
m_startTime = desc.starttime();
m_name = ToPlatformString(desc.name().c_str());
}
}
......@@ -150,4 +150,43 @@ namespace libVLCX
int m_id;
Platform::String^ m_name;
};
public ref class TitleDescription sealed
{
public:
int64_t duration();
int id();
Platform::String^ name();
bool isMenu();
internal:
explicit TitleDescription(const VLC::TitleDescription& desc);
private:
int m_id;
Platform::String^ m_name;
int64_t m_duration;
bool m_menu;
};
public ref class ChapterDescription sealed
{
public:
int id();
int64_t startTime();
int64_t duration();
Platform::String^ name();
internal:
explicit ChapterDescription(const VLC::ChapterDescription& desc);
private:
int m_id;
Platform::String^ m_name;
int64_t m_duration;
int64_t m_startTime;
};
}
\ No newline at end of file
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