class EdgeAI::Clips

Defined in:

controllers/clips.cr

Constant Summary

PARSER_LIST = ["application/json"]
RESPONDER_LIST = ["application/json", "application/yaml"]

Class Method Summary

Instance Method Summary

Instance methods inherited from class EdgeAI::Base

bad_media_type(error) : AC::Error::ContentResponse bad_media_type, invalid_param(error) : AC::Error::ParameterResponse invalid_param, not_found(error) : NamedTuple(error: String | Nil) not_found, set_request_id set_request_id

Class Method Detail

def self.base_route #

Helper for obtaining base route


def self.index(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Helper methods for performing redirect_to calls


Instance Method Detail

def base_route(*args, **options) #

Helper for obtaining base route


def base_route(*args, **options, &) #

Helper for obtaining base route


def config : Configuration::Pipeline #

[View source]
def config? : Configuration::Pipeline | Nil #

[View source]
def create(payload : JSON::Any, seconds_before : UInt32 = 3_u32, seconds_after : UInt32 = 3_u32) : Metadata #

save a new clip to the device with the associated JSON payload


[View source]
def destroy(timestamp : Int64) : Nil #

delete a clip from storage


[View source]
def find_configuration_config(id : String | Nil = nil) : Nil #

[View source]
def id : String #

[View source]
def id? : String | Nil #

[View source]
def index : Array(String) | Array(Metadata) #

list clips saved on the device, optionally filtering by stream id


[View source]
def replay(seconds_before : UInt32 = 3_u32, seconds_after : UInt32 = 3_u32) : Nil #

obtains a clip of the event


[View source]
def replay(path : Path, before : Time::Span, after : Time::Span, & : File -> ) #

[View source]
def save_thumbnail(video_in : String, image_out : String, midpoint : Int) : Nil #

[View source]
def show(timestamp : Int64) #

download the clip specified by the timestamp


[View source]
def thumbnail(timestamp : Int64) #

[View source]