From 84c9186e4f9c7cd307a0006d31ea5d535c48f65a Mon Sep 17 00:00:00 2001 From: Dimitre Date: Fri, 11 Oct 2024 13:54:32 -0300 Subject: [PATCH 1/5] remove ambiguity between load(string) and load(fs::path) in videoplayer --- apps/projectGenerator | 2 +- libs/openFrameworks/utils/ofConstants.h | 2 +- libs/openFrameworks/video/ofAVFoundationPlayer.h | 4 ++-- libs/openFrameworks/video/ofVideoBaseTypes.h | 4 ++++ libs/openFrameworks/video/ofVideoPlayer.h | 13 +++++++++++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/projectGenerator b/apps/projectGenerator index a59f24da613..abe0e5bd15e 160000 --- a/apps/projectGenerator +++ b/apps/projectGenerator @@ -1 +1 @@ -Subproject commit a59f24da613b6094cd22cdd15d5748eb221f9c1f +Subproject commit abe0e5bd15eb2aec67e40dea140aeb54c9ff02ea diff --git a/libs/openFrameworks/utils/ofConstants.h b/libs/openFrameworks/utils/ofConstants.h index 5c959d2fafe..5a3dcd4d770 100644 --- a/libs/openFrameworks/utils/ofConstants.h +++ b/libs/openFrameworks/utils/ofConstants.h @@ -2,7 +2,7 @@ // version: ------------------------ #define OF_VERSION_MAJOR 0 -#define OF_VERSION_MINOR 12 +#define OF_VERSION_MINOR 13 #define OF_VERSION_PATCH 0 #define OF_VERSION_PRE_RELEASE "master" diff --git a/libs/openFrameworks/video/ofAVFoundationPlayer.h b/libs/openFrameworks/video/ofAVFoundationPlayer.h index 6491aa01dd6..f1277af8c38 100644 --- a/libs/openFrameworks/video/ofAVFoundationPlayer.h +++ b/libs/openFrameworks/video/ofAVFoundationPlayer.h @@ -27,8 +27,8 @@ class ofAVFoundationPlayer : public ofBaseVideoPlayer { ofAVFoundationPlayer(); ~ofAVFoundationPlayer(); - bool load(const of::filesystem::path & fileName) override; - void loadAsync(const of::filesystem::path & fileName) override; + bool load(const of::filesystem::path & fileName); + void loadAsync(const of::filesystem::path & fileName); void close(); void update(); diff --git a/libs/openFrameworks/video/ofVideoBaseTypes.h b/libs/openFrameworks/video/ofVideoBaseTypes.h index 395d3dc3dd5..d7fac19dc8b 100644 --- a/libs/openFrameworks/video/ofVideoBaseTypes.h +++ b/libs/openFrameworks/video/ofVideoBaseTypes.h @@ -209,6 +209,10 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{ /// \sa loadAsync() virtual bool load(const of::filesystem::path & fileName) = 0; + virtual bool load(std::string name) { + return load(of::filesystem::path(name)); + } + /// \brief Asynchronously load a video resource by name. /// /// The list of supported video types and sources (e.g. rtsp:// sources) is diff --git a/libs/openFrameworks/video/ofVideoPlayer.h b/libs/openFrameworks/video/ofVideoPlayer.h index 314ff5c2ac6..13ffd3ff61b 100644 --- a/libs/openFrameworks/video/ofVideoPlayer.h +++ b/libs/openFrameworks/video/ofVideoPlayer.h @@ -6,13 +6,26 @@ //--------------------------------------------- class ofVideoPlayer : public ofBaseVideoDraws { public: +// using ofBaseVideoPlayer::ofBaseVideoPlayer; ofVideoPlayer(); ofVideoPlayer(const of::filesystem::path & fileName); bool load(const of::filesystem::path & fileName); void loadAsync(const of::filesystem::path & fileName); +// bool load(std::string name) { +// return true; +//// return load(of::filesystem::path(name)); +// } +// void loadAsync(std::string name) { +// return loadAsync(of::filesystem::path(name)); +// } + [[deprecated("Use load")]] bool loadMovie(const of::filesystem::path & fileName); +// [[deprecated("Use load")]] +// bool loadMovie(std::string name) { +// return loadMovie(of::filesystem::path(name)); +// } /// \brief Get the path to the loaded video file. From 2692b288178fbae1da7d2d130de120b1c5b6b088 Mon Sep 17 00:00:00 2001 From: Dimitre Date: Fri, 11 Oct 2024 13:56:15 -0300 Subject: [PATCH 2/5] loadAsync --- libs/openFrameworks/video/ofVideoBaseTypes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/openFrameworks/video/ofVideoBaseTypes.h b/libs/openFrameworks/video/ofVideoBaseTypes.h index d7fac19dc8b..247463acae4 100644 --- a/libs/openFrameworks/video/ofVideoBaseTypes.h +++ b/libs/openFrameworks/video/ofVideoBaseTypes.h @@ -224,7 +224,9 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{ /// \param name The name of the video resource to load. /// \sa isLoaded() virtual void loadAsync(const of::filesystem::path & fileName); - + virtual bool loadAsync(std::string name) { + return loadAsync(of::filesystem::path(name)); + } /// \brief Play the video from the current playhead position. /// /// \sa getPosition() From b1326b42315ee5f2ce31a10cfac7142eb010deab Mon Sep 17 00:00:00 2001 From: Dimitre Date: Fri, 11 Oct 2024 13:57:07 -0300 Subject: [PATCH 3/5] cleanup --- libs/openFrameworks/video/ofVideoPlayer.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/libs/openFrameworks/video/ofVideoPlayer.h b/libs/openFrameworks/video/ofVideoPlayer.h index 13ffd3ff61b..8e265fdd974 100644 --- a/libs/openFrameworks/video/ofVideoPlayer.h +++ b/libs/openFrameworks/video/ofVideoPlayer.h @@ -6,26 +6,14 @@ //--------------------------------------------- class ofVideoPlayer : public ofBaseVideoDraws { public: -// using ofBaseVideoPlayer::ofBaseVideoPlayer; ofVideoPlayer(); ofVideoPlayer(const of::filesystem::path & fileName); bool load(const of::filesystem::path & fileName); void loadAsync(const of::filesystem::path & fileName); -// bool load(std::string name) { -// return true; -//// return load(of::filesystem::path(name)); -// } -// void loadAsync(std::string name) { -// return loadAsync(of::filesystem::path(name)); -// } [[deprecated("Use load")]] bool loadMovie(const of::filesystem::path & fileName); -// [[deprecated("Use load")]] -// bool loadMovie(std::string name) { -// return loadMovie(of::filesystem::path(name)); -// } /// \brief Get the path to the loaded video file. From faaf896c219ecaa313c50b0608e01ca793330a78 Mon Sep 17 00:00:00 2001 From: Dimitre Date: Fri, 11 Oct 2024 13:57:36 -0300 Subject: [PATCH 4/5] pg submodule --- apps/projectGenerator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/projectGenerator b/apps/projectGenerator index abe0e5bd15e..51f2ad14aad 160000 --- a/apps/projectGenerator +++ b/apps/projectGenerator @@ -1 +1 @@ -Subproject commit abe0e5bd15eb2aec67e40dea140aeb54c9ff02ea +Subproject commit 51f2ad14aad8031ca1e0001791089d0742fa1699 From 417574927f08d103248d114f185dd97505387ecb Mon Sep 17 00:00:00 2001 From: Dimitre Date: Fri, 11 Oct 2024 14:05:28 -0300 Subject: [PATCH 5/5] fix return in void function --- libs/openFrameworks/video/ofVideoBaseTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/openFrameworks/video/ofVideoBaseTypes.h b/libs/openFrameworks/video/ofVideoBaseTypes.h index 247463acae4..2ba82e82a6d 100644 --- a/libs/openFrameworks/video/ofVideoBaseTypes.h +++ b/libs/openFrameworks/video/ofVideoBaseTypes.h @@ -225,7 +225,7 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{ /// \sa isLoaded() virtual void loadAsync(const of::filesystem::path & fileName); virtual bool loadAsync(std::string name) { - return loadAsync(of::filesystem::path(name)); + loadAsync(of::filesystem::path(name)); } /// \brief Play the video from the current playhead position. ///