FastLED 3.10.6
Loading...
Searching...
No Matches
read.cpp.hpp
Go to the documentation of this file.
1
9
10#include "fl/fs/read.h"
11
12namespace fl {
13
14FramePtr readJpeg(FileSystem &fs, const char *path, const JpegConfig &config,
15 string *error) FL_NO_EXCEPT {
16 return fs.loadJpeg(path, config, error);
17}
18
19Mp3DecoderPtr readMp3(FileSystem &fs, const char *path, string *error) FL_NO_EXCEPT {
20 return fs.openMp3(path, error);
21}
22
23Video readVideo(FileSystem &fs, const char *path, fl::size pixelsPerFrame,
24 float fps, fl::size nFrameHistory) FL_NO_EXCEPT {
25 return fs.openVideo(path, pixelsPerFrame, fps, nFrameHistory);
26}
27
28Video readMpeg1Video(FileSystem &fs, const char *path, fl::size pixelsPerFrame,
29 float fps, fl::size nFrameHistory) FL_NO_EXCEPT {
30 return fs.openMpeg1Video(path, pixelsPerFrame, fps, nFrameHistory);
31}
32
33bool readText(FileSystem &fs, const char *path, string *out) FL_NO_EXCEPT {
34 return fs.readText(path, out);
35}
36
37bool readJson(FileSystem &fs, const char *path, json *doc) FL_NO_EXCEPT {
38 return fs.readJson(path, doc);
39}
40
41bool readScreenMap(FileSystem &fs, const char *path, const char *name,
42 ScreenMap *out, string *error) FL_NO_EXCEPT {
43 return fs.readScreenMap(path, name, out, error);
44}
45
46bool readScreenMaps(FileSystem &fs, const char *path,
48 return fs.readScreenMaps(path, out, error);
49}
50
51Fled readFled(FileSystem &fs, const char *path) FL_NO_EXCEPT {
52 return fs.loadFled(path);
53}
54
55} // namespace fl
bool readJson(FileSystem &fs, const char *path, json *doc) FL_NO_EXCEPT
Parse a file as JSON.
Definition read.cpp.hpp:37
Fled readFled(FileSystem &fs, const char *path) FL_NO_EXCEPT
Load a .fled container.
Definition read.cpp.hpp:51
Video readMpeg1Video(FileSystem &fs, const char *path, fl::size pixelsPerFrame, float fps, fl::size nFrameHistory) FL_NO_EXCEPT
MPEG1 video. Null if the file could not be opened.
Definition read.cpp.hpp:28
InputGamut g FL_NO_EXCEPT
Definition rgbw.h:121
bool readScreenMaps(FileSystem &fs, const char *path, fl::flat_map< string, ScreenMap > *out, string *error) FL_NO_EXCEPT
Every screen map in a screenmap JSON file, keyed by name.
Definition read.cpp.hpp:46
bool readScreenMap(FileSystem &fs, const char *path, const char *name, ScreenMap *out, string *error) FL_NO_EXCEPT
One named screen map from a screenmap JSON file.
Definition read.cpp.hpp:41
Video readVideo(FileSystem &fs, const char *path, fl::size pixelsPerFrame, float fps, fl::size nFrameHistory) FL_NO_EXCEPT
Raw-frame video. Null if the file could not be opened.
Definition read.cpp.hpp:23
fl::shared_ptr< Mp3Decoder > Mp3DecoderPtr
Definition fs.h:27
FramePtr readJpeg(FileSystem &fs, const char *path, const JpegConfig &config, string *error) FL_NO_EXCEPT
Decode a JPEG into a Frame. Null on failure; error receives why.
Definition read.cpp.hpp:14
bool readText(FileSystem &fs, const char *path, string *out) FL_NO_EXCEPT
Whole file as text.
Definition read.cpp.hpp:33
Mp3DecoderPtr readMp3(FileSystem &fs, const char *path, string *error) FL_NO_EXCEPT
Streaming MP3 decoder over a file. Null on failure.
Definition read.cpp.hpp:19
Base definition for an LED controller.
Definition crgb.hpp:179
Decoding files into FastLED types.