Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] ofVideoPlayer string and path test #8142

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
11 changes: 11 additions & 0 deletions libs/openFrameworks/video/ofVideoBaseTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{
/// \return True if the video was loaded successfully.
virtual bool load(std::string fileName);

virtual bool load(const of::filesystem::path & fileName) = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might need to be not pure virtual as inherited classes from older addons won't have this implemented

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
Expand All @@ -225,11 +230,17 @@ 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);
<<<<<<< HEAD
virtual bool loadAsync(std::string name) {
loadAsync(of::filesystem::path(name));
}
=======

/// \brief Legacy approach for Asynchronously load a video resource by name.
/// \param name The name of the video resource to load.
virtual void loadAsync(std::string fileName);

>>>>>>> master
/// \brief Play the video from the current playhead position.
///
/// \sa getPosition()
Expand Down
1 change: 1 addition & 0 deletions libs/openFrameworks/video/ofVideoPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ofVideoPlayer : public ofBaseVideoDraws {

bool load(const of::filesystem::path & fileName);
void loadAsync(const of::filesystem::path & fileName);

[[deprecated("Use load")]]
bool loadMovie(const of::filesystem::path & fileName);

Expand Down
Loading