Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alaric Sénat
libvlcpp
Commits
b0e7d093
Commit
b0e7d093
authored
Nov 03, 2021
by
Hugo Beauzée-Luyssen
Browse files
Replace remaining NULL with nullptr
parent
44588c2b
Changes
5
Hide whitespace changes
Inline
Side-by-side
test/main.cpp
View file @
b0e7d093
...
...
@@ -61,7 +61,7 @@ int main(int ac, char** av)
mp
.
setVideoCallbacks
([
imgBuffer
](
void
**
pBuffer
)
->
void
*
{
std
::
cout
<<
"Lock"
<<
std
::
endl
;
*
pBuffer
=
imgBuffer
;
return
NULL
;
return
nullptr
;
},
[](
void
*
,
void
*
const
*
)
{
std
::
cout
<<
"unlock"
<<
std
::
endl
;
},
nullptr
);
...
...
vlcpp/Instance.hpp
View file @
b0e7d093
...
...
@@ -90,7 +90,7 @@ public:
* LibVLC, just like VLC media player does. The list of valid arguments
* depends on the LibVLC version, the operating system and platform, and
* set of available LibVLC plugins. Invalid or unsupported arguments will
* cause the function to fail (i.e. return
NULL
). Also, some arguments
* cause the function to fail (i.e. return
nullptr
). Also, some arguments
* may alter the behaviour or otherwise interfere with other LibVLC
* functions.
*
...
...
@@ -101,7 +101,7 @@ public:
*
* \param argc the number of arguments (should be 0)
*
* \param argv list of arguments (should be
NULL
)
* \param argv list of arguments (should be
nullptr
)
*/
Instance
(
int
argc
,
const
char
*
const
*
argv
)
:
Internal
{
libvlc_new
(
argc
,
argv
),
libvlc_release
}
...
...
@@ -306,7 +306,7 @@ public:
return
{};
libvlc_module_description_t
*
p
=
ptr
.
get
();
std
::
vector
<
ModuleDescription
>
res
;
while
(
p
!=
NULL
)
while
(
p
!=
nullptr
)
{
res
.
emplace_back
(
p
);
p
=
p
->
p_next
;
...
...
@@ -328,7 +328,7 @@ public:
return
{};
libvlc_module_description_t
*
p
=
ptr
.
get
();
std
::
vector
<
ModuleDescription
>
res
;
while
(
p
!=
NULL
)
while
(
p
!=
nullptr
)
{
res
.
emplace_back
(
p
);
p
=
p
->
p_next
;
...
...
@@ -350,7 +350,7 @@ public:
std
::
vector
<
AudioOutputDescription
>
res
;
libvlc_audio_output_t
*
p
=
result
.
get
();
while
(
p
!=
NULL
)
while
(
p
!=
nullptr
)
{
res
.
emplace_back
(
p
);
p
=
p
->
p_next
;
...
...
@@ -364,7 +364,7 @@ public:
* \see Audio::outputDeviceSet() .
*
* \note Not all audio outputs support this. In particular, an empty
* (
NULL
) list of devices does imply that the specified audio output does
* (
nullptr
) list of devices does imply that the specified audio output does
* not work.
*
* \note The list might not be exhaustive.
...
...
@@ -407,7 +407,7 @@ public:
*
*You can interact with this dialog by using the postLogin method on dialog to post an answer or the dismiss method to cancel this dialog.
*
*\note to receive this callack, CancelCb should not be
NULL
.
*\note to receive this callack, CancelCb should not be
nullptr
.
*\param dialog used to interact with the dialog
*\param title title of the dialog
*\param text text of the dialog
...
...
@@ -421,8 +421,7 @@ public:
* You can interact with this dialog by using the postAction method on dialog
* to post an answer or dismiss method to cancel this dialog.
*
* \note to receive this callack, CancelCb should not be
* NULL.
* \note to receive this callack, CancelCb should not be nullptr.
*
* \param dialog used to interact with the dialog
* \param title title of the diaog
...
...
vlcpp/Internal.hpp
View file @
b0e7d093
...
...
@@ -68,7 +68,7 @@ class Internal
Internal
(
InternalPtr
obj
,
Releaser
releaser
)
{
if
(
obj
==
nullptr
)
throw
std
::
runtime_error
(
"Wrapping a
NULL
instance"
);
throw
std
::
runtime_error
(
"Wrapping a
nullptr
instance"
);
m_obj
.
reset
(
obj
,
releaser
);
}
...
...
vlcpp/Media.hpp
View file @
b0e7d093
...
...
@@ -421,7 +421,7 @@ public:
/**
* Read the meta of the media.
*
* If the media has not yet been parsed this will return
NULL
.
* If the media has not yet been parsed this will return
an empty string
.
*
* This methods automatically calls parseAsync() , so after
* calling it you may receive a libvlc_MediaMetaChanged event. If you
...
...
vlcpp/MediaPlayer.hpp
View file @
b0e7d093
...
...
@@ -129,8 +129,8 @@ public:
/**
* Get the media used by the media_player.
*
* \return the media associated with p_mi, or
NULL if no media is
* associated
* \return the media associated with p_mi, or
a nullptr shared_ptr if no
*
media is
associated
*/
MediaPtr
media
()
{
...
...
@@ -853,7 +853,7 @@ public:
std
::
vector
<
AudioOutputDeviceDescription
>
res
;
std
::
unique_ptr
<
libvlc_audio_output_device_t
,
decltype
(
&
libvlc_audio_output_device_list_release
)
>
devicesPtr
(
devices
,
libvlc_audio_output_device_list_release
);
for
(
auto
*
p
=
devices
;
p
!=
NULL
;
p
=
p
->
p_next
)
for
(
auto
*
p
=
devices
;
p
!=
nullptr
;
p
=
p
->
p_next
)
res
.
emplace_back
(
p
);
return
res
;
}
...
...
@@ -1637,13 +1637,13 @@ public:
void
setDeinterlace
(
DeinterlaceState
state
,
const
std
::
string
&
mode
)
{
libvlc_video_set_deinterlace
(
*
this
,
static_cast
<
int
>
(
state
),
mode
.
empty
()
?
NULL
:
mode
.
c_str
());
mode
.
empty
()
?
nullptr
:
mode
.
c_str
());
}
#else
void
setDeinterlace
(
const
std
::
string
&
mode
)
{
libvlc_video_set_deinterlace
(
*
this
,
mode
.
empty
()
?
NULL
:
mode
.
c_str
());
mode
.
empty
()
?
nullptr
:
mode
.
c_str
());
}
#endif
...
...
Write
Preview
Supports
Markdown
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