media

package
v0.0.0-...-39c852c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package media provides the /media APIs

Index

Constants

View Source
const (
	MediaStateUndefined  trimmer.MediaState = ""
	MediaStateAll        trimmer.MediaState = "all" // used for listing only
	MediaStateCreated    trimmer.MediaState = "created"
	MediaStateUploading  trimmer.MediaState = "uploading"
	MediaStateUploaded   trimmer.MediaState = "uploaded"
	MediaStateAnalyzing  trimmer.MediaState = "analyzing"
	MediaStateProcessing trimmer.MediaState = "processing"
	MediaStateFailed     trimmer.MediaState = "failed"
	MediaStateReady      trimmer.MediaState = "ready"
	MediaStateDeleting   trimmer.MediaState = "deleting"
	MediaStateDeleted    trimmer.MediaState = "deleted"
	MediaStateMissing    trimmer.MediaState = "missing"
)
View Source
const (
	MediaListKindUndefined trimmer.MediaListKind = ""
	MediaListKindAll       trimmer.MediaListKind = "all"
	MediaListKindOwn       trimmer.MediaListKind = "own"
	MediaListKindOnline    trimmer.MediaListKind = "online"
	MediaListKindOffline   trimmer.MediaListKind = "offline"
)

MediaListKind

View Source
const (
	MediaListEventUndefined trimmer.MediaListEvent = ""
	MediaListEventCreated   trimmer.MediaListEvent = "created"
	MediaListEventUpdated   trimmer.MediaListEvent = "updated"
	MediaListEventUploaded  trimmer.MediaListEvent = "uploaded"
	MediaListEventRecorded  trimmer.MediaListEvent = "recorded"
)

MediaListEvent

View Source
const (
	MediaTypeUndefined  trimmer.MediaType = ""
	MediaTypeData       trimmer.MediaType = "data"
	MediaTypeAudioVideo trimmer.MediaType = "audiovideo"
	MediaTypeAudio      trimmer.MediaType = "audio"
	MediaTypeVideo      trimmer.MediaType = "video"
	MediaTypeSequence   trimmer.MediaType = "sequence"
	MediaTypeSubtitle   trimmer.MediaType = "subtitle"
	MediaTypeImage      trimmer.MediaType = "image"
	MediaTypeGrid       trimmer.MediaType = "grid"
	MediaTypeManifest   trimmer.MediaType = "manifest"
	MediaTypeEditlist   trimmer.MediaType = "editlist"
	MediaTypeDocument   trimmer.MediaType = "document"
	MediaTypeSidecar    trimmer.MediaType = "sidecar"
	MediaTypeScript     trimmer.MediaType = "script"
	MediaTypeEmbed      trimmer.MediaType = "embed"
)
View Source
const (
	MediaFamilyUndefined         trimmer.MediaFamily = ""
	MediaFamilyCapture           trimmer.MediaFamily = "capture"
	MediaFamilyCaptureAja        trimmer.MediaFamily = "capture.aja"
	MediaFamilyCaptureArri       trimmer.MediaFamily = "capture.arri"
	MediaFamilyCaptureBlackmagic trimmer.MediaFamily = "capture.blackmagic"
	MediaFamilyCaptureCanon      trimmer.MediaFamily = "capture.canon"
	MediaFamilyCaptureGopro      trimmer.MediaFamily = "capture.gopro"
	MediaFamilyCapturePanasonic  trimmer.MediaFamily = "capture.panasonic"
	MediaFamilyCapturePanavision trimmer.MediaFamily = "capture.panavision"
	MediaFamilyCaptureSony       trimmer.MediaFamily = "capture.sony"
	MediaFamilyCaptureRed        trimmer.MediaFamily = "capture.red"
	MediaFamilyPost              trimmer.MediaFamily = "post"
	MediaFamilyPostProres        trimmer.MediaFamily = "post.prores"
	MediaFamilyPostAVCUltra      trimmer.MediaFamily = "post.avcultra"
	MediaFamilyVfx               trimmer.MediaFamily = "vfx"
	MediaFamilyVfxDPX            trimmer.MediaFamily = "vfx.dpx"
	MediaFamilyVfxEXR            trimmer.MediaFamily = "vfx.exr"
	MediaFamilyVfxTIFF           trimmer.MediaFamily = "vfx.tiff"
	MediaFamilyVfxJPEG           trimmer.MediaFamily = "vfx.jpeg"
	MediaFamilyVfxJPEG2000       trimmer.MediaFamily = "vfx.jpeg2000"
	MediaFamilyWeb               trimmer.MediaFamily = "web"
	MediaFamilyWebImage          trimmer.MediaFamily = "web.image"
	MediaFamilyWebHtml5          trimmer.MediaFamily = "web.html5"
	MediaFamilyWebHls            trimmer.MediaFamily = "web.hls"
	MediaFamilyWebDash           trimmer.MediaFamily = "web.dash"
	MediaFamilyVod               trimmer.MediaFamily = "vod"
	MediaFamilyVodVimeo          trimmer.MediaFamily = "vod.vimeo"
	MediaFamilyVodYoutube        trimmer.MediaFamily = "vod.youtube"
	MediaFamilyVodNetflix        trimmer.MediaFamily = "vod.netflix"
	MediaFamilyVodItunes         trimmer.MediaFamily = "vod.itunes"
	MediaFamilyCinema            trimmer.MediaFamily = "cinema"
	MediaFamilyBroadcast         trimmer.MediaFamily = "broadcast"
	MediaFamilyArchive           trimmer.MediaFamily = "archive"
	MediaFamilyOffice            trimmer.MediaFamily = "office"
	MediaFamilyOfficeDocs        trimmer.MediaFamily = "office.docs"
	MediaFamilyOfficeSheets      trimmer.MediaFamily = "office.sheets"
	MediaFamilyOfficeSlides      trimmer.MediaFamily = "office.slides"
)
View Source
const (
	MediaRelationUndefined trimmer.MediaRelation = ""
	MediaRelationSource    trimmer.MediaRelation = "source"
	MediaRelationInter     trimmer.MediaRelation = "inter"
	MediaRelationProxy     trimmer.MediaRelation = "proxy"
	MediaRelationMaster    trimmer.MediaRelation = "master"
	MediaRelationSidecar   trimmer.MediaRelation = "sidecar"
)
View Source
const (
	MediaFormatUndefined trimmer.MediaFormat = ""
	MediaFormatAAC       trimmer.MediaFormat = "aac"
	MediaFormatALE       trimmer.MediaFormat = "ale"
	MediaFormatArriLook  trimmer.MediaFormat = "aml"
	MediaFormatArriRaw   trimmer.MediaFormat = "ari"
	MediaFormatAVI       trimmer.MediaFormat = "avi"
	MediaFormatBWF       trimmer.MediaFormat = "bwf"
	MediaFormatCDL       trimmer.MediaFormat = "cdl"
	MediaFormatCine      trimmer.MediaFormat = "cine"
	MediaFormatCSV       trimmer.MediaFormat = "csv"
	MediaFormatCUBE      trimmer.MediaFormat = "cube"
	MediaFormatDATA      trimmer.MediaFormat = "data"
	MediaFormatDNG       trimmer.MediaFormat = "dng"
	MediaFormatDOC       trimmer.MediaFormat = "doc"
	MediaFormatDOCM      trimmer.MediaFormat = "docm"
	MediaFormatDOCX      trimmer.MediaFormat = "docx"
	MediaFormatDOT       trimmer.MediaFormat = "dot"
	MediaFormatDOTM      trimmer.MediaFormat = "dotm"
	MediaFormatDOTX      trimmer.MediaFormat = "dotx"
	MediaFormatDPX       trimmer.MediaFormat = "dpx"
	MediaFormatEDL       trimmer.MediaFormat = "edl"
	MediaFormatEXR       trimmer.MediaFormat = "exr"
	MediaFormatFLAC      trimmer.MediaFormat = "flac"
	MediaFormatJPEG      trimmer.MediaFormat = "jpeg"
	MediaFormatJPEG2000  trimmer.MediaFormat = "jp2"
	MediaFormatJPEG2000X trimmer.MediaFormat = "jpx"
	MediaFormatJSON      trimmer.MediaFormat = "json"
	MediaFormatLOOK      trimmer.MediaFormat = "look"
	MediaFormatLUT       trimmer.MediaFormat = "lut"
	MediaFormatM2TS      trimmer.MediaFormat = "m2ts"
	MediaFormatM3U       trimmer.MediaFormat = "m3u"
	MediaFormatM3U8      trimmer.MediaFormat = "m3u8"
	MediaFormatMKV       trimmer.MediaFormat = "mkv"
	MediaFormatMOV       trimmer.MediaFormat = "mov"
	MediaFormatMP3       trimmer.MediaFormat = "mp3"
	MediaFormatMP4       trimmer.MediaFormat = "mp4"
	MediaFormatMPD       trimmer.MediaFormat = "mpd"
	MediaFormatMXF       trimmer.MediaFormat = "mxf"
	MediaFormatOGG       trimmer.MediaFormat = "ogg"
	MediaFormatPDF       trimmer.MediaFormat = "pdf"
	MediaFormatPNG       trimmer.MediaFormat = "png"
	MediaFormatPOT       trimmer.MediaFormat = "pot"
	MediaFormatPOTM      trimmer.MediaFormat = "potm"
	MediaFormatPOTX      trimmer.MediaFormat = "potx"
	MediaFormatPPA       trimmer.MediaFormat = "ppa"
	MediaFormatPPAM      trimmer.MediaFormat = "ppam"
	MediaFormatPPS       trimmer.MediaFormat = "pps"
	MediaFormatPPSM      trimmer.MediaFormat = "ppsm"
	MediaFormatPPSX      trimmer.MediaFormat = "ppsx"
	MediaFormatPPT       trimmer.MediaFormat = "ppt"
	MediaFormatPPTM      trimmer.MediaFormat = "pptm"
	MediaFormatPPTX      trimmer.MediaFormat = "pptx"
	MediaFormatPSD       trimmer.MediaFormat = "psd"
	MediaFormatR3D       trimmer.MediaFormat = "r3d"
	MediaFormatRMD       trimmer.MediaFormat = "rmd"
	MediaFormatSRT       trimmer.MediaFormat = "srt"
	MediaFormatSVG       trimmer.MediaFormat = "svg"
	MediaFormatTIFF      trimmer.MediaFormat = "tiff"
	MediaFormatTXT       trimmer.MediaFormat = "txt"
	MediaFormatWAV       trimmer.MediaFormat = "wav"
	MediaFormatWEBM      trimmer.MediaFormat = "webm"
	MediaFormatWebVTT    trimmer.MediaFormat = "vtt"
	MediaFormatXLA       trimmer.MediaFormat = "xla"
	MediaFormatXLAM      trimmer.MediaFormat = "xlam"
	MediaFormatXLS       trimmer.MediaFormat = "xls"
	MediaFormatXLSB      trimmer.MediaFormat = "xlsb"
	MediaFormatXLSM      trimmer.MediaFormat = "xlsm"
	MediaFormatXLSX      trimmer.MediaFormat = "xlsx"
	MediaFormatXLT       trimmer.MediaFormat = "xlt"
	MediaFormatXLTM      trimmer.MediaFormat = "xltm"
	MediaFormatXLTX      trimmer.MediaFormat = "xltx"
	MediaFormatXML       trimmer.MediaFormat = "xml"
	MediaFormatXMP       trimmer.MediaFormat = "xmp"
)
View Source
const (
	MediaRoleUndefined trimmer.MediaRole = ""
	// top-level roles
	MediaRoleImage   trimmer.MediaRole = "image"
	MediaRoleVideo   trimmer.MediaRole = "video"
	MediaRoleAudio   trimmer.MediaRole = "audio"
	MediaRoleScript  trimmer.MediaRole = "script"
	MediaRoleWeb     trimmer.MediaRole = "web"
	MediaRoleOffice  trimmer.MediaRole = "office"
	MediaRoleSidecar trimmer.MediaRole = "sidecar"
	// pre-defined video sub-roles
	MediaRoleDailies   trimmer.MediaRole = "video.dailies"
	MediaRoleEditorial trimmer.MediaRole = "video.editorial"
	MediaRoleVfx       trimmer.MediaRole = "video.vfx"
	MediaRoleTitles    trimmer.MediaRole = "video.titles"
	// pre-defined audio sub-roles
	MediaRoleDialogue trimmer.MediaRole = "audio.dialogue"
	MediaRoleMusic    trimmer.MediaRole = "audio.music"
	MediaRoleFoley    trimmer.MediaRole = "audio.foley"
	MediaRoleEffects  trimmer.MediaRole = "audio.effects"
	// pre-defined script sub-roles
	MediaRoleDraft trimmer.MediaRole = "script.draft"
	MediaRoleFinal trimmer.MediaRole = "script.final"
	MediaRoleNotes trimmer.MediaRole = "script.notes"
	// pre-defined web sub-roles
	MediaRolePoster     trimmer.MediaRole = "web.poster"
	MediaRoleStoryboard trimmer.MediaRole = "web.storyboard"
	MediaRoleThumbnail  trimmer.MediaRole = "web.thumbnail"
	MediaRoleAvatar     trimmer.MediaRole = "web.avatar"
	MediaRoleBanner     trimmer.MediaRole = "web.banner"
	MediaRoleBackground trimmer.MediaRole = "web.background"
	MediaRoleWatermark  trimmer.MediaRole = "web.watermark"
	// pre-defined office roles
	MediaRoleOfficeAccounting trimmer.MediaRole = "office.accounting"
	MediaRoleOfficeLegal      trimmer.MediaRole = "office.legal"
	MediaRoleOfficeReport     trimmer.MediaRole = "office.report"
)
View Source
const (
	ColorModelUndefined   trimmer.ColorModel = ""
	ColorModelRGB         trimmer.ColorModel = "rgb"         // 0: Identity: RGB, XYZ, IEC 61966-2-1 sRGB, SMPTE ST428-1
	ColorModelBT709       trimmer.ColorModel = "bt709"       // 1: BT.709, BT.1361-0, IEC 61966-2-1 sYCC, IEC 61966-2-4 xvYCC_709, SMPTE RP177 Annex B
	ColorModelUnspecified trimmer.ColorModel = "unspecified" // 2
	ColorModelReserved    trimmer.ColorModel = "reserved"    // 3
	ColorModelFCC         trimmer.ColorModel = "fcc"         // 4: FCC Title 47:2003 73.682 (a) (20)
	ColorModelBT470BG     trimmer.ColorModel = "bt470bg"     // 5: BT.470BG, BT.601 625, BT.1700 PAL/SECAM, IEC 61966-2-4 xvYCC_601
	ColorModelSMPTE170M   trimmer.ColorModel = "smpte170m"   // 6: BT.601 525, BT.1700 NTSC, SMPTE 170M:2004
	ColorModelSMPTE240M   trimmer.ColorModel = "smpte240m"   // 7: SMPTE 240M:1999 (functionally identitcal to smpte170m)
	ColorModelYCGCO       trimmer.ColorModel = "ycgco"       // 8: YCgCo, Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
	ColorModelBT2020NCL   trimmer.ColorModel = "bt2020ncl"   // 9: BT.2020 NCL, BT.2100 [HDR-TV] YCbCr (non-constant luminance system)
	ColorModelBT2020CL    trimmer.ColorModel = "bt2020cl"    // 10: BT.2020 CL (constant luminance system)
	ColorModelYDZYX       trimmer.ColorModel = "ydzyx"       // 11: SMPTE ST 2085:2015 YDzDx
	ColorModelDERIVED_NCL trimmer.ColorModel = "derived_ncl" // 12: NCL computed, see ISO/IEC 23001-8:2016
	ColorModelDERIVED_CL  trimmer.ColorModel = "derived_cl"  // 13: NCL computed, see ISO/IEC 23001-8:2016
	ColorModelICTCP       trimmer.ColorModel = "ictcp"       // 14: BT.2100 [HDR-TV] ICtCp with constant luminance system
	ColorModelYCBCR       trimmer.ColorModel = "ycbcr"
	ColorModelXVYCC       trimmer.ColorModel = "xvycc"
	ColorModelSRGB        trimmer.ColorModel = "srgb"
	ColorModelAdobeRGB    trimmer.ColorModel = "adobergb"
	ColorModelHSV         trimmer.ColorModel = "hsv"
	ColorModelHLS         trimmer.ColorModel = "hls"
	ColorModelXYZ         trimmer.ColorModel = "xyz"
)

Image and Video Color spaces (i.e. Matrix Coefficients)

View Source
const (
	ColorPrimariesUndefined   trimmer.ColorPrimaries = ""
	ColorPrimariesReserved0   trimmer.ColorPrimaries = "reserved0"   // 0: reserved
	ColorPrimariesBT709       trimmer.ColorPrimaries = "bt709"       // 1: BT.709, BT.1316-0, IEC 61966-2-1 sRGB/sYCC, IEC 61966-2-4, SMPTE RP 177:1993 Annex B
	ColorPrimariesUnspecified trimmer.ColorPrimaries = "unspecified" // 2: Unspecified
	ColorPrimariesReserved    trimmer.ColorPrimaries = "reserved"    // 3: Reserved
	ColorPrimariesBT470M      trimmer.ColorPrimaries = "bt470m"      // 4: BT.470M
	ColorPrimariesBT470BG     trimmer.ColorPrimaries = "bt470bg"     // 5: BT.470BG, BT.601 625, BT.1700 PAL/SECAM
	ColorPrimariesSMPTE170M   trimmer.ColorPrimaries = "smpte170m"   // 6: BT.601 525, BT.1700 NTSC, SMPTE 170M:2004
	ColorPrimariesSMPTE240M   trimmer.ColorPrimaries = "smpte240m"   // 7: SMPTE 240M:1999
	ColorPrimariesFilm        trimmer.ColorPrimaries = "film"        // 8: Generic Film (Illuminant C)
	ColorPrimariesBT2020      trimmer.ColorPrimaries = "bt2020"      // 9: BT.2020-2, BT.[HDR-TV]
	ColorPrimariesSMPTE428    trimmer.ColorPrimaries = "smpte428"    // 10: SMPTE 428-1 (CIE 1931 XYZ)
	ColorPrimariesP3DCI       trimmer.ColorPrimaries = "p3dci"       // 11: SMPTE RP 431-2:2011 (P3 Theatrical, DCI Whitepoint)
	ColorPrimariesP3D65       trimmer.ColorPrimaries = "p3d65"       // 12: SMPTE EG 432-1:2010 (P3 D65)
	ColorPrimariesP3D60       trimmer.ColorPrimaries = "p3d60"       // ??: SMPTE EG 432-1:2010 (P3 D60)
	ColorPrimariesXYZ         trimmer.ColorPrimaries = "xyz"
	ColorPrimariesJedec22     trimmer.ColorPrimaries = "jedec-p22" // EBU 3213-E (1975), JEDEC P22 Phosphors

	// ACES Primaries
	ColorPrimariesAcesAP0 trimmer.ColorPrimaries = "aces-ap0" // ACES full
	ColorPrimariesAcesAP1 trimmer.ColorPrimaries = "aces-ap1" // ACES limited

	// vendor-specific color primaries
	ColorPrimariesNative          trimmer.ColorPrimaries = "native"          // sensor-native, use when unknown vendor
	ColorPrimariesAdobeRGB        trimmer.ColorPrimaries = "adobergb"        // Adobe
	ColorPrimariesAlexaWideGamut  trimmer.ColorPrimaries = "logcwgam"        // Arri
	ColorPrimariesVgamut          trimmer.ColorPrimaries = "vgamut"          // Panasonic
	ColorPrimariesSgamut          trimmer.ColorPrimaries = "sgamut"          // Sony
	ColorPrimariesSgamut2         trimmer.ColorPrimaries = "sgamut2"         // Sony
	ColorPrimariesSgamut3         trimmer.ColorPrimaries = "sgamut3"         // Sony
	ColorPrimariesSgamut3cine     trimmer.ColorPrimaries = "sgamut3cine"     // Sony
	ColorPrimariesREDcolor        trimmer.ColorPrimaries = "redcolor"        // RED
	ColorPrimariesREDcolor2       trimmer.ColorPrimaries = "redcolor2"       // RED
	ColorPrimariesREDcolor3       trimmer.ColorPrimaries = "redcolor3"       // RED
	ColorPrimariesREDcolor4       trimmer.ColorPrimaries = "redcolor4"       // RED
	ColorPrimariesDragonColor     trimmer.ColorPrimaries = "dragoncolor"     // RED
	ColorPrimariesDragonColor2    trimmer.ColorPrimaries = "dragoncolor2"    // RED
	ColorPrimariesREDWideGamutRGB trimmer.ColorPrimaries = "redwidegamutrgb" // RED
)
View Source
const (
	ColorTransferUndefined    trimmer.ColorTransfer = ""
	ColorTransferReserved0    trimmer.ColorTransfer = "reserved0"    // 0: reserved
	ColorTransferBT709        trimmer.ColorTransfer = "bt709"        // 1: BT.709, BT.1316-0; (== 6, 14, 15; default)
	ColorTransferUnspecified  trimmer.ColorTransfer = "unspecified"  // 2: Unspecified
	ColorTransferReserved     trimmer.ColorTransfer = "reserved"     // 3: Reserved
	ColorTransferBT470M       trimmer.ColorTransfer = "bt470m"       // 4: BT.470M, BT.1700 PAL/SECAM (display gamma 2.2)
	ColorTransferBT470BG      trimmer.ColorTransfer = "bt470bg"      // 5: BT.470BG (display gamma 2.8)
	ColorTransferSMPTE170M    trimmer.ColorTransfer = "smpte170m"    // 6: BT.601 525, BT.1700 NTSC, SMPTE 170M:2004 (== _1_, 14, 15)
	ColorTransferSMPTE240M    trimmer.ColorTransfer = "smpte240m"    // 7: SMPTE 240M:1999
	ColorTransferLINEAR       trimmer.ColorTransfer = "linear"       // 8: Linear
	ColorTransferLOG100       trimmer.ColorTransfer = "log100"       // 9: Log
	ColorTransferLOG316       trimmer.ColorTransfer = "log316"       // 10: Log SQRT
	ColorTransferIEC61966_24  trimmer.ColorTransfer = "iec61966-24"  // 11: IEC 61966-2-4 xvYCC
	ColorTransferBT1361       trimmer.ColorTransfer = "bt1361"       // 12: BT.1361-0 ITU-R BT1361 Extended Colour Gamut
	ColorTransferIEC61966_21  trimmer.ColorTransfer = "iec61966-21"  // 13: IEC 61966-2-1 sRGB
	ColorTransferBT2020_10    trimmer.ColorTransfer = "bt2020-10"    // 14: BT.2020 10bit (== _1_, 6, 15)
	ColorTransferBT2020_12    trimmer.ColorTransfer = "bt2020-12"    // 15: BT.2020 12bit (== _1_, 6, 14)
	ColorTransferSMPTE2084    trimmer.ColorTransfer = "smpte2084"    // 16: SMPTE ST2084:2014 (10/12/14/16 bit), BT.2100 [HDR PQ]
	ColorTransferSMPTE428     trimmer.ColorTransfer = "smpte428"     // 17: SMPTE ST 428-1, DCI
	ColorTransferARIB_STD_B67 trimmer.ColorTransfer = "arib-std-b67" // 18: ARIB STD-B67, HDR HLG

	// ACES transfer characteristics (Note: ACES is an RGB color space)
	ColorTransferACES2065_1 trimmer.ColorTransfer = "aces_2065_1" // ST2065-1 and TB-2014-004
	ColorTransferACEScc     trimmer.ColorTransfer = "aces_cc"     // S-2014-003
	ColorTransferACEScct    trimmer.ColorTransfer = "aces_cct"    // S-2016-001
	ColorTransferACESproxy  trimmer.ColorTransfer = "aces_proxy"  // S-2013-001
	ColorTransferACEScg     trimmer.ColorTransfer = "aces_cg"     // S-2014-004

	// Film stock
	ColorTransferFilm trimmer.ColorTransfer = "film" // generic film stock, details in other metadata
	ColorTransferADX  trimmer.ColorTransfer = "adx"  // SMPTE ST 2065-3 (ADX, Academy Density Exchange Encoding)

	// vendor-specific color transfers
	ColorTransferAdobeRGB   trimmer.ColorTransfer = "adobergb"   // Adobe RGB
	ColorTransferLogC       trimmer.ColorTransfer = "log-c"      // Arri LogC
	ColorTransferSlog       trimmer.ColorTransfer = "slog"       // Sony
	ColorTransferSlog2      trimmer.ColorTransfer = "slog2"      // Sony
	ColorTransferSlog3      trimmer.ColorTransfer = "slog3"      // Sony
	ColorTransferCineonLog  trimmer.ColorTransfer = "cineon-log" // DPX
	ColorTransferCLog       trimmer.ColorTransfer = "c-log"      // Canon
	ColorTransferCLog2      trimmer.ColorTransfer = "c-log2"     // Canon
	ColorTransferCLog3      trimmer.ColorTransfer = "c-log3"     // Canon
	ColorTransferVLog       trimmer.ColorTransfer = "v-log"      // Panasonic (Varicam)
	ColorTransferREDlog     trimmer.ColorTransfer = "redlog"     // RED
	ColorTransferREDlogFilm trimmer.ColorTransfer = "redlogfilm" // RED
	ColorTransferREDLog3G10 trimmer.ColorTransfer = "redlog3g10" // RED
	ColorTransferREDgamma   trimmer.ColorTransfer = "redgamma"   // RED
	ColorTransferREDgamma2  trimmer.ColorTransfer = "redgamma2"  // RED
	ColorTransferREDgamma3  trimmer.ColorTransfer = "redgamma3"  // RED
	ColorTransferREDgamma4  trimmer.ColorTransfer = "redgamma4"  // RED
)
View Source
const (
	ColorRangeUndefined   trimmer.ColorRange = ""
	ColorRangeUnspecified trimmer.ColorRange = "unspecified"
	ColorRangeLegal       trimmer.ColorRange = "legal"
	ColorRangeFull        trimmer.ColorRange = "full"
)
View Source
const (
	ColorLocationUndefined   trimmer.ColorLocation = ""
	ColorLocationUnspecified trimmer.ColorLocation = "unspecified"
	ColorLocationLeft        trimmer.ColorLocation = "left"
	ColorLocationCenter      trimmer.ColorLocation = "center"
	ColorLocationTop         trimmer.ColorLocation = "top"
	ColorLocationTopLeft     trimmer.ColorLocation = "topleft"
	ColorLocationBottom      trimmer.ColorLocation = "bottom"
	ColorLocationBottomLeft  trimmer.ColorLocation = "bottomleft"
)
View Source
const (
	PixelFormatUndefined     trimmer.PixelFormat = ""
	PixelFormatUnspecified   trimmer.PixelFormat = "unspecified"
	PixelFormatNone          trimmer.PixelFormat = "none"
	PixelFormatYUV420P       trimmer.PixelFormat = "yuv420p"
	PixelFormatYUYV422       trimmer.PixelFormat = "yuyv422"
	PixelFormatRGB24         trimmer.PixelFormat = "rgb24"
	PixelFormatBGR24         trimmer.PixelFormat = "bgr24"
	PixelFormatYUV422P       trimmer.PixelFormat = "yuv422p"
	PixelFormatYUV444P       trimmer.PixelFormat = "yuv444p"
	PixelFormatHalf          trimmer.PixelFormat = "half"
	PixelFormatFloat         trimmer.PixelFormat = "float"
	PixelFormatUint          trimmer.PixelFormat = "uint"
	PixelFormatYUV410P       trimmer.PixelFormat = "yuv410p"
	PixelFormatYUV411P       trimmer.PixelFormat = "yuv411p"
	PixelFormatYUVJ411P      trimmer.PixelFormat = "yuvj411p"
	PixelFormatPAL8          trimmer.PixelFormat = "pal8"
	PixelFormatYUVJ420P      trimmer.PixelFormat = "yuvj420p"
	PixelFormatYUVJ422P      trimmer.PixelFormat = "yuvj422p"
	PixelFormatYUVJ444P      trimmer.PixelFormat = "yuvj444p"
	PixelFormatUYVY422       trimmer.PixelFormat = "uyvy422"
	PixelFormatUYYVYY411     trimmer.PixelFormat = "uyyvyy411"
	PixelFormatBGR8          trimmer.PixelFormat = "bgr8"
	PixelFormatRGB8          trimmer.PixelFormat = "rgb8"
	PixelFormatNV12          trimmer.PixelFormat = "nv12"
	PixelFormatNV21          trimmer.PixelFormat = "nv21"
	PixelFormatARGB          trimmer.PixelFormat = "argb"
	PixelFormatRGBA          trimmer.PixelFormat = "rgba"
	PixelFormatABGR          trimmer.PixelFormat = "abgr"
	PixelFormatBGRA          trimmer.PixelFormat = "bgra"
	PixelFormat0RGB          trimmer.PixelFormat = "0rgb"
	PixelFormatRGB0          trimmer.PixelFormat = "rgb0"
	PixelFormat0BGR          trimmer.PixelFormat = "0bgr"
	PixelFormatBGR0          trimmer.PixelFormat = "bgr0"
	PixelFormatGRAY16BE      trimmer.PixelFormat = "gray16be"
	PixelFormatGRAY16LE      trimmer.PixelFormat = "gray16le"
	PixelFormatYUV440P       trimmer.PixelFormat = "yuv440p"
	PixelFormatYUVJ440P      trimmer.PixelFormat = "yuvj440p"
	PixelFormatYUVA420P      trimmer.PixelFormat = "yuva420p"
	PixelFormatYUVA422P      trimmer.PixelFormat = "yuva422p"
	PixelFormatYUVA444P      trimmer.PixelFormat = "yuva444p"
	PixelFormatYUVA420P9BE   trimmer.PixelFormat = "yuva420p9be"
	PixelFormatYUVA420P9LE   trimmer.PixelFormat = "yuva420p9le"
	PixelFormatYUVA422P9BE   trimmer.PixelFormat = "yuva422p9be"
	PixelFormatYUVA422P9LE   trimmer.PixelFormat = "yuva422p9le"
	PixelFormatYUVA444P9BE   trimmer.PixelFormat = "yuva444p9be"
	PixelFormatYUVA444P9LE   trimmer.PixelFormat = "yuva444p9le"
	PixelFormatYUVA420P10BE  trimmer.PixelFormat = "yuva420p10be"
	PixelFormatYUVA420P10LE  trimmer.PixelFormat = "yuva420p10le"
	PixelFormatYUVA422P10BE  trimmer.PixelFormat = "yuva422p10be"
	PixelFormatYUVA422P10LE  trimmer.PixelFormat = "yuva422p10le"
	PixelFormatYUVA444P10BE  trimmer.PixelFormat = "yuva444p10be"
	PixelFormatYUVA444P10LE  trimmer.PixelFormat = "yuva444p10le"
	PixelFormatYUVA420P16BE  trimmer.PixelFormat = "yuva420p16be"
	PixelFormatYUVA420P16LE  trimmer.PixelFormat = "yuva420p16le"
	PixelFormatYUVA422P16BE  trimmer.PixelFormat = "yuva422p16be"
	PixelFormatYUVA422P16LE  trimmer.PixelFormat = "yuva422p16le"
	PixelFormatYUVA444P16BE  trimmer.PixelFormat = "yuva444p16be"
	PixelFormatYUVA444P16LE  trimmer.PixelFormat = "yuva444p16le"
	PixelFormatRGB48BE       trimmer.PixelFormat = "rgb48be"
	PixelFormatRGB48LE       trimmer.PixelFormat = "rgb48le"
	PixelFormatRGBA64BE      trimmer.PixelFormat = "rgba64be"
	PixelFormatRGBA64LE      trimmer.PixelFormat = "rgba64le"
	PixelFormatRGB565BE      trimmer.PixelFormat = "rgb565be"
	PixelFormatRGB565LE      trimmer.PixelFormat = "rgb565le"
	PixelFormatRGB555BE      trimmer.PixelFormat = "rgb555be"
	PixelFormatRGB555LE      trimmer.PixelFormat = "rgb555le"
	PixelFormatRGB444BE      trimmer.PixelFormat = "rgb444be"
	PixelFormatRGB444LE      trimmer.PixelFormat = "rgb444le"
	PixelFormatBGR48BE       trimmer.PixelFormat = "bgr48be"
	PixelFormatBGR48LE       trimmer.PixelFormat = "bgr48le"
	PixelFormatBGRA64BE      trimmer.PixelFormat = "bgra64be"
	PixelFormatBGRA64LE      trimmer.PixelFormat = "bgra64le"
	PixelFormatBGR565BE      trimmer.PixelFormat = "bgr565be"
	PixelFormatBGR565LE      trimmer.PixelFormat = "bgr565le"
	PixelFormatBGR555BE      trimmer.PixelFormat = "bgr555be"
	PixelFormatBGR555LE      trimmer.PixelFormat = "bgr555le"
	PixelFormatBGR444BE      trimmer.PixelFormat = "bgr444be"
	PixelFormatBGR444LE      trimmer.PixelFormat = "bgr444le"
	PixelFormatYUV420P9LE    trimmer.PixelFormat = "yuv420p9le"
	PixelFormatYUV420P9BE    trimmer.PixelFormat = "yuv420p9be"
	PixelFormatYUV420P10LE   trimmer.PixelFormat = "yuv420p10le"
	PixelFormatYUV420P10BE   trimmer.PixelFormat = "yuv420p10be"
	PixelFormatYUV420P12LE   trimmer.PixelFormat = "yuv420p12le"
	PixelFormatYUV420P12BE   trimmer.PixelFormat = "yuv420p12be"
	PixelFormatYUV420P14LE   trimmer.PixelFormat = "yuv420p14le"
	PixelFormatYUV420P14BE   trimmer.PixelFormat = "yuv420p14be"
	PixelFormatYUV420P16LE   trimmer.PixelFormat = "yuv420p16le"
	PixelFormatYUV420P16BE   trimmer.PixelFormat = "yuv420p16be"
	PixelFormatYUV422P9LE    trimmer.PixelFormat = "yuv422p9le"
	PixelFormatYUV422P9BE    trimmer.PixelFormat = "yuv422p9be"
	PixelFormatYUV422P10LE   trimmer.PixelFormat = "yuv422p10le"
	PixelFormatYUV422P10BE   trimmer.PixelFormat = "yuv422p10be"
	PixelFormatYUV422P12LE   trimmer.PixelFormat = "yuv422p12le"
	PixelFormatYUV422P12BE   trimmer.PixelFormat = "yuv422p12be"
	PixelFormatYUV422P14LE   trimmer.PixelFormat = "yuv422p14le"
	PixelFormatYUV422P14BE   trimmer.PixelFormat = "yuv422p14be"
	PixelFormatYUV422P16LE   trimmer.PixelFormat = "yuv422p16le"
	PixelFormatYUV422P16BE   trimmer.PixelFormat = "yuv422p16be"
	PixelFormatYUV444P16LE   trimmer.PixelFormat = "yuv444p16le"
	PixelFormatYUV444P16BE   trimmer.PixelFormat = "yuv444p16be"
	PixelFormatYUV444P10LE   trimmer.PixelFormat = "yuv444p10le"
	PixelFormatYUV444P10BE   trimmer.PixelFormat = "yuv444p10be"
	PixelFormatYUV444P9LE    trimmer.PixelFormat = "yuv444p9le"
	PixelFormatYUV444P9BE    trimmer.PixelFormat = "yuv444p9be"
	PixelFormatYUV444P12LE   trimmer.PixelFormat = "yuv444p12le"
	PixelFormatYUV444P12BE   trimmer.PixelFormat = "yuv444p12be"
	PixelFormatYUV444P14LE   trimmer.PixelFormat = "yuv444p14le"
	PixelFormatYUV444P14BE   trimmer.PixelFormat = "yuv444p14be"
	PixelFormatGRAY8         trimmer.PixelFormat = "gray8"
	PixelFormatGRAY8A        trimmer.PixelFormat = "gray8a"
	PixelFormatGBRP          trimmer.PixelFormat = "gbrp"
	PixelFormatGBRP9LE       trimmer.PixelFormat = "gbrp9le"
	PixelFormatGBRP9BE       trimmer.PixelFormat = "gbrp9be"
	PixelFormatGBRP10LE      trimmer.PixelFormat = "gbrp10le"
	PixelFormatGBRP10BE      trimmer.PixelFormat = "gbrp10be"
	PixelFormatGBRP12LE      trimmer.PixelFormat = "gbrp12le"
	PixelFormatGBRP12BE      trimmer.PixelFormat = "gbrp12be"
	PixelFormatGBRP14LE      trimmer.PixelFormat = "gbrp14le"
	PixelFormatGBRP14BE      trimmer.PixelFormat = "gbrp14be"
	PixelFormatGBRP16LE      trimmer.PixelFormat = "gbrp16le"
	PixelFormatGBRP16BE      trimmer.PixelFormat = "gbrp16be"
	PixelFormatGBRAP         trimmer.PixelFormat = "gbrap"
	PixelFormatGBRAP16LE     trimmer.PixelFormat = "gbrap16le"
	PixelFormatGBRAP16BE     trimmer.PixelFormat = "gbrap16be"
	PixelFormatXYZ12LE       trimmer.PixelFormat = "xyz12le"
	PixelFormatXYZ12BE       trimmer.PixelFormat = "xyz12be"
	PixelFormatBayerBGGR8    trimmer.PixelFormat = "bayer_bggr8"
	PixelFormatBayerRGGB8    trimmer.PixelFormat = "bayer_rggb8"
	PixelFormatBayerGBRG8    trimmer.PixelFormat = "bayer_gbrg8"
	PixelFormatBayerGRBG8    trimmer.PixelFormat = "bayer_grbg8"
	PixelFormatBayerBGGR16LE trimmer.PixelFormat = "bayer_bggr16le"
	PixelFormatBayerBGGR16BE trimmer.PixelFormat = "bayer_bggr16be"
	PixelFormatBayerRGGB16LE trimmer.PixelFormat = "bayer_rggb16le"
	PixelFormatBayerRGGB16BE trimmer.PixelFormat = "bayer_rggb16be"
	PixelFormatBayerGBRG16LE trimmer.PixelFormat = "bayer_gbrg16le"
	PixelFormatBayerGBRG16BE trimmer.PixelFormat = "bayer_gbrg16be"
	PixelFormatBayerGRBG16LE trimmer.PixelFormat = "bayer_grbg16le"
	PixelFormatBayerGRBG16BE trimmer.PixelFormat = "bayer_grbg16be"
)
View Source
const (
	VideoCodecUndefined      trimmer.VideoCodec = ""
	VideoCodecNone           trimmer.VideoCodec = "none"
	VideoCodecAVC            trimmer.VideoCodec = "avc"
	VideoCodecAVCIntra       trimmer.VideoCodec = "avcintra"
	VideoCodecAVCProxy       trimmer.VideoCodec = "avcproxy"
	VideoCodecAVCLongG       trimmer.VideoCodec = "avclongg"
	VideoCodecHEVC           trimmer.VideoCodec = "hevc"
	VideoCodecVP8            trimmer.VideoCodec = "vp8"
	VideoCodecVP9            trimmer.VideoCodec = "vp9"
	VideoCodecMPEG2          trimmer.VideoCodec = "mpeg2"
	VideoCodecMPEG4          trimmer.VideoCodec = "mpeg4"
	VideoCodecProres422Proxy trimmer.VideoCodec = "prores422proxy"
	VideoCodecProres422Lt    trimmer.VideoCodec = "prores422lt"
	VideoCodecProres422      trimmer.VideoCodec = "prores422"
	VideoCodecProres422hq    trimmer.VideoCodec = "prores422hq"
	VideoCodecProres4444     trimmer.VideoCodec = "prores4444"
	VideoCodecProres4444xq   trimmer.VideoCodec = "prores4444xq"
	VideoCodecDNxHD          trimmer.VideoCodec = "dnxhd"
	VideoCodecDNxHR          trimmer.VideoCodec = "dnxhr"
	VideoCodecArriraw        trimmer.VideoCodec = "arriraw"
	VideoCodecRedCode        trimmer.VideoCodec = "redcode"
	VideoCodecJPEG           trimmer.VideoCodec = "jpeg"
	VideoCodecJPEG2000       trimmer.VideoCodec = "jpeg2000"
	VideoCodecDNG            trimmer.VideoCodec = "dng"
	VideoCodecDPX            trimmer.VideoCodec = "dpx"
	VideoCodecTIFF           trimmer.VideoCodec = "tiff"
	VideoCodecEXR            trimmer.VideoCodec = "exr"
	VideoCodecPNG            trimmer.VideoCodec = "png"
)
View Source
const (
	AudioLayoutUndefined     trimmer.AudioLayout = ""
	AudioLayoutNone          trimmer.AudioLayout = "none"
	AudioLayoutMono          trimmer.AudioLayout = "mono"
	AudioLayoutStereo        trimmer.AudioLayout = "stereo"
	AudioLayout2_1           trimmer.AudioLayout = "2.1"      // FL+FR+LFE
	AudioLayout3_0           trimmer.AudioLayout = "3.0"      // FL+FR+FC
	AudioLayout3_0Back       trimmer.AudioLayout = "3.0b"     // FL+FR+BC
	AudioLayout4_0           trimmer.AudioLayout = "4.0"      // FL+FR+FC+BC
	AudioLayoutQuad          trimmer.AudioLayout = "quad"     // FL+FR+BL+BR
	AudioLayoutQuadSide      trimmer.AudioLayout = "quads"    // FL+FR+SL+SR
	AudioLayout3_1           trimmer.AudioLayout = "3.1"      // FL+FR+FC+LFE
	AudioLayout5_0           trimmer.AudioLayout = "5.0"      // FL+FR+FC+BL+BR
	AudioLayout5_0Side       trimmer.AudioLayout = "5.0s"     // FL+FR+FC+SL+SR
	AudioLayout4_1           trimmer.AudioLayout = "4.1"      // FL+FR+FC+LFE+BC
	AudioLayout5_1           trimmer.AudioLayout = "5.1"      // FL+FR+FC+LFE+BL+BR
	AudioLayout5_1Side       trimmer.AudioLayout = "5.1s"     // FL+FR+FC+LFE+SL+SR
	AudioLayout6_0           trimmer.AudioLayout = "6.0"      // FL+FR+FC+BC+SL+SR
	AudioLayout6_0Front      trimmer.AudioLayout = "6.0f"     // FL+FR+FLC+FRC+SL+SR
	AudioLayoutHexagonal     trimmer.AudioLayout = "hexa"     // FL+FR+FC+BL+BR+BC
	AudioLayout6_1           trimmer.AudioLayout = "6.1"      // FL+FR+FC+LFE+BC+SL+SR
	AudioLayout6_1Back       trimmer.AudioLayout = "6.1b"     // FL+FR+FC+LFE+BL+BR+BC
	AudioLayout6_1Front      trimmer.AudioLayout = "6.1f"     // FL+FR+LFE+FLC+FRC+SL+SR
	AudioLayout7_0           trimmer.AudioLayout = "7.0"      // FL+FR+FC+BL+BR+SL+SR
	AudioLayout7_0Front      trimmer.AudioLayout = "7.0f"     // FL+FR+FC+FLC+FRC+SL+SR
	AudioLayout7_1           trimmer.AudioLayout = "7.1"      // FL+FR+FC+LFE+BL+BR+SL+SR
	AudioLayout7_1Wide       trimmer.AudioLayout = "7.1w"     // FL+FR+FC+LFE+BL+BR+FLC+FRC
	AudioLayout7_1WideSide   trimmer.AudioLayout = "7.1ws"    // FL+FR+FC+LFE+FLC+FRC+SL+SR
	AudioLayoutOctagonal     trimmer.AudioLayout = "octa"     // FL+FR+FC+BL+BR+BC+SL+SR
	AudioLayoutHexadecagonal trimmer.AudioLayout = "hexadeca" // FL+FR+FC+BL+BR+BC+SL+SR+TFL+TFC+TFR+TBL+TBC+TBR+WL+WR
	AudioLayoutDownmix       trimmer.AudioLayout = "downmix"  // DL+DR
)
View Source
const (
	AudioCodecUndefined trimmer.AudioCodec = ""
	AudioCodecNone      trimmer.AudioCodec = "none"
	AudioCodecPCM       trimmer.AudioCodec = "pcm"
	AudioCodecAAC       trimmer.AudioCodec = "aac"
	AudioCodecAC3       trimmer.AudioCodec = "ac3"
	AudioCodecMP3       trimmer.AudioCodec = "mp3"
	AudioCodecFLAC      trimmer.AudioCodec = "flac"
	AudioCodecVorbis    trimmer.AudioCodec = "vorbis"
	AudioCodecOpus      trimmer.AudioCodec = "opus"
)
View Source
const (
	SubtitleCodecUndefined    trimmer.SubtitleCodec = ""
	SubtitleCodecNone         trimmer.SubtitleCodec = "none"
	SubtitleCodec3GPP         trimmer.SubtitleCodec = "3gpp"
	SubtitleCodecBluRay       trimmer.SubtitleCodec = "bluray"
	SubtitleCodecDCI          trimmer.SubtitleCodec = "dci"
	SubtitleCodecDVB          trimmer.SubtitleCodec = "dvb"
	SubtitleCodecDVD          trimmer.SubtitleCodec = "dvd"
	SubtitleCodecSMPTE20521TT trimmer.SubtitleCodec = "smpte_2052_1_tt"
	SubtitleCodecSRT          trimmer.SubtitleCodec = "srt"
	SubtitleCodecTTML         trimmer.SubtitleCodec = "ttml"
	SubtitleCodecWebVTT       trimmer.SubtitleCodec = "webvtt"
	SubtitleCodecEBUTT        trimmer.SubtitleCodec = "ebu_tt"
)
View Source
const (
	CDLModeUndefined trimmer.CDLMode = ""
	CDLModeSource    trimmer.CDLMode = "source" // Arri: "CDL LogC"
	CDLModeTarget    trimmer.CDLMode = "target" // Arri: "CDL Video"
)
View Source
const (
	CropNone         trimmer.CropMode = ""
	CropStored       trimmer.CropMode = "stored"
	CropSampled      trimmer.CropMode = "sampled"
	CropDisplay      trimmer.CropMode = "display"
	CropCenterCut43  trimmer.CropMode = "centercut43"  // SMPTE ST 2067-2:2013 Annex G
	CropCenterCut169 trimmer.CropMode = "centercut169" // SMPTE ST 2067-2:2013 Annex G
)
View Source
const (
	FlipNone       trimmer.FlipMode = ""
	FlipHorizontal trimmer.FlipMode = "horizontal"
	FlipVertical   trimmer.FlipMode = "vertical"
	FlipBoth       trimmer.FlipMode = "both"
)
View Source
const (
	RotateNone                  trimmer.RotateMode = ""
	RotateClockPortrait         trimmer.RotateMode = "portrait_clock"   // rotate clock-wise into portrait mode if necessary
	RotateClockLandscape        trimmer.RotateMode = "landscape_clock"  // rotate clock-wise into landscape mode if necessary
	RotateCounterClockPortrait  trimmer.RotateMode = "portrait_cclock"  // rotate counter-clock-wise into portrait mode if necessary
	RotateCounterClockLandscape trimmer.RotateMode = "landscape_cclock" // rotate counter-clock-wise into landscape mode if necessary
	RotateCounterClock          trimmer.RotateMode = "cclock"           // 90 deg counter-clock-wise
	RotateClock                 trimmer.RotateMode = "clock"            // 90 deg clock-wise
	RotateCounterClockAndFlip   trimmer.RotateMode = "cclock_flip"      // 90 deg counter-clock-wise + vflip
	RotateClockAndFlip          trimmer.RotateMode = "clock_flip"       // 90 deg clock-wise + vflip
)
View Source
const (
	WatermarkModeUndefined trimmer.WatermarkMode = ""
	WatermarkModeTimecode  trimmer.WatermarkMode = "timecode"
	WatermarkModeText      trimmer.WatermarkMode = "text"
	WatermarkModeMetadata  trimmer.WatermarkMode = "meta"
)

