FastLED 3.9.15
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 168 of file file_system.cpp.hpp.

169 {
170 Video video(pixelsPerFrame, fps, nFrameHistory);
171 fl::ifstream file = openRead(path);
172 if (!file.is_open()) {
173 video.setError(fl::string("Could not open file: ").append(path));
174 return video;
175 }
176 video.begin(file.rdbuf());
177 return video;
178}
fl::Video video(NUM_LEDS, 2.0f)
fl::ifstream openRead(const char *path)
bool begin(fl::filebuf_ptr h)
Definition video.cpp.hpp:38
void setError(const string &error)
Definition video.h:71
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: