pub fn v4l_post(req: HttpRequest, json: web::Json<V4lControl>) -> HttpResponse {
    debug!("{:#?}{:?}", req, json);
    let control = json.into_inner();
    let answer = video_source::set_control(&control.device, control.v4l_id, control.value);
    if answer.is_ok() {
        return HttpResponse::Ok().finish();
    };

    return HttpResponse::NotAcceptable()
        .content_type("text/plain")
        .body(format!("{:#?}", answer.err().unwrap()));
}
/// Change video control for a specific source
Change video control for a specific source
Change video control for a specific source
pub fn v4l_post(req: HttpRequest, json: web::Json<V4lControl>) -> HttpResponse {
    debug!("{:#?}{:?}", req, json);
    let control = json.into_inner();
    let answer = video_source::set_control(&control.device, control.v4l_id, control.value);
    if answer.is_ok() {
        return HttpResponse::Ok().finish();
    };
    return HttpResponse::NotAcceptable()
        .content_type("text/plain")
        .body(format!("{:#?}", answer.err().unwrap()));
}
pub fn v4l_post ( req : HttpRequest , json : web :: Json < V4lControl > ) -> HttpResponse { debug ! ( " " req json ) ; let control = json . into_inner ( ) ; let answer = video_source :: set_control ( & control . device , control . v4l_id , control . value ) ; if answer . is_ok ( ) { return HttpResponse :: Ok ( ) . finish ( ) ; } ; return HttpResponse :: NotAcceptable ( ) . content_type ( " " ) . body ( format ! ( " " answer err ( ) unwrap ( ) ) ) ; }
Change video control for a specific source
Change video control for a specific source
req
HttpRequest
json
web::Json<V4lControl>