Variables

This section is empty.

Functions

func CompleteUpload

func CompleteUpload(ctx context.Context, mediaId string, params *trimmer.MediaUploadCompletionParams) (*trimmer.Media, error)

func DeepCopyMedia

func DeepCopyMedia(m *trimmer.Media) *trimmer.Media

deep copy media

func Delete

func Delete(ctx context.Context, mediaId string) error

func DeleteReplica

func DeleteReplica(ctx context.Context, mediaId, volumeId string, params *trimmer.ReplicaDeleteParams) error

func Download

func Download(ctx context.Context, src *trimmer.Media, dst io.Writer) (*trimmer.FileInfo, error)

func DownloadMulti

func DownloadMulti(ctx context.Context, src *trimmer.Media, save MultiFileSaver) error

func DownloadUrl

func DownloadUrl(ctx context.Context, uri string, h hash.HashBlock, dst io.Writer) (*trimmer.FileInfo, error)

func Get

func Get(ctx context.Context, mediaId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func IndexTracks

func IndexTracks(d *trimmer.MediaAttr)

func IsAudioMediaFormat

func IsAudioMediaFormat(f trimmer.MediaFormat) bool

func IsAudioMediaType

func IsAudioMediaType(t trimmer.MediaType) bool

func IsImageMediaFormat

func IsImageMediaFormat(f trimmer.MediaFormat) bool

func IsImageMediaType

func IsImageMediaType(t trimmer.MediaType) bool

func IsMultiFileMediaType

func IsMultiFileMediaType(t trimmer.MediaType) bool

func IsSequenceMediaFormat

func IsSequenceMediaFormat(f trimmer.MediaFormat) bool

func IsValidColorLocation

func IsValidColorLocation(s trimmer.ColorLocation) bool

func IsValidColorModel

func IsValidColorModel(s trimmer.ColorModel) bool

func IsValidColorPrimaries

func IsValidColorPrimaries(p trimmer.ColorPrimaries) bool

func IsValidColorRange

func IsValidColorRange(s trimmer.ColorRange) bool

func IsValidColorTransfer

func IsValidColorTransfer(s trimmer.ColorTransfer) bool

func IsValidFamily

func IsValidFamily(x trimmer.MediaFamily) bool

func IsValidFormat

func IsValidFormat(x trimmer.MediaFormat) bool

func IsValidRelation

func IsValidRelation(x trimmer.MediaRelation) bool

func IsValidRole

func IsValidRole(r trimmer.MediaRole) bool

func IsValidType

func IsValidType(x trimmer.MediaType) bool

func IsVideoMediaFormat

func IsVideoMediaFormat(f trimmer.MediaFormat) bool

func IsVideoMediaType

func IsVideoMediaType(t trimmer.MediaType) bool

func ListProfiles

func ListProfiles(ctx context.Context, mediaId string, params *trimmer.ProfileListParams) *profile.Iter

func ListReplicas

func ListReplicas(ctx context.Context, mediaId string, params *trimmer.ReplicaListParams) *replica.Iter

func NewReplica

func NewReplica(ctx context.Context, mediaId, volumeId string, params *trimmer.ReplicaParams) (*trimmer.Job, error)

func ParseAudioCodec

func ParseAudioCodec(s string) trimmer.AudioCodec

func ParseAudioLayout

func ParseAudioLayout(s string) trimmer.AudioLayout

func ParseColorLocation

func ParseColorLocation(s string) trimmer.ColorLocation

func ParseColorModel

func ParseColorModel(s string) trimmer.ColorModel

func ParseColorPrimaries

func ParseColorPrimaries(s string) trimmer.ColorPrimaries

func ParseColorRange

func ParseColorRange(s string) trimmer.ColorRange

func ParseColorTransfer

func ParseColorTransfer(s string) trimmer.ColorTransfer

func ParseListEvent

func ParseListEvent(s string) trimmer.MediaListEvent

func ParseListKind

func ParseListKind(s string) trimmer.MediaListKind

func ParseMediaFamily

func ParseMediaFamily(s string) trimmer.MediaFamily

func ParseMediaFormat

func ParseMediaFormat(s string) trimmer.MediaFormat

Note: catches ambiguities in mime-type/format detection systems

and is compatible to input from filepath.Ext(filename)

func ParseMediaRelation

func ParseMediaRelation(s string) trimmer.MediaRelation

func ParseMediaRole

func ParseMediaRole(s string) trimmer.MediaRole

func ParseMediaType

func ParseMediaType(s string) trimmer.MediaType

func ParsePixelFormat

func ParsePixelFormat(s string) trimmer.PixelFormat

func ParseState

func ParseState(s string) trimmer.MediaState

func ParseSubtitleCodec

func ParseSubtitleCodec(s string) trimmer.SubtitleCodec

func ParseVideoCodec

func ParseVideoCodec(s string) trimmer.VideoCodec

func PixelDepth

func PixelDepth(f trimmer.PixelFormat) int

func RegisterReplica

func RegisterReplica(ctx context.Context, mediaId, volumeId string, params *trimmer.ReplicaParams) (*trimmer.Replica, error)

func StripMetadataFilenames

func StripMetadataFilenames(d *trimmer.MediaAttr)

use for cleaning up single-file media

func StripMetadataUrls

func StripMetadataUrls(d *trimmer.MediaAttr)

use for dropping all urls before returning metadata to the API

func Update

func Update(ctx context.Context, mediaId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func Upload

func Upload(ctx context.Context, m *trimmer.Media, src io.ReadSeeker) (*trimmer.FileInfo, error)

func UploadImage

func UploadImage(ctx context.Context, uri string, params *trimmer.FileInfo, src io.Reader) (*trimmer.Media, error)

func UploadMulti

func UploadMulti(ctx context.Context, m *trimmer.Media, load MultiFileLoader) (trimmer.FileInfoList, error)

Types

type Client

type Client struct {
	B    trimmer.Backend
	CDN  trimmer.Backend
	Key  trimmer.ApiKey
	Sess *trimmer.Session
	// contains filtered or unexported fields
}

Client is used to invoke /users APIs.

func (Client) CompleteUpload

func (c Client) CompleteUpload(ctx context.Context, mediaId string, params *trimmer.MediaUploadCompletionParams) (*trimmer.Media, error)

func (Client) Delete

func (c Client) Delete(ctx context.Context, mediaId string) error

func (Client) DeleteReplica

func (c Client) DeleteReplica(ctx context.Context, mediaId, volumeId string, params *trimmer.ReplicaDeleteParams) error

func (Client) Download

func (c Client) Download(ctx context.Context, src *trimmer.Media, dst io.Writer) (*trimmer.FileInfo, error)

func (Client) DownloadMulti

func (c Client) DownloadMulti(ctx context.Context, src *trimmer.Media, save MultiFileSaver) error

support multi-file media like multi-resolution images and image sequences

func (Client) DownloadUrl

func (c Client) DownloadUrl(ctx context.Context, uri string, h hash.HashBlock, dst io.Writer) (*trimmer.FileInfo, error)

func (Client) Get

func (c Client) Get(ctx context.Context, mediaId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func (Client) ListProfiles

func (c Client) ListProfiles(ctx context.Context, mediaId string, params *trimmer.ProfileListParams) *profile.Iter

func (Client) ListReplicas

func (c Client) ListReplicas(ctx context.Context, mediaId string, params *trimmer.ReplicaListParams) *replica.Iter

func (Client) NewReplica

func (c Client) NewReplica(ctx context.Context, mediaId, volumeId string, params *trimmer.ReplicaParams) (*trimmer.Job, error)

func (Client) NewUploadRequest

func (c Client) NewUploadRequest(fi *trimmer.FileInfo, dst *trimmer.Media, src io.ReadSeeker) *UploadRequest

func (Client) ProgressUpload

func (c Client) ProgressUpload(ctx context.Context, r *UploadRequest, size int64)

func (Client) RegisterReplica

func (c Client) RegisterReplica(ctx context.Context, mediaId, volumeId string, params *trimmer.ReplicaParams) (*trimmer.Replica, error)

func (Client) Update

func (c Client) Update(ctx context.Context, mediaId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func (Client) Upload

func (c Client) Upload(ctx context.Context, dst *trimmer.Media, src io.ReadSeeker) (*trimmer.FileInfo, error)

func (Client) UploadImage

func (c Client) UploadImage(ctx context.Context, uri string, params *trimmer.FileInfo, src io.Reader) (*trimmer.Media, error)

func (Client) UploadMulti

func (c Client) UploadMulti(ctx context.Context, dst *trimmer.Media, load MultiFileLoader) (trimmer.FileInfoList, error)

type Iter

type Iter struct {
	*trimmer.Iter
}

Iter is an iterator for lists of Media. The embedded Iter carries methods with it; see its documentation for details.

func (*Iter) Media

func (i *Iter) Media() *trimmer.Media

Media returns the most recent Media visited by a call to Next.

type ManifestCache

type ManifestCache struct {
	// contains filtered or unexported fields
}

func (*ManifestCache) GetManifest

func (c *ManifestCache) GetManifest(prefix string) *trimmer.VolumeManifest

func (*ManifestCache) SetManifest

func (c *ManifestCache) SetManifest(m *trimmer.VolumeManifest)

type MultiFileLoader

type MultiFileLoader func(fi *trimmer.FileInfo) (io.ReadSeeker, error)

type MultiFileSaver

type MultiFileSaver func(fi *trimmer.FileInfo) (io.Writer, error)

type PartInfo

type PartInfo struct {
	PartId     int            `json:"partId"`
	Hashes     hash.HashBlock `json:"hashes"`
	Etag       string         `json:"etag"`
	Size       int64          `json:"size"`
	State      PartState      `json:"state"`
	UploadedAt time.Time      `json:"uploadedAt"`
}

type PartInfoList

type PartInfoList []*PartInfo

type PartListResponse

type PartListResponse struct {
	UploadId string       `json:"uploadId"`
	Key      string       `json:"key"`
	Count    int          `json:"count"`
	Skip     int          `json:"skip"`
	Parts    PartInfoList `json:"parts"`
}

type PartState

type PartState string
const (
	PartStateIdle     PartState = "idle"
	PartStateProgress PartState = "progress"
	PartStateComplete PartState = "complete"
)

type ProgressFunc

type ProgressFunc func(ctx context.Context, r *UploadRequest, size int64)

type UploadInfo

type UploadInfo struct {
	VolumeUUID    string         `json:"volumeUuid"`              // volume UUID
	Key           string         `json:"key"`                     // filename on storage
	ContentType   string         `json:"mimetype"`                // upload content type
	UploadId      string         `json:"uploadId"`                // multi-part upload id
	State         UploadState    `json:"state"`                   // upload status
	Hashes        hash.HashBlock `json:"hashes,omitempty"`        // hashes for total content
	Size          int64          `json:"size,omitempty"`          // total size
	Expires       time.Time      `json:"expires"`                 // upload expiry time
	TotalParts    int64          `json:"totalParts,omitempty"`    // number of parts finished and in progress
	ProgressParts int64          `json:"progressParts,omitempty"` // number of parts in progress
	Part          *PartInfo      `json:"part,omitempty"`          // current part
}

type UploadRequest

type UploadRequest struct {
	C            Client
	Reader       io.ReadSeeker
	Media        *trimmer.Media
	Size         int64
	JobId        string
	Url          string
	Query        url.Values
	Filename     string
	UUID         string
	Mimetype     string
	Hashes       hash.HashBlock
	UploadId     string
	PartNum      int64
	PartSize     int64
	UploadedSize int64
	Manifest     *trimmer.VolumeManifest
	Progress     ProgressFunc
}

func NewUploadRequest

func NewUploadRequest(fi *trimmer.FileInfo, dst *trimmer.Media, src io.ReadSeeker) *UploadRequest

func (*UploadRequest) CalculatePartSize

func (r *UploadRequest) CalculatePartSize() int64

func (*UploadRequest) Do

hides the complexity of single/multipart upload handling

func (*UploadRequest) EndMultiUrl

func (r *UploadRequest) EndMultiUrl() string

func (UploadRequest) HasCallback

func (r UploadRequest) HasCallback() bool

func (*UploadRequest) InitMultiUrl

func (r *UploadRequest) InitMultiUrl() string

func (*UploadRequest) ManifestUrl

func (r *UploadRequest) ManifestUrl() string

func (*UploadRequest) SingleUrl

func (r *UploadRequest) SingleUrl() string

func (*UploadRequest) UploadMultiUrl

func (r *UploadRequest) UploadMultiUrl(part int64) string

func (*UploadRequest) VolumePrefix

func (r *UploadRequest) VolumePrefix() string

Extract volume path from upload URL of form

http://127.0.0.1/public/uploads?key=..

-> public

http://127.0.0.1/my/storage/path/uploads?key=..

-> my/storage/path

type UploadState

type UploadState string
const (
	UploadStateInvalid  UploadState = "invalid"
	UploadStateIdle     UploadState = "idle"
	UploadStateProgress UploadState = "progress"
	UploadStateComplete UploadState = "complete"
	UploadStateAborted  UploadState = "aborted"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL