FastLED 3.10.6
Loading...
Searching...
No Matches

◆ openVideo()

Video fl::FileSystem::openVideo ( const char * path,
fl::size pixelsPerFrame,
float fps = 30.0f,
fl::size nFrameHistory = 0 )

Definition at line 179 of file fs.cpp.hpp.

180 {
181 Video video(pixelsPerFrame, fps, nFrameHistory);
182 fl::ifstream file = openRead(path);
183 if (!file.is_open()) {
184 video.setError(fl::string("Could not open file: ").append(path));
185 return video;
186 }
187 video.begin(file.rdbuf());
188 return video;
189}
fl::Video video(NUM_LEDS, 2.0f)
fl::ifstream openRead(const char *path)
Definition fs.cpp.hpp:170
void setError(const string &error) FL_NO_EXCEPT
Definition video.h:82
bool begin(fl::filebuf_ptr h)
Definition video.cpp.hpp:40
bool is_open() const
Definition fstream.h:111
filebuf_ptr rdbuf() const
Definition fstream.h:143

References fl::ifstream::is_open(), openRead(), and fl::ifstream::rdbuf().

+ Here is the call graph for this function: