Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
8fa162cf
Commit
8fa162cf
authored
Jan 26, 2010
by
JP Dinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics: activex plugin: add a helper for bool -> VARIANT_BOOL.
parent
d9fed02a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
projects/activex/vlccontrol2.cpp
projects/activex/vlccontrol2.cpp
+11
-13
No files found.
projects/activex/vlccontrol2.cpp
View file @
8fa162cf
...
...
@@ -87,8 +87,10 @@ HRESULT object_get(I **dst, I *src)
return
E_OUTOFMEMORY
;
}
// ---------
static
inline
VARIANT_BOOL
varbool
(
bool
b
)
{
return
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
}
// ---------
STDMETHODIMP
VLCAudio
::
get_mute
(
VARIANT_BOOL
*
mute
)
{
...
...
@@ -98,8 +100,7 @@ STDMETHODIMP VLCAudio::get_mute(VARIANT_BOOL* mute)
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
*
mute
=
libvlc_audio_get_mute
(
p_libvlc
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
mute
=
varbool
(
libvlc_audio_get_mute
(
p_libvlc
)
);
return
hr
;
};
...
...
@@ -460,8 +461,7 @@ STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout)
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
hasVout
=
libvlc_media_player_has_vout
(
p_md
,
&
ex
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
hasVout
=
varbool
(
libvlc_media_player_has_vout
(
p_md
,
&
ex
)
);
hr
=
exception_bridge
(
&
ex
);
}
return
hr
;
...
...
@@ -635,8 +635,7 @@ STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying)
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
isPlaying
=
libvlc_media_player_is_playing
(
p_md
)
?
VARIANT_TRUE:
VARIANT_FALSE
;
*
isPlaying
=
varbool
(
libvlc_media_player_is_playing
(
p_md
)
);
libvlc_exception_clear
(
&
ex
);
}
return
hr
;
...
...
@@ -944,8 +943,7 @@ STDMETHODIMP VLCVideo::get_fullscreen(VARIANT_BOOL* fullscreen)
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
fullscreen
=
libvlc_get_fullscreen
(
p_md
,
&
ex
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
fullscreen
=
varbool
(
libvlc_get_fullscreen
(
p_md
,
&
ex
)
);
hr
=
exception_bridge
(
&
ex
);
}
return
hr
;
...
...
@@ -1537,7 +1535,7 @@ STDMETHODIMP VLCControl2::get_AutoLoop(VARIANT_BOOL *autoloop)
if
(
NULL
==
autoloop
)
return
E_POINTER
;
*
autoloop
=
_p_instance
->
getAutoLoop
()
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
autoloop
=
varbool
(
_p_instance
->
getAutoLoop
()
)
;
return
S_OK
;
};
...
...
@@ -1552,7 +1550,7 @@ STDMETHODIMP VLCControl2::get_AutoPlay(VARIANT_BOOL *autoplay)
if
(
NULL
==
autoplay
)
return
E_POINTER
;
*
autoplay
=
_p_instance
->
getAutoPlay
()
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
autoplay
=
varbool
(
_p_instance
->
getAutoPlay
()
)
;
return
S_OK
;
};
...
...
@@ -1614,7 +1612,7 @@ STDMETHODIMP VLCControl2::get_Toolbar(VARIANT_BOOL *visible)
*/
/* DISABLED for now */
// *visible =
_p_instance->getShowToolbar() ? VARIANT_TRUE: VARIANT_FALSE
;
// *visible =
varbool( _p_instance->getShowToolbar() )
;
*
visible
=
VARIANT_FALSE
;
...
...
@@ -1666,7 +1664,7 @@ STDMETHODIMP VLCControl2::get_Visible(VARIANT_BOOL *isVisible)
if
(
NULL
==
isVisible
)
return
E_POINTER
;
*
isVisible
=
_p_instance
->
getVisible
()
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
isVisible
=
varbool
(
_p_instance
->
getVisible
()
)
;
return
NOERROR
;
};
...
...
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