{"size": 3735, "ext": "scrbl", "max_stars_repo_path": "video/scribblings/api.scrbl", "max_stars_repo_name": "LeifAndersen/racket-video-backup", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "video/scribblings/api.scrbl", "max_issues_repo_name": "LeifAndersen/racket-video-backup", "max_issues_repo_issues_event_min_datetime": "2017-05-24T00:22:21.000Z", "max_issues_repo_issues_event_max_datetime": "2017-05-24T00:23:51.000Z", "max_forks_repo_path": "video/scribblings/api.scrbl", "max_forks_repo_name": "LeifAndersen/racket-video-backup", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 33.0530973451, "max_line_length": 81, "alphanum_fraction": 0.6053547523}
#lang scribble/manual

@;{
   Copyright 2016-2017 Leif Andersen

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
}

@require[scribble/core
         scribble/example
         racket/sandbox
         (except-in pict table)
         video/private/utils
         video/private/surface
         @for-label[(except-in racket/base filter)
                    racket/contract/base
                    racket/set
                    racket/hash
                    (except-in racket/class field)
                    racket/gui/base
                    racket/draw
                    video/base
                    video/core
                    video/render
                    video/player
                    video/init
                    video/lib]]


@title{Video API}

@defmodule[video/base]

Note that not all of the functions in this module are
currently documented.

@section{Bundled Producers}

@defproc[(blank [length (or/c integer? #f)]) producer?]{
 Creates a blank producer of @racket[length] clips.

 If @racket[length] is @racket[#f], then the producer
 generates as many blank frames as its surrounding @racket[multitrack] requires.}

@defproducer[(color [color (or/c string?
                                 (is-a?/c color%)
                                 (list/c byte? byte? byte?))])]{
 Creates a producer that is a solid color.
 @examples[(eval:alts (color "green") (void))
           (eval:alts (color "yellow" #:length 10) (void))
           (eval:alts (color 255 255 0) (void))]}

@defproducer[(image [file (or/c path-string? path?)])]{
 Creates a producer that is a still image.}
              
@defproducer[(clip [file (or/c path-string? path?)])]{
 Creates a producer from a video file.}

@section{Video Compositing}

@defproc[(playlist [producer producer?] ...
                   [#:transitions transitions (listof field-element?) '()]
                   [#:start start (or/c nonnegative-integer? #f) #f]
                   [#:end end (or/c nonnegative-integer? #f) #f]
                   [#:length length (or/c nonnegative-integer? #f) #f])
         producer?]

@defproc[(multitrack [producer producer?] ...
                     [#:transitions transitions (listof field-element?) '()]
                     [#:start start (or/c nonnegative-integer? #f) #f]
                     [#:end end (or/c nonnegative-integer? #f) #f]
                     [#:length length (or/c nonnegative-integer? #f) #f])
         producer?]

@defproc[(attach-filter [producer producer?]
                        [filter filter?] ...)
         producer?]

@section{Bundled Transitions}

@deftransition[(fade-transition)
               #:direction s/e]

@deftransition[(composite-transition)
                #:direction t/b]

@section{Bundled Filters}

@defproc[(grayscale-filter) filter?]

@section{Properties}

@defproc[(producer-length [producer (and/c video? converted-video?)])
         number?]{
 Determines the length of the producer in frames.

 Note that this function requires the video to already be
 converted. In the future, this restriction may be lifted.
 Also note that this function uses @tt{MLT}'s length feature, which
 seems to be a bit buggy at times.

 @racket[producer] is the video who's length will be tested.}
