VideoCodecController.sleela
lib/video/VideoCodecController.sleela · 94 line(s) · sleela
<< lib/video/VideoCodecController.sleela
SLeeLa Standard Library Definition.
Definition: Defines the SLeeLa standard-library type VideoCodecController used within the video library family. >>
#sleela 2.5
material;
< Family: video. The video Codec Management Controller — the single surface a >
< GUI or application drives to use video codecs, parallel to the audio >
< SLCodecController. It owns each codec's loaded lifecycle and backend table, >
< and cooperates with VideoCodecLoader (classification), VideoCodecVerifier >
< (extension resolution + result text), and VideoCodecProcessor (decode/encode >
< dispatch). As of syntax 1.11 the Controller holds its Verifier as a field and >
< calls through it directly (method calls resolve on class-typed fields); >
< lifecycle state lives in int[] tables. >
< >
< Video codec ids mirror sleela_video_codec_id: >
< 0 RAW 1 H264 2 HEVC 3 AV1 4 VP8 5 VP9 6 MPEG2 7 THEORA >
< 8 MJPEG 9 FFV1 10 PRORES 11 DNX >
< >
< Result codes (sleela_codec_result): 0 ok, -1 unsupported, -2 invalid, >
< -3 format, -4 io, -5 state(not loaded). >
class VideoCodecController {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 10963;
String metaAuthor = "Kiro Agent";
String metaDate = "2026-10-16";
String metaCopyright = "SLeeLa project";
String metaTrademark = "none";
String metaCorporation = "none";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "International";
String metaBirthDate = "2026-10-10";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 9;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
< wired by create(), called via the field. (Lifecycle tables + ready flag are >
< inherited from SLPluginService.) >
VideoCodecVerifier verifier;
< Build the controller: configure() (inherited) allocates the 12-entry >
< lifecycle tables and records the native-id mask; then wire the Verifier. >
< Only Raw Video (0) is native -> mask bit 0. >
void create(){
configure(12, 1);
verifier = new VideoCodecVerifier();
}
< Video-specific: ProRes/DNx (10, 11) are the qualified backends. >
boolean isQualifiedBackend(int id){ return id == 10 || id == 11; }
< Resolve a codec id from a file extension via the wired Verifier. >
int resolveExtension(string extension){
return verifier.resolveExtension(extension);
}
< Domain verbs over the inherited dispatch gate (-2 invalid, -5 not loaded, >
< -1 backend absent, 0 ok). >
int decode(int id){ return dispatchCode(id); }
int encode(int id){ return dispatchCode(id); }
string serviceName(){ return "VideoCodecController"; }
string resultText(int code){
return verifier.resultText(code);
}
}