clang-format: Apply formatting
Code submissions have continually suffered from formatting inconsistencies that constantly have to be addressed. Using clang-format simplifies this by making code formatting more consistent, and allows automation of the code formatting so that maintainers can focus more on the code itself instead of code formatting.
This commit is contained in:
@@ -53,10 +53,12 @@ LIBVLC_MEDIA_LIST_PLAYER_RELEASE libvlc_media_list_player_release_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_PLAY libvlc_media_list_player_play_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_PAUSE libvlc_media_list_player_pause_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_STOP libvlc_media_list_player_stop_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_SET_MEDIA_PLAYER libvlc_media_list_player_set_media_player_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_SET_MEDIA_PLAYER
|
||||
libvlc_media_list_player_set_media_player_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_SET_MEDIA_LIST libvlc_media_list_player_set_media_list_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_EVENT_MANAGER libvlc_media_list_player_event_manager_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_SET_PLAYBACK_MODE libvlc_media_list_player_set_playback_mode_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_SET_PLAYBACK_MODE
|
||||
libvlc_media_list_player_set_playback_mode_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_NEXT libvlc_media_list_player_next_;
|
||||
LIBVLC_MEDIA_LIST_PLAYER_PREVIOUS libvlc_media_list_player_previous_;
|
||||
|
||||
@@ -70,14 +72,16 @@ uint64_t time_start = 0;
|
||||
|
||||
static bool load_vlc_funcs(void)
|
||||
{
|
||||
#define LOAD_VLC_FUNC(func) \
|
||||
do { \
|
||||
func ## _ = os_dlsym(libvlc_module, #func); \
|
||||
if (!func ## _) { \
|
||||
blog(LOG_WARNING, "Could not func VLC function %s, " \
|
||||
"VLC loading failed", #func); \
|
||||
return false; \
|
||||
} \
|
||||
#define LOAD_VLC_FUNC(func) \
|
||||
do { \
|
||||
func##_ = os_dlsym(libvlc_module, #func); \
|
||||
if (!func##_) { \
|
||||
blog(LOG_WARNING, \
|
||||
"Could not func VLC function %s, " \
|
||||
"VLC loading failed", \
|
||||
#func); \
|
||||
return false; \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
/* libvlc core */
|
||||
@@ -133,23 +137,22 @@ static bool load_vlc_funcs(void)
|
||||
static bool load_libvlc_module(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
char *path_utf8 = NULL;
|
||||
char *path_utf8 = NULL;
|
||||
wchar_t path[1024];
|
||||
LSTATUS status;
|
||||
DWORD size;
|
||||
HKEY key;
|
||||
DWORD size;
|
||||
HKEY key;
|
||||
|
||||
memset(path, 0, 1024 * sizeof(wchar_t));
|
||||
|
||||
status = RegOpenKeyW(HKEY_LOCAL_MACHINE,
|
||||
L"SOFTWARE\\VideoLAN\\VLC",
|
||||
&key);
|
||||
status = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\VideoLAN\\VLC",
|
||||
&key);
|
||||
if (status != ERROR_SUCCESS)
|
||||
return false;
|
||||
|
||||
size = 1024;
|
||||
status = RegQueryValueExW(key, L"InstallDir", NULL, NULL,
|
||||
(LPBYTE)path, &size);
|
||||
status = RegQueryValueExW(key, L"InstallDir", NULL, NULL, (LPBYTE)path,
|
||||
&size);
|
||||
if (status == ERROR_SUCCESS) {
|
||||
wcscat(path, L"\\libvlc.dll");
|
||||
os_wcs_to_utf8_ptr(path, 0, &path_utf8);
|
||||
@@ -201,7 +204,7 @@ bool obs_module_load(void)
|
||||
{
|
||||
if (!load_libvlc_module()) {
|
||||
blog(LOG_INFO, "Couldn't find VLC installation, VLC video "
|
||||
"source disabled");
|
||||
"source disabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user