-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix of video player path #8150
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
Fix of video player path #8150
Conversation
|
|
||
| //--------------------------------------------------------------------------- | ||
| void ofBaseVideoPlayer::loadAsync(const of::filesystem::path & fileName){ | ||
| loadAsync(fileName.string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use ofPathToString(fileName) here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. the string() function can throw exceptions and because of that the ofPathToString handles it. In the switch to use fs::path we should enforce the use of ofPathToString rather than calling string() directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh good catch! thanks guys!
As discussed in #8143 this adds the load( std::string ) function to ofBaseVideoPlayer class so that older video players will still work when used with 0.13 and on.
Tested both with using via ofVideoPlayer and directly.
Seems to work great and should allow for both newer path implementation and older legacy approaches.
cc @dimitre @roymacdonald