Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
libvlcpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
libvlcpp
Commits
8a3476b8
Commit
8a3476b8
authored
Jun 28, 2016
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MSVC2013 build
parent
d2bf3309
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
vlcpp/Instance.hpp
vlcpp/Instance.hpp
+17
-2
vlcpp/Media.hpp
vlcpp/Media.hpp
+4
-0
No files found.
vlcpp/Instance.hpp
View file @
8a3476b8
...
@@ -44,9 +44,15 @@ using Question = libvlc_dialog_question_type;
...
@@ -44,9 +44,15 @@ using Question = libvlc_dialog_question_type;
namespace
DialogType
namespace
DialogType
{
{
#if !defined(_MSC_VER) || _MSC_VER >= 1900
static
constexpr
Question
normal
=
LIBVLC_DIALOG_QUESTION_NORMAL
;
static
constexpr
Question
normal
=
LIBVLC_DIALOG_QUESTION_NORMAL
;
static
constexpr
Question
warning
=
LIBVLC_DIALOG_QUESTION_WARNING
;
static
constexpr
Question
warning
=
LIBVLC_DIALOG_QUESTION_WARNING
;
static
constexpr
Question
critical
=
LIBVLC_DIALOG_QUESTION_CRITICAL
;
static
constexpr
Question
critical
=
LIBVLC_DIALOG_QUESTION_CRITICAL
;
#else
static
const
Question
normal
=
LIBVLC_DIALOG_QUESTION_NORMAL
;
static
const
Question
warning
=
LIBVLC_DIALOG_QUESTION_WARNING
;
static
const
Question
critical
=
LIBVLC_DIALOG_QUESTION_CRITICAL
;
#endif
}
}
#endif
#endif
...
@@ -373,6 +379,7 @@ public:
...
@@ -373,6 +379,7 @@ public:
}
}
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
#if !defined(_MSC_VER) || _MSC_VER >= 1900
/**
/**
* Called when an error message needs to be displayed.
* Called when an error message needs to be displayed.
*
*
...
@@ -449,7 +456,14 @@ public:
...
@@ -449,7 +456,14 @@ public:
* \param text new text of the progress dialog
* \param text new text of the progress dialog
*/
*/
using
UpdtProgressCb
=
void
(
Dialog
&&
dialog
,
float
position
,
std
::
string
&&
text
);
using
UpdtProgressCb
=
void
(
Dialog
&&
dialog
,
float
position
,
std
::
string
&&
text
);
#else
typedef
void
(
*
ErrorCb
)(
std
::
string
&&
title
,
std
::
string
&&
text
);
typedef
void
(
*
LoginCb
)(
Dialog
&&
dialog
,
std
::
string
&&
title
,
std
::
string
&&
text
,
std
::
string
&&
defaultUserName
,
bool
askToStore
);
typedef
void
(
*
QuestionCb
)(
Dialog
&&
dialog
,
std
::
string
&&
title
,
std
::
string
&&
text
,
Question
qType
,
std
::
string
&&
cancel
,
std
::
string
&&
action1
,
std
::
string
&&
action2
);
typedef
void
(
*
DspProgressCb
)(
Dialog
&&
dialog
,
std
::
string
&&
title
,
std
::
string
&&
text
,
bool
intermediate
,
float
position
,
std
::
string
&&
cancel
);
typedef
void
(
*
CancelCb
)(
Dialog
&&
dialog
);
typedef
void
(
*
UpdtProgressCb
)(
Dialog
&&
dialog
,
float
position
,
std
::
string
&&
text
);
#endif
/**
/**
* Replaces all the dialog callbacks for this Instance instance
* Replaces all the dialog callbacks for this Instance instance
*
*
...
@@ -463,13 +477,14 @@ public:
...
@@ -463,13 +477,14 @@ public:
template
<
class
Error
,
class
Login
,
class
Question
,
class
DspProgress
,
class
Cancel
,
class
UpdtProgress
>
template
<
class
Error
,
class
Login
,
class
Question
,
class
DspProgress
,
class
Cancel
,
class
UpdtProgress
>
void
setDialogHandlers
(
Error
&&
error
,
Login
&&
login
,
Question
&&
question
,
DspProgress
&&
dspProgress
,
Cancel
&&
cancel
,
UpdtProgress
&&
updtProgress
)
void
setDialogHandlers
(
Error
&&
error
,
Login
&&
login
,
Question
&&
question
,
DspProgress
&&
dspProgress
,
Cancel
&&
cancel
,
UpdtProgress
&&
updtProgress
)
{
{
#if !defined(_MSC_VER) || _MSC_VER >= 1900
static_assert
(
signature_match_or_nullptr
<
Error
,
ErrorCb
>::
value
,
"Mismatched error display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Error
,
ErrorCb
>::
value
,
"Mismatched error display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Login
,
LoginCb
>::
value
,
"Mismatched login display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Login
,
LoginCb
>::
value
,
"Mismatched login display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Question
,
QuestionCb
>::
value
,
"Mismatched question display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Question
,
QuestionCb
>::
value
,
"Mismatched question display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
DspProgress
,
DspProgressCb
>::
value
,
"Mismatched progress display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
DspProgress
,
DspProgressCb
>::
value
,
"Mismatched progress display callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Cancel
,
CancelCb
>::
value
,
"Mismatched cancel callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
Cancel
,
CancelCb
>::
value
,
"Mismatched cancel callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
UpdtProgress
,
UpdtProgressCb
>::
value
,
"Mismatched update progress callback prototype"
);
static_assert
(
signature_match_or_nullptr
<
UpdtProgress
,
UpdtProgressCb
>::
value
,
"Mismatched update progress callback prototype"
);
#endif
libvlc_dialog_cbs
tmp
=
{
libvlc_dialog_cbs
tmp
=
{
CallbackWrapper
<
(
unsigned
)
CallbackIdx
::
ErrorDisplay
,
decltype
(
libvlc_dialog_cbs
::
pf_display_error
)
>::
wrap
(
*
m_callbacks
,
std
::
forward
<
Error
>
(
error
)),
CallbackWrapper
<
(
unsigned
)
CallbackIdx
::
ErrorDisplay
,
decltype
(
libvlc_dialog_cbs
::
pf_display_error
)
>::
wrap
(
*
m_callbacks
,
std
::
forward
<
Error
>
(
error
)),
CallbackWrapper
<
(
unsigned
)
CallbackIdx
::
LoginDisplay
,
decltype
(
libvlc_dialog_cbs
::
pf_display_login
)
>::
wrap
(
*
m_callbacks
,
std
::
forward
<
Login
>
(
login
)),
CallbackWrapper
<
(
unsigned
)
CallbackIdx
::
LoginDisplay
,
decltype
(
libvlc_dialog_cbs
::
pf_display_login
)
>::
wrap
(
*
m_callbacks
,
std
::
forward
<
Login
>
(
login
)),
...
...
vlcpp/Media.hpp
View file @
8a3476b8
...
@@ -760,7 +760,11 @@ private:
...
@@ -760,7 +760,11 @@ private:
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
inline
VLC
::
Media
::
ParseFlags
operator
|
(
Media
::
ParseFlags
l
,
Media
::
ParseFlags
r
)
inline
VLC
::
Media
::
ParseFlags
operator
|
(
Media
::
ParseFlags
l
,
Media
::
ParseFlags
r
)
{
{
#if !defined(_MSC_VER) || _MSC_VER >= 1900
using
T
=
typename
std
::
underlying_type
<
Media
::
ParseFlags
>::
type
;
using
T
=
typename
std
::
underlying_type
<
Media
::
ParseFlags
>::
type
;
#else
using
T
=
std
::
underlying_type
<
Media
::
ParseFlags
>::
type
;
#endif
return
static_cast
<
Media
::
ParseFlags
>
(
static_cast
<
T
>
(
l
)
|
static_cast
<
T
>
(
r
)
);
return
static_cast
<
Media
::
ParseFlags
>
(
static_cast
<
T
>
(
l
)
|
static_cast
<
T
>
(
r
)
);
}
}
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment