|
52 | 52 | } |
53 | 53 |
|
54 | 54 | //-------------------------------------------------------------- |
55 | | -void ofAVFoundationPlayer::loadAsync(const of::filesystem::path & fileName){ |
56 | | - loadPlayer(fileName, true); |
| 55 | +void ofAVFoundationPlayer::loadAsync(std::string name){ |
| 56 | + loadPlayer(name, true); |
57 | 57 | } |
58 | 58 |
|
59 | 59 | //-------------------------------------------------------------- |
60 | | -bool ofAVFoundationPlayer::load(const of::filesystem::path & fileName) { |
61 | | - return loadPlayer(fileName, false); |
| 60 | +bool ofAVFoundationPlayer::load(std::string name) { |
| 61 | + return loadPlayer(name, false); |
62 | 62 | } |
63 | 63 |
|
64 | 64 | //-------------------------------------------------------------- |
65 | | -bool ofAVFoundationPlayer::loadPlayer(const of::filesystem::path & fileName, bool bAsync) { |
| 65 | +// FIXME: fs::path |
| 66 | +bool ofAVFoundationPlayer::loadPlayer(std::string name, bool bAsync) { |
66 | 67 | if( ofGetUsingArbTex() == false ){ |
67 | 68 | killTextureCache(); |
68 | 69 | bUseTextureCache = false; |
69 | 70 | } |
70 | 71 |
|
71 | | - NSString * videoPath = [NSString stringWithUTF8String:fileName.c_str()]; |
72 | | - NSString * videoLocalPath = [NSString stringWithUTF8String:ofToDataPath(fileName).c_str()]; |
| 72 | + NSString * videoPath = [NSString stringWithUTF8String:name.c_str()]; |
| 73 | + NSString * videoLocalPath = [NSString stringWithUTF8String:ofToDataPath(name).c_str()]; |
73 | 74 |
|
74 | 75 | BOOL bStream = NO; |
75 | 76 |
|
76 | | - std::string fileNameStr { ofPathToString(fileName) }; |
77 | | - bStream = bStream || (ofIsStringInString(fileNameStr, "http://")); |
78 | | - bStream = bStream || (ofIsStringInString(fileNameStr, "https://")); |
79 | | - bStream = bStream || (ofIsStringInString(fileNameStr, "rtsp://")); |
| 77 | + bStream = bStream || (ofIsStringInString(name, "http://")); |
| 78 | + bStream = bStream || (ofIsStringInString(name, "https://")); |
| 79 | + bStream = bStream || (ofIsStringInString(name, "rtsp://")); |
80 | 80 |
|
81 | 81 | NSURL * url = nil; |
82 | 82 | if(bStream == YES) { |
|
762 | 762 | #endif |
763 | 763 |
|
764 | 764 | //-------------------------------------------------------------- DEPRECATED. |
765 | | -bool ofAVFoundationPlayer::loadMovie(const of::filesystem::path & fileName) { |
766 | | - return load(fileName); |
| 765 | +bool ofAVFoundationPlayer::loadMovie(std::string name) { |
| 766 | + return load(name); |
767 | 767 | } |
768 | 768 |
|
769 | 769 | ofPixels & ofAVFoundationPlayer::getPixelsRef() { |
|
0 commit comments