FastLED 3.10.6
Loading...
Searching...
No Matches
read.h
Go to the documentation of this file.
1#pragma once
2
22
23#include "fl/codec/jpeg.h" // IWYU pragma: export
24#include "fl/fs/fs.h" // IWYU pragma: export
25#include "fl/fx/video.h" // IWYU pragma: export
26#include "fl/stl/noexcept.h"
27
28namespace fl {
29
30class ScreenMap;
31class Fled;
32
34FramePtr readJpeg(FileSystem &fs, const char *path,
35 const JpegConfig &config = JpegConfig(),
36 string *error = nullptr) FL_NO_EXCEPT;
37
39Mp3DecoderPtr readMp3(FileSystem &fs, const char *path,
40 string *error = nullptr) FL_NO_EXCEPT;
41
43Video readVideo(FileSystem &fs, const char *path,
44 fl::size pixelsPerFrame, float fps = 30.0f,
45 fl::size nFrameHistory = 0) FL_NO_EXCEPT;
46
48Video readMpeg1Video(FileSystem &fs, const char *path,
49 fl::size pixelsPerFrame, float fps = 30.0f,
50 fl::size nFrameHistory = 0) FL_NO_EXCEPT;
51
53bool readText(FileSystem &fs, const char *path, string *out) FL_NO_EXCEPT;
54
56bool readJson(FileSystem &fs, const char *path, json *doc) FL_NO_EXCEPT;
57
59bool readScreenMap(FileSystem &fs, const char *path, const char *name,
60 ScreenMap *out, string *error = nullptr) FL_NO_EXCEPT;
61
63bool readScreenMaps(FileSystem &fs, const char *path,
64 fl::flat_map<string, ScreenMap> *out,
65 string *error = nullptr) FL_NO_EXCEPT;
66
69Fled readFled(FileSystem &fs, const char *path) FL_NO_EXCEPT;
70
71} // 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