From de2fda5f83a3fc90f140fad69a6ff6214ebb82c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net> Date: Fri, 17 Jun 2022 10:59:43 +0200 Subject: [PATCH] Dialog provider: update to libvlc v4 API --- Sources/VLCCustomDialogProvider.m | 7 +++++-- Sources/VLCEmbeddedDialogProvider.m | 7 +++++-- Sources/VLCiOSLegacyDialogProvider.m | 11 +++++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Sources/VLCCustomDialogProvider.m b/Sources/VLCCustomDialogProvider.m index a4a91187..be85a65b 100644 --- a/Sources/VLCCustomDialogProvider.m +++ b/Sources/VLCCustomDialogProvider.m @@ -2,7 +2,7 @@ * VLCCustomDialogProvider.m: an implementation of the libvlc dialog API * Included to allow custom UIs with full flexibility ***************************************************************************** - * Copyright (C) 2016 VideoLabs SAS + * Copyright (C) 2016, 2022 VideoLabs SAS * $Id$ * * Authors: Felix Paul Kühne <fkuehne # videolan org> @@ -164,7 +164,6 @@ static void updateProgressCallback(void *p_data, /* callback setup */ const libvlc_dialog_cbs cbs = { - displayErrorCallback, displayLoginCallback, displayQuestionCallback, displayProgressCallback, @@ -175,6 +174,10 @@ static void updateProgressCallback(void *p_data, libvlc_dialog_set_callbacks(_libraryInstance.instance, &cbs, (__bridge void *)self); + + libvlc_dialog_set_error_callback(_libraryInstance.instance, + &displayErrorCallback, + (__bridge void *)self); } return self; diff --git a/Sources/VLCEmbeddedDialogProvider.m b/Sources/VLCEmbeddedDialogProvider.m index bb22e81e..2f8f43d4 100644 --- a/Sources/VLCEmbeddedDialogProvider.m +++ b/Sources/VLCEmbeddedDialogProvider.m @@ -1,7 +1,7 @@ /***************************************************************************** * VLCEmbeddedDialogProvider.m: an implementation of the libvlc dialog API ***************************************************************************** - * Copyright (C) 2016 VideoLabs SAS + * Copyright (C) 2016, 2022 VideoLabs SAS * $Id$ * * Authors: Felix Paul Kühne <fkuehne # videolan.org> @@ -164,7 +164,6 @@ static void updateProgressCallback(void *p_data, /* callback setup */ const libvlc_dialog_cbs cbs = { - displayErrorCallback, displayLoginCallback, displayQuestionCallback, displayProgressCallback, @@ -175,6 +174,10 @@ static void updateProgressCallback(void *p_data, libvlc_dialog_set_callbacks(_libraryInstance.instance, &cbs, (__bridge void *)self); + + libvlc_dialog_set_error_callback(_libraryInstance.instance, + &displayErrorCallback, + (__bridge void *)self); } return self; diff --git a/Sources/VLCiOSLegacyDialogProvider.m b/Sources/VLCiOSLegacyDialogProvider.m index 4e6c279e..facd0517 100644 --- a/Sources/VLCiOSLegacyDialogProvider.m +++ b/Sources/VLCiOSLegacyDialogProvider.m @@ -2,8 +2,8 @@ * VLCiOSLegacyDialogProvider.m: an implementation of the libvlc dialog API * Included for compatiblity with iOS 7 ***************************************************************************** - * Copyright (C) 2009, 2014-2015 VLC authors and VideoLAN - * Copyright (C) 2016 VideoLabs SAS + * Copyright (C) 2009, 2014-2015, 2022 VLC authors and VideoLAN + * Copyright (C) 2016, 2022 VideoLabs SAS * $Id$ * * Authors: Felix Paul Kühne <fkuehne # videolan org> @@ -133,7 +133,7 @@ static void cancelCallback(void *p_data, { @autoreleasepool { // FIXME: the saddest NO-OP - VKLog(@"%s: %i", __PRETTY_FUNCTION__, (int)p_id); + VKLog(@"%s: %lli", __PRETTY_FUNCTION__, (int64_t)p_id); } } @@ -174,7 +174,6 @@ static void updateProgressCallback(void *p_data, /* callback setup */ const libvlc_dialog_cbs cbs = { - displayErrorCallback, displayLoginCallback, displayQuestionCallback, displayProgressCallback, @@ -185,6 +184,10 @@ static void updateProgressCallback(void *p_data, libvlc_dialog_set_callbacks(_libraryInstance.instance, &cbs, (__bridge void *)self); + + libvlc_dialog_set_error_callback(_libraryInstance.instance, + &displayErrorCallback, + (__bridge void *)self); } return self; -- GitLab