File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,24 @@ ofBaseVideoPlayer::~ofBaseVideoPlayer(){
4747
4848}
4949
50+ // ---------------------------------------------------------------------------
51+ bool ofBaseVideoPlayer::load (const of::filesystem::path & fileName){
52+ return load (ofPathToString (fileName));
53+ }
54+
55+ // ---------------------------------------------------------------------------
56+ bool ofBaseVideoPlayer::load (const std::string & fileName){
57+ ofLogError (" ofBaseVideoPlayer" ) << " One of the two load functions need to be implemented " ;
58+ return false ;
59+ }
60+
61+ // ---------------------------------------------------------------------------
5062void ofBaseVideoPlayer::loadAsync (const of::filesystem::path & fileName){
63+ loadAsync (ofPathToString (fileName));
64+ }
65+
66+ // ---------------------------------------------------------------------------
67+ void ofBaseVideoPlayer::loadAsync (const std::string & fileName){
5168 ofLogWarning (" ofBaseVideoPlayer" ) << " loadAsync() not implemented, loading synchronously" ;
5269 load (fileName);
5370}
Original file line number Diff line number Diff line change @@ -207,8 +207,13 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{
207207 // / \param name The name of the video resource to load.
208208 // / \return True if the video was loaded successfully.
209209 // / \sa loadAsync()
210+ virtual bool load (const of::filesystem::path & fileName);
211+
212+ // / \brief Legacy approach for loading videos for older inherited classes
213+ // / \param name The name of the video resource to load.
214+ // / \return True if the video was loaded successfully.
215+ virtual bool load (const std::string & fileName);
210216
211- virtual bool load (const of::filesystem::path & fileName) = 0;
212217 // / \brief Asynchronously load a video resource by name.
213218 // /
214219 // / The list of supported video types and sources (e.g. rtsp:// sources) is
@@ -220,6 +225,10 @@ class ofBaseVideoPlayer: virtual public ofBaseVideo{
220225 // / \param name The name of the video resource to load.
221226 // / \sa isLoaded()
222227 virtual void loadAsync (const of::filesystem::path & fileName);
228+
229+ // / \brief Legacy approach for Asynchronously load a video resource by name.
230+ // / \param name The name of the video resource to load.
231+ virtual void loadAsync (const std::string & fileName);
223232
224233 // / \brief Play the video from the current playhead position.
225234 // /
You can’t perform that action at this time.
0 commit comments