[vlc-commits] demux: adaptive: prefix role constants conflicting with wingdi
Francois Cartegnie
git at videolan.org
Mon May 20 11:40:17 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May 20 11:21:46 2019 +0200| [01d7e8125abbd0f4d64ed5f00ef5a36f26dcfc0e] | committer: Francois Cartegnie
demux: adaptive: prefix role constants conflicting with wingdi
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=01d7e8125abbd0f4d64ed5f00ef5a36f26dcfc0e
---
modules/demux/adaptive/playlist/Role.cpp | 10 +++++-----
modules/demux/adaptive/playlist/Role.hpp | 16 ++++++++--------
modules/demux/dash/mpd/IsoffMainParser.cpp | 14 +++++++-------
modules/demux/hls/playlist/Parser.cpp | 8 ++++----
4 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/modules/demux/adaptive/playlist/Role.cpp b/modules/demux/adaptive/playlist/Role.cpp
index 828455a571..6e1fd6c556 100644
--- a/modules/demux/adaptive/playlist/Role.cpp
+++ b/modules/demux/adaptive/playlist/Role.cpp
@@ -38,13 +38,13 @@ bool Role::operator ==(const Role &other) const
bool Role::isDefault() const
{
- return value == MAIN;
+ return value == ROLE_MAIN;
}
bool Role::autoSelectable() const
{
- return value == MAIN ||
- value == ALTERNATE ||
- value == SUBTITLE ||
- value == CAPTION;
+ return value == ROLE_MAIN ||
+ value == ROLE_ALTERNATE ||
+ value == ROLE_SUBTITLE ||
+ value == ROLE_CAPTION;
}
diff --git a/modules/demux/adaptive/playlist/Role.hpp b/modules/demux/adaptive/playlist/Role.hpp
index 6b703c7d85..ddf44345ca 100644
--- a/modules/demux/adaptive/playlist/Role.hpp
+++ b/modules/demux/adaptive/playlist/Role.hpp
@@ -27,14 +27,14 @@ namespace adaptive
class Role
{
public:
- static const unsigned MAIN = 0;
- static const unsigned ALTERNATE = 1;
- static const unsigned SUPPLEMENTARY = 2;
- static const unsigned COMMENTARY = 3;
- static const unsigned DUB = 4;
- static const unsigned CAPTION = 5;
- static const unsigned SUBTITLE = 6;
- Role(unsigned = ALTERNATE);
+ static const unsigned ROLE_MAIN = 0;
+ static const unsigned ROLE_ALTERNATE = 1;
+ static const unsigned ROLE_SUPPLEMENTARY = 2;
+ static const unsigned ROLE_COMMENTARY = 3;
+ static const unsigned ROLE_DUB = 4;
+ static const unsigned ROLE_CAPTION = 5;
+ static const unsigned ROLE_SUBTITLE = 6;
+ Role(unsigned = ROLE_ALTERNATE);
bool operator==(const Role &) const;
bool isDefault() const;
bool autoSelectable() const;
diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index b2ae86d440..4197026c0c 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -252,19 +252,19 @@ void IsoffMainParser::parseAdaptationSets (Node *periodNode, Period *period)
const std::string &rolevalue = role->getAttributeValue("value");
adaptationSet->description.Set(rolevalue);
if(rolevalue == "main")
- adaptationSet->setRole(Role::MAIN);
+ adaptationSet->setRole(Role::ROLE_MAIN);
else if(rolevalue == "alternate")
- adaptationSet->setRole(Role::ALTERNATE);
+ adaptationSet->setRole(Role::ROLE_ALTERNATE);
else if(rolevalue == "supplementary")
- adaptationSet->setRole(Role::SUPPLEMENTARY);
+ adaptationSet->setRole(Role::ROLE_SUPPLEMENTARY);
else if(rolevalue == "commentary")
- adaptationSet->setRole(Role::COMMENTARY);
+ adaptationSet->setRole(Role::ROLE_COMMENTARY);
else if(rolevalue == "dub")
- adaptationSet->setRole(Role::DUB);
+ adaptationSet->setRole(Role::ROLE_DUB);
else if(rolevalue == "caption")
- adaptationSet->setRole(Role::CAPTION);
+ adaptationSet->setRole(Role::ROLE_CAPTION);
else if(rolevalue == "subtitle")
- adaptationSet->setRole(Role::SUBTITLE);
+ adaptationSet->setRole(Role::ROLE_SUBTITLE);
}
}
#ifdef ADAPTATIVE_ADVANCED_DEBUG
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index d1fdd8e478..1e069250b7 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -505,23 +505,23 @@ M3U8 * M3U8Parser::parse(vlc_object_t *p_object, stream_t *p_stream, const std::
if(pair.second->getAttributeByName("DEFAULT"))
{
if(pair.second->getAttributeByName("DEFAULT")->value == "YES")
- altAdaptSet->setRole(Role(Role::MAIN));
+ altAdaptSet->setRole(Role(Role::ROLE_MAIN));
else
- altAdaptSet->setRole(Role(Role::ALTERNATE));
+ altAdaptSet->setRole(Role(Role::ROLE_ALTERNATE));
}
if(pair.second->getAttributeByName("AUTOSELECT"))
{
if(pair.second->getAttributeByName("AUTOSELECT")->value == "NO" &&
!pair.second->getAttributeByName("DEFAULT"))
- altAdaptSet->setRole(Role(Role::SUPPLEMENTARY));
+ altAdaptSet->setRole(Role(Role::ROLE_SUPPLEMENTARY));
}
/* Subtitles unsupported for now */
const Attribute *typeattr = pair.second->getAttributeByName("TYPE");
if(typeattr->value == "SUBTITLES")
{
- altAdaptSet->setRole(Role(Role::SUBTITLE));
+ altAdaptSet->setRole(Role(Role::ROLE_SUBTITLE));
}
else if(typeattr->value != "AUDIO" && typeattr->value != "VIDEO")
{
More information about the vlc-commits
mailing list