|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alembik.util.OMAUtils
org.alembik.util.TranscodingUtils
public final class TranscodingUtils
The class provides various utility methods for handling TranscodingRequest
and TranscodingResponse
objects.
It offers a convenient access to most service features, including predefined transformations and file content handling.
Nested Class Summary | |
---|---|
static class |
TranscodingUtils.Coordinates
The holder class for the transformation content's position and duration segment of visibility. |
static class |
TranscodingUtils.CSSVersion
The possible types of CSS support in a web document transcoded by the web rendering engine. |
static class |
TranscodingUtils.DetectionLevel
The possible levels of automatic detection of mobile-enabled sites. |
static class |
TranscodingUtils.FileInfo
The types of information properties returned to the client on source and transcoded files processed by Alembik. |
static class |
TranscodingUtils.ImageRendering
The possible options of handling images embedded in a web document transcoded by the web rendering engine. |
static class |
TranscodingUtils.MarkupLanguage
The mark-up languages supported by the web rendering engine. |
static class |
TranscodingUtils.NavigationBarAttr
The NavigBar transformation attributes. |
static class |
TranscodingUtils.OverlayLogoAttr
OverlayLogo transformation attributes. |
static class |
TranscodingUtils.OverlayLogoColor
The acceptable values of the TranscodingUtils.OverlayLogoAttr.TRANSPARENT_COLOR attribute
of the OverlayLogo transformation. |
static class |
TranscodingUtils.PageSizeEval
The possible algorithms to evaluate the size of a web document transcoded by the web rendering engine. |
static class |
TranscodingUtils.ReloadPolicy
The possible values for policies used for reloading a source file. |
static class |
TranscodingUtils.SourceProtocol
The possible values of protocols used to load a source file into the storage. |
static class |
TranscodingUtils.TextOverlayAttr
The TextOverlay transformation attributes. |
static class |
TranscodingUtils.TextOverlayColor
The acceptable values of the TranscodingUtils.TextOverlayAttr.COLOR attribute
of the TextOverlay transformation. |
static class |
TranscodingUtils.TextOverlayEffect
The acceptable values of the TranscodingUtils.TextOverlayAttr.EFFECT attribute
of the TextOverlay transformation. |
static class |
TranscodingUtils.TextOverlayFamily
The acceptable values of the TranscodingUtils.TextOverlayAttr.FAMILY attribute
of the TextOverlay transformation. |
static class |
TranscodingUtils.TextOverlayFont
The holder class for the font-related attributes of the TextOverlay transformation. |
static class |
TranscodingUtils.TextOverlayOrientation
The acceptable values of the TranscodingUtils.TextOverlayAttr.ORIENTATION attribute
of the TextOverlay transformation. |
static class |
TranscodingUtils.TextOverlayStyle
The acceptable values of the TranscodingUtils.TextOverlayAttr.STYLE attribute
of the TextOverlay transformation. |
Field Summary | |
---|---|
static java.lang.String |
CSS_VERSION
The name of the Text 's Property , which defines the TranscodingUtils.CSSVersion value
supported by the device. |
static java.lang.String |
IDENTITY_URL
The name of the TranscodingJob.Source 's Property , whose value specifies the identity URL
for the source location. |
static java.lang.String |
MARKUP_LANGUAGE
The name of the Text 's Property , which defines the TranscodingUtils.MarkupLanguage value
supported by the device. |
static java.lang.String |
MATCHED_ID
The name of the TranscodingParams ' or MediaProperties ' Property ,
by which Alembik returns the proprietary ID (predefined profile, WURFL) of a transcoding
profile resolved for the given job. |
static java.lang.String |
MATCHED_QUALITY
The name of the Property , which carries the quality name of a transcoding
profile selected from the predefined profiles list with the "best matching"
strategy. |
static java.lang.String |
MOBILE_HTML_SUPPORT
The name of the Text 's Property , whose true value makes Alembik check
whether the device can handle a web page without any transcoding. |
static java.lang.String |
MOBILE_IMAGE_RENDERING
The name of the Text 's Property , which defines the TranscodingUtils.ImageRendering
policy value for a transcoded web page. |
static java.lang.String |
MOBILE_PAGE_SIZE_EVAL
The name of the Text 's Property , which selects the size evaluation algorithm
of a transcoded web page. |
static java.lang.String |
MOBILE_WEB_DETECTION
The name of the Text 's Property , which changes the level of mobile-enabled
sites detection. |
static java.lang.String |
NO_COPY_SOURCE_FILE
The name of the TranscodingJob.Source 's Property , whose true value prevents Alembik
from copying a source file into its storage folder. |
static java.lang.String |
NO_TRANSCODING
The name of the TranscodingJob.Target 's Property , which makes Alembik load a source file
without any transcoding. |
static java.lang.String |
PRESERVE_METADATA
The name of the Media 's Property , whose true value makes Alembik
preserve meta-data information in a transcoded file. |
static java.lang.String |
RESIZE_RELATIVE_HEIGHT
The name of the Media 's Property , which specifies the height relative to
a device screen height (in percents). |
static java.lang.String |
RESIZE_RELATIVE_WIDTH
The name of the Media 's Property , which specifies the width relative to
a device screen width (in percents). |
static java.lang.String |
RESIZE_WEB_RENDER
The value defining the resize directive for web rendering engine. |
static java.lang.String |
SCREEN_HEIGHT
The name of the Text 's Property , which defines the text height (in pixels). |
static java.lang.String |
SCREEN_WIDTH
The name of the Text 's Property , which defines the text width (in pixels). |
static java.lang.String |
SOURCE_LOC_ESCAPED
The name of the TranscodingJob.Source 's Property , whose true value prevents Alembik from
"escaping" the source location. |
static java.lang.String |
SOURCE_OLDER_THAN_TIME
The name of the TranscodingJob.Source 's Property , which prevents Alembik from reloading
a source file before the given number of minutes (passed in the property's value) have not
elapsed. |
static java.lang.String |
SOURCE_PATH_PREFIX
The name of the TranscodingJob.Target 's Property , which makes Alembik storage add a prefix
to its regular path for the source file. |
static java.lang.String |
SOURCE_PROTOCOL_PARAM
The name of the TranscodingJob.Source 's Property , which specifies the TranscodingUtils.SourceProtocol
value for fetching a source file. |
static java.lang.String |
SOURCE_RELOAD_POLICY
The name of the TranscodingJob.Source 's Property , which specifies the TranscodingUtils.ReloadPolicy value
for handling a source file. |
static java.lang.String |
STATE_PERCENTAGE
The name of the Property , which defines the progress percentage of a transcoding process. |
static java.lang.String |
STATE_PHASE
The name of the Property , which defines the Phase value of a transcoding process. |
static java.lang.String |
TARGET_PATH_PREFIX
The name of the TranscodingJob.Target 's Property , which makes Alembik storage add a prefix
to its regular path for the transcoded file. |
static java.lang.String |
TO_CACHE_ID
The name of the TranscodingJob.Source 's Property , which defines the cache ID of a content stored in memory. |
static java.lang.String |
TO_CACHE_TIME
The name of the TranscodingJob.Source 's Property , which defines the amount of time (in millis) for which
the content should be stored in memory. |
static java.lang.String |
TRANSCODING_HINTABLE
The name of the TranscodingJob.Target 's Property , which specifies if the possible
requirement for video hinting should be taken into account when evaluating
a transcoding profile out of the list of predefined ones with the
"best matching" strategy. |
static java.lang.String |
TRANSCODING_QUALITY
The name of the TranscodingJob.Target 's Property , which defines the desired quality of
a transcoding profile chosen from the predefined profiles list with the
"best matching" strategy. |
static java.lang.String |
TRANSFORMATION_ADVERTISEMENT_VIDEO
The type value for the Transformation that inserts a video advertisement
before a target video. |
static java.lang.String |
TRANSFORMATION_ADVERTISEMENT_VIDEO_URL
The Advertisement transformation attribute defining a url of
the video advertisement. |
static java.lang.String |
TRANSFORMATION_AGC
The type value for the Transformation that performs Automatic Gain Control; |
static java.lang.String |
TRANSFORMATION_ANIMATED_TO_STATIC
The type value for the Transformation that converts an animated image to a static one. |
static java.lang.String |
TRANSFORMATION_BRIGHTNESS
The type value for the Transformation that performs brightness correction by a declared level. |
static java.lang.String |
TRANSFORMATION_COLOR
The type value for the Transformation that performs color correction by a declared level. |
static java.lang.String |
TRANSFORMATION_CONTRAST
The type value for the Transformation that performs contrast correction by a declared level. |
static java.lang.String |
TRANSFORMATION_CROPPING
The type value for the Transformation that crops an image to a declared area. |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT
The type value for the Transformation that controls the download of a source file. |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
The DownloadLimit transformation attribute defining a duration limit (in seconds). |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
The DownloadLimit transformation attribute defining a maximum number of parts
for the "progressive segmentation" by size or duration . |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MIN_DURATION
The DownloadLimit transformation attribute defining the minimum duration of
a last source file part obtained through "progressive segmentation"
(repeat flag); if it happens to be shorter it will be concatenated with
the previous part. |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_OFFSET
The DownloadLimit transformation attribute defining a duration offset (in seconds). |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
The DownloadLimit transformation attribute that activates the "progressive
segmentation" of subsequent source file parts of a specified size or
duration limit. |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
The DownloadLimit transformation attribute defining a size limit (in bytes). |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_START
The DownloadLimit transformation attribute defining a size offset (in bytes). |
static java.lang.String |
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
The DownloadLimit transformation attribute that makes the part truncated by
size or duration limit be treated like a complete source file. |
static java.lang.String |
TRANSFORMATION_DURATION_LIMIT
The type value for the Transformation that extracts an audio/video part
of a declared duration. |
static java.lang.String |
TRANSFORMATION_DURATION_LIMIT_ATTR_LIMIT
The DurationLimit transformation attribute defining the duration time (in milliseconds). |
static java.lang.String |
TRANSFORMATION_EXTRACT_FRAME
The type value for the Transformation that extracts an image from a video. |
static java.lang.String |
TRANSFORMATION_EXTRACT_FRAME_ATTR_SEC
The ExtractFrame transformation attribute defining the second
at which the image frame should be extracted. |
static java.lang.String |
TRANSFORMATION_FRAME_FILL
The type value for the Transformation that fills the image frame with a specified color. |
static java.lang.String |
TRANSFORMATION_FRAME_RATE_OUTPUT
The type value for the Transformation that determines the time interval for each frame. |
static java.lang.String |
TRANSFORMATION_FRAME_RATE_SAMPLE
The type value for the Transformation that changes the number of frames/slides. |
static java.lang.String |
TRANSFORMATION_GIF_PREVIEW
The type value for the Transformation that extracts an animated GIF image with a video preview. |
static java.lang.String |
TRANSFORMATION_HINTING
The type value for the Transformation that hints videos after their adaptation. |
static java.lang.String |
TRANSFORMATION_LEVEL_CORRECTION
The type value for the Transformation realizing image gamma correction. |
static java.lang.String |
TRANSFORMATION_MIRROR
The type value for the Transformation that performs image mirroring
around a specified axis. |
static java.lang.String |
TRANSFORMATION_NAVIGATION_BAR
The type value for the Transformation that adjusts the default navigition panel
appended to a web content by the web rendering processor. |
static java.lang.String |
TRANSFORMATION_NO_LINKS
The type value for the Transformation that makes web rendering processor
remove all hyperlinks from a web content. |
static java.lang.String |
TRANSFORMATION_NOISE_REDUCTION
The type value for the Transformation that reduces noise of an image. |
static java.lang.String |
TRANSFORMATION_NUMBER_OF_FRAMES
The type value for the Transformation that changes the number of frames/slides in the output. |
static java.lang.String |
TRANSFORMATION_OFFSET
The type value for the Transformation that extracts an audio/video part
starting from a declared offset. |
static java.lang.String |
TRANSFORMATION_OFFSET_ATTR_START
The Offset transformation attribute defining starting moment (in milliseconds). |
static java.lang.String |
TRANSFORMATION_ONLY_TEXT
The type value for the Transformation that makes web rendering processor
extract the pure text content from a web content. |
static java.lang.String |
TRANSFORMATION_ORGANIZE_TEXT
The type value for the Transformation that makes web rendering processor
organize a web content. |
static java.lang.String |
TRANSFORMATION_OVERLAY_LOGO
The type value for the Transformation that overlays a logo (image)
on an image or a video. |
static java.lang.String |
TRANSFORMATION_ROTATION
The type value for the Transformation that rotates an image by a declared angle. |
static java.lang.String |
TRANSFORMATION_SHARPEN
The type value for the Transformation that performs image sharpening. |
static java.lang.String |
TRANSFORMATION_STREAMING
The type value for the Transformation that makes the video output be streamed. |
static java.lang.String |
TRANSFORMATION_TEXT_OVERLAY
The type value for the Transformation that overlays text on an image or a video. |
Fields inherited from class org.alembik.util.OMAUtils |
---|
CHANNEL_MONO, CHANNEL_STEREO, COLOR_SCHEME_PALETTE_COLOR, COLOR_SCHEME_PALETTE_GREY, COLOR_SCHEME_TRUE, RESIZE_ASPECT_RATIO, RESIZE_CROP, RESIZE_STRETCH |
Constructor Summary | |
---|---|
TranscodingUtils()
|
Method Summary | |
---|---|
static void |
addRelativeResize(Media media,
java.lang.Integer widthPercent,
java.lang.Integer heightPercent,
java.lang.String resizeDirective)
Sets desired content dimensions relative to a target device screen. |
static void |
addResize(Media media,
java.lang.Integer width,
java.lang.Integer height,
java.lang.String resizeDirective)
Sets desired dimensions for a transcoded content, which will be resized according to the passed resizeDirective argument. |
static TranscodingJob |
createNewJob(java.lang.String jobID,
java.lang.String url,
java.lang.String contentType)
Creates a basic transcoding job instance. |
static TranscodingRequest |
createRequest(java.lang.String originatorID,
java.lang.String sourceUrl,
java.lang.String profileID)
Creates a single-job transcoding request instance with basic transcoding parameters. |
static TranscodingRequest |
createRequest(java.lang.String originatorID,
java.lang.String sourceUrl,
java.lang.String profileID,
java.lang.String contentType)
Creates a single-job transcoding request instance with basic transcoding parameters. |
static void |
disableNoTranscoding(TranscodingJob job)
Removes the "no transcoding" flag from the given transcoding job. |
static java.lang.String |
getAdverstisementVideo(TranscodingJob job)
Returns the location of a video to be inserted in front of the video of the given transcoding job as specified by the Advertisement transformation. |
static Quality |
getBestMatchingQuality(TranscodingJob job)
Returns the quality set for the given transcoding job, which defines the expected quality level of the matching profile. |
static java.lang.String |
getCacheId(TranscodingJob job)
Returns the key, under which the content of the given transcoding job is to be stored in a memory-based cache. |
static java.lang.Long |
getCacheTime(TranscodingJob job)
Returns the period of time, for which the content of the given transcoding job will be stored in a memory-based cache. |
static TranscodingUtils.CSSVersion |
getCSSVersion(Text text)
Returns the CSS support type of a transcoded page. |
static java.lang.Integer |
getDownloadDuration(TranscodingJob job)
Returns the duration limit of a source file of the given transcoding job specified by the DownloadLimit transformation. |
static java.lang.Integer |
getDownloadMaxCount(TranscodingJob job)
Returns the maximum number of parts of a source file to be produced by the "progressive segmentation" process requested by the DownloadLimit transformation in the given transcoding job. |
static java.lang.Integer |
getDownloadMinDuration(TranscodingJob job)
Returns the required minimum duration of the last part of a source file to be produced by the "progressive segmentation" process requested by the DownloadLimit transformation in the given transcoding job. |
static java.lang.Integer |
getDownloadOffset(TranscodingJob job)
Returns the duration offset of a source file of the given transcoding job specified by the DownloadLimit transformation. |
static java.lang.Long |
getDownloadSize(TranscodingJob job)
Returns the size limit of a source file of the given transcoding job specified by the DownloadLimit transformation. |
static java.lang.Long |
getDownloadStart(TranscodingJob job)
Returns the size offset of a source file of the given transcoding job specified by the DownloadLimit transformation. |
static java.lang.Integer |
getDuration(TranscodingJob job)
Returns the duration length of the given transcoding job specified by the Offset transformation. |
static java.lang.Integer |
getExtractFrameSecond(TranscodingJob job)
Returns the second at which the frame will be extracted from a video of the given transcoding job as specified by the ExtractFrame transformation. |
static java.lang.String |
getIdentityUrl(TranscodingJob job)
Returns the identity URL of the given transcoding job. |
static long |
getIfOlderThanTime(TranscodingJob job)
Returns the number of minutes specified for TranscodingUtils.ReloadPolicy.IF_OLDER_THAN policy. |
static TranscodingUtils.ImageRendering |
getImageRendering(Text text)
Returns the image rendering option selected for a transcoded page. |
static java.lang.String |
getInternalSourcePathPrefix(TranscodingJob job)
Gets the path prefix (i.e. folder name) of a storage folder where a source file will be placed. |
static java.lang.String |
getInternalTargetPathPrefix(TranscodingJob job)
Gets the path prefix (i.e. folder name) of a storage folder where a transcoded file will be placed. |
static TranscodingUtils.MarkupLanguage |
getMarkupLanguage(Text text)
Returns the markup language set for a transcoded page. |
static java.lang.String |
getMatchedId(JobResult result)
Returns the proprietary identifier of a transcoding profile resolved by Alembik. |
static java.lang.String |
getMatchedId(TranscodingParams profile)
Returns the proprietary identifier of a transcoding profile resolved by Alembik. |
static TranscodingUtils.DetectionLevel |
getMobileWebDetectionLevel(TranscodingJob job)
Returns the mobile page detection level of the given transcoding job. |
static java.util.Map<TranscodingUtils.NavigationBarAttr,java.lang.String> |
getNavigationBarAttrs(TranscodingJob job)
Returns the map of the NavigBar transformation attributes, which have been set for the given transcoding job. |
static java.lang.Integer |
getOffset(TranscodingJob job)
Returns the duration offset of the given transcoding job specified by the Offset transformation. |
static java.util.Map<TranscodingUtils.OverlayLogoAttr,java.lang.String> |
getOverlayLogoAttrs(TranscodingJob job)
Returns the map of the OverlayLogo transformation attributes, which have been set for the given transcoding job. |
static TranscodingUtils.PageSizeEval |
getPageSizeEval(Text text)
Returns the page size evaluation algorithm of a transcoded page. |
static TranscodingUtils.SourceProtocol |
getProtocol(TranscodingJob job)
Returns the protocol specified for fetching a source file of the given transcoding job. |
static java.lang.Integer |
getRelativeHeight(Media media)
Returns the height percentage requested for the resize relative to the device screen height. |
static java.lang.Integer |
getRelativeWidth(Media media)
Returns the width percentage requested for the resize relative to the device screen width. |
static TranscodingUtils.ReloadPolicy |
getReloadPolicy(TranscodingJob job)
Returns the policy of reloading of a source file of the given transcoding job. |
static java.lang.String |
getResultInfo(JobResult result,
TranscodingUtils.FileInfo key)
Returns the value of the given information property. |
static Quality |
getResultQuality(JobResult result)
Returns the quality of the profile selected by the "best matching" strategy. |
static TranscodingState |
getResultState(JobResult result)
Returns the information about the state of a transcoding process. |
static java.lang.Integer |
getScreenHeight(Text text)
Returns the height requested for a text document transcoded by the web rendering engine. |
static java.lang.Integer |
getScreenWidth(Text text)
Returns the width requested for a text document transcoded by the web rendering engine. |
static java.util.Map<TranscodingUtils.TextOverlayAttr,java.lang.String> |
getTextOverlayAttrs(TranscodingJob job)
Returns the map of the TextOverlay transformation attributes, which have been set for the given transcoding job. |
static boolean |
isBestMatchingHintable(TranscodingJob job)
Checks whether the "best matching" strategy should take into account the devices, which require hinted video files. |
static boolean |
isBestMatchingRequested(TranscodingJob job)
Checks whether the given transcoding job has the "best matching" strategy applied. |
static boolean |
isDownloadRepeat(TranscodingJob job)
Checks whether the "progressive segmentation" has been requested in the DownloadLimit transformation for the given transcoding job. |
static boolean |
isDownloadTreatedAsComplete(TranscodingJob job)
Checks whether a source file truncated by the DownloadLimit transformation should be treated as the complete file when processing subsequent transcoding jobs. |
static boolean |
isHinting(Media media)
Checks whether the given video job is to be hinted. |
static boolean |
isHinting(TranscodingJob job)
Checks whether the given video is to be hinted. |
static boolean |
isHTMLDetection(Media media)
Checks whether the HTML support detection has been enabled; by default it is disabled. |
static boolean |
isHTMLDetection(TranscodingJob job)
Checks whether the HTML support detection has been enabled; by default it is disabled. |
static boolean |
isNotCopySource(TranscodingJob job)
Checks whether the source file will not be loaded into storage. |
static boolean |
isNoTranscodingSet(TranscodingJob job)
Checks whether a content of the given transcoding job is to be transcoded. |
static boolean |
isPreserveMetadata(Media media)
Checks whether the media content's meta-data is to be retained in a transcoded file. |
static boolean |
isSourceLocationEscaped(TranscodingJob job)
Checks whether the source location of the given transcoding job is already escaped. |
static boolean |
isStreaming(Media media)
Checks whether the given video job is to be streamed. |
static boolean |
isStreaming(TranscodingJob job)
Checks whether the given video job is to be streamed. |
static void |
removeIdentityUrl(TranscodingJob job)
Removes the identity URL parameter from the given transcoding job. |
static void |
removePreserveMetadata(Media media)
Disables the meta-data preserving request for a media object representing a file to be transcoded. |
static void |
removeRelativeDimensions(Media media)
Removes relative dimension values if set. |
static void |
setAdvertisementVideo(TranscodingJob job,
java.lang.String videoURL)
Applies Advertisement transformation, which makes Alembik insert another video at the start of a video of the given video transcoding job. |
static void |
setBestMatchingQuality(TranscodingJob job,
Quality quality)
Applies the "best matching" strategy for the given transcoding job and quality. |
static void |
setBestMatchingQuality(TranscodingJob job,
Quality quality,
boolean hintable)
Applies the "best matching" strategy for the given transcoding job. |
static void |
setCSSVersion(Text text,
TranscodingUtils.CSSVersion cssVersion)
Sets the desired CSS support for a page to be transcoded. |
static void |
setDimensions(Media media,
java.lang.Integer width,
java.lang.Integer height)
Sets the desired width and height for a transcoded content. |
static void |
setDownloadApproxDuration(TranscodingJob job,
int approxDuration)
Deprecated. use setDownloadDurationLimit(TranscodingJob, int) instead |
static void |
setDownloadApproxDuration(TranscodingJob job,
int approxDuration,
boolean treatAsComplete)
Deprecated. use setDownloadDurationLimit(TranscodingJob, int, boolean) instead |
static void |
setDownloadDurationLimit(TranscodingJob job,
int duration)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching (approximately) the given number of seconds. |
static void |
setDownloadDurationLimit(TranscodingJob job,
int duration,
boolean treatAsComplete)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching (approximately) the given number of seconds. |
static void |
setDownloadDurationSegment(TranscodingJob job,
int offset,
int duration)
Applies DownloadLimit transformation for the given transcoding job, which is usually used to reference a particular source file part from the "progressive segmentation" (see setProgressiveDownloadByDuration(TranscodingJob, int) . |
static void |
setDownloadLimit(TranscodingJob job,
long downloadLimit)
Deprecated. use setDownloadSizeLimit(TranscodingJob, long) instead |
static void |
setDownloadLimit(TranscodingJob job,
long downloadLimit,
boolean treatAsComplete)
Deprecated. use setDownloadSizeLimit(TranscodingJob, long, boolean) instead |
static void |
setDownloadSizeAndDurationLimit(TranscodingJob job,
int duration,
long size)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching first of the specified limits: the given number of seconds (approximately) or the given number of bytes. |
static void |
setDownloadSizeLimit(TranscodingJob job,
long size)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching the given size limit. |
static void |
setDownloadSizeLimit(TranscodingJob job,
long size,
boolean treatAsComplete)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching the given size limit. |
static void |
setDownloadSizeSegment(TranscodingJob job,
long start,
long size)
Applies DownloadLimit transformation for the given transcoding job, which is usually used to reference a particular source file part from the "progressive segmentation" (see setProgressiveDownloadBySize(TranscodingJob, long) . |
static void |
setExtractFrame(TranscodingJob job,
java.lang.String contentType,
int second)
Applies ExtractFrame transformation for the given video transcoding job, which makes Alembik extract an image frame at the specified second. |
static void |
setExtractGifPreview(TranscodingJob job)
Applies GifPreview transformation for the given video transcoding job, which makes Alembik generate an animated GIF. |
static void |
setHinting(Media media)
Requests video hinting for the given video job. |
static void |
setHTMLDetection(TranscodingJob job,
boolean enable)
Enables or disables the HTML support detection for the given transcoding job. |
static void |
setIdentityUrl(TranscodingJob job,
java.lang.String identityUrl)
Declares the identity URL for the given transcoding job. |
static void |
setIfOlderThanTime(TranscodingJob job,
long minutes)
Sets the number of minutes that must elapse before Alembik checks if the file is actual. |
static void |
setImageOverlayLogo(TranscodingJob job,
java.lang.String location,
TranscodingUtils.OverlayLogoColor transparentColor,
java.lang.Integer imageWidth)
Applies OverlayLogo transformation, which will make Alembik lay a logo (image) over the image of the given transcoding job. |
static void |
setImageRendering(Text text,
TranscodingUtils.ImageRendering option)
Requests the specified image rendering option for a page to be transcoded. |
static void |
setImageTextOverlay(TranscodingJob job,
java.lang.String message,
TranscodingUtils.TextOverlayFont font)
Applies TextOverlay transformation, which will make Alembik lay a text (message) over an image of the given transcoding job. |
static void |
setInternalPathPrefix(TranscodingJob job,
java.lang.String prefix)
Imposes a special prefix (i.e. extra folder) in the storage path where both source and transcoded files are to be placed. |
static void |
setInternalSourcePathPrefix(TranscodingJob job,
java.lang.String prefix)
Imposes a special prefix (i.e. extra folder) in the storage path where a source file is to be placed. |
static void |
setInternalTargetPathPrefix(TranscodingJob job,
java.lang.String prefix)
Imposes a special prefix (i.e. extra folder) in the storage path where a transcoded file is to be placed. |
static void |
setMarkupLanguage(Text text,
TranscodingUtils.MarkupLanguage markupLanguage)
Sets the desired markup language for a page to be transcoded. |
static void |
setMobileWebDetectionLevel(TranscodingJob job,
TranscodingUtils.DetectionLevel level)
Requests the specified mobile page detection level for a web document of the given transcoding job. |
static void |
setNavigationBarAttrs(TranscodingJob job,
java.util.Map<TranscodingUtils.NavigationBarAttr,java.lang.String> attrsMap)
Sets a desired set of NavigBar transformation attributes, which will adjust look and behaviour of the navigation panel displayed within transcoded web documents. |
static void |
setNoLinks(TranscodingJob job)
Applies NoLinks transformation, which makes Alembik remove all hyperlinks from of a web document of the given transcoding job. |
static void |
setNoTranscoding(TranscodingJob job)
Prevents Alembik from performing any transcoding for the given transcoding job; only the source file will be loaded into the storage. |
static void |
setOnlyText(TranscodingJob job)
Applies OnlyText transformation, which makes Alembik remove all hyperlinks and embedded content (images, videos, etc) from of a web document of the given transcoding job. |
static void |
setOrganizeText(TranscodingJob job)
Applies OrganizeText transformation, which makes Alembik re-organize the logical blocks of a web document of the given transcoding job. |
static void |
setPageSizeEval(Text text,
TranscodingUtils.PageSizeEval eval)
Requests the specified algorithm evaluating the size of a transcoded page. |
static void |
setPreserveMetadata(Media media)
Requests Alembik to retain the media content's meta-data in a transcoded file. |
static void |
setProgressiveDownloadByDuration(TranscodingJob job,
int segmentDuration)
Applies DownloadLimit transformation for the given transcoding job, which makes Alembik perform the "progressive segmentation" of a source file while loading it. |
static void |
setProgressiveDownloadByDuration(TranscodingJob job,
int segmentDuration,
java.lang.Integer minDuration,
java.lang.Integer maxCount)
Applies DownloadLimit transformation for the given transcoding job, which makes Alembik perform the "progressive segmentation" of a source file while loading it. |
static void |
setProgressiveDownloadBySize(TranscodingJob job,
long segmentSize)
Applies DownloadLimit transformation for the given transcoding job, which makes Alembik perform the "progressive segmentation" of a source file while loading it. |
static void |
setProgressiveDownloadBySize(TranscodingJob job,
long segmentSize,
int maxCount)
Applies DownloadLimit transformation for the given transcoding job, which makes Alembik perform the "progressive segmentation" of a source file while loading it. |
static void |
setProtocol(TranscodingJob job,
TranscodingUtils.SourceProtocol protocol)
Sets the protocol to be used to load a source content into the storage. |
static void |
setProtocol(TranscodingJob job,
TranscodingUtils.SourceProtocol protocol,
boolean noCopy)
Sets the TranscodingUtils.SourceProtocol to be used to load a source content. |
static void |
setReloadPolicy(TranscodingJob job,
TranscodingUtils.ReloadPolicy reloadPolicy)
Sets the required policy of reloading of a source file of the given transcoding job. |
static void |
setSegmentBoundaries(TranscodingJob job,
java.lang.Integer offset,
java.lang.Integer duration)
Specifies the desired duration segment of the given audio or video job to transcode. |
static void |
setSourceLocationEscaped(TranscodingJob job,
boolean escaped)
Sets the flag indicating that the source location of the given transcoding job is already prepared for HTTP manipulations and does not need to be preprocessed (escaped) again. |
static void |
setToCache(TranscodingJob job,
java.lang.String cacheId,
long cacheTime)
Defines the key and expiry time for storing the content in a memory-based cache. |
static void |
setVideoOverlayLogo(TranscodingJob job,
java.lang.String location,
TranscodingUtils.Coordinates coordinates,
java.lang.Integer imageWidth)
Applies OverlayLogo transformation, which will make Alembik lay a logo (image) over the video of the given transcoding job. |
static void |
setVideoTextOverlay(TranscodingJob job,
java.lang.String message,
TranscodingUtils.TextOverlayFont font,
TranscodingUtils.Coordinates coordinates)
Applies TextOverlay transformation, which will make Alembik lay a static text (message) over a video of the given transcoding job. |
static void |
setVideoTextScrollOverlay(TranscodingJob job,
java.lang.String message,
TranscodingUtils.TextOverlayFont font,
TranscodingUtils.Coordinates coordinates)
Applies TextOverlay transformation, which will make Alembik lay a scrolling text (message) over a video of the given transcoding job. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESIZE_WEB_RENDER
OMAUtils.setResizeDirective(Media, String)
,
Image.setResizeDirective(String)
,
Video.VideoVisual.setResizeDirective(String)
,
Constant Field Valuespublic static final java.lang.String RESIZE_RELATIVE_WIDTH
Media
's Property
, which specifies the width relative to
a device screen width (in percents).
addRelativeResize(Media, Integer, Integer, String)
,
getRelativeWidth(Media)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String RESIZE_RELATIVE_HEIGHT
Media
's Property
, which specifies the height relative to
a device screen height (in percents).
addRelativeResize(Media, Integer, Integer, String)
,
getRelativeHeight(Media)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SOURCE_PROTOCOL_PARAM
TranscodingJob.Source
's Property
, which specifies the TranscodingUtils.SourceProtocol
value for fetching a source file.
setProtocol(TranscodingJob, org.alembik.util.TranscodingUtils.SourceProtocol)
,
getProtocol(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String NO_COPY_SOURCE_FILE
TranscodingJob.Source
's Property
, whose true value prevents Alembik
from copying a source file into its storage folder.
setProtocol(TranscodingJob, org.alembik.util.TranscodingUtils.SourceProtocol, boolean)
,
isNotCopySource(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SOURCE_RELOAD_POLICY
TranscodingJob.Source
's Property
, which specifies the TranscodingUtils.ReloadPolicy
value
for handling a source file.
setReloadPolicy(TranscodingJob, org.alembik.util.TranscodingUtils.ReloadPolicy)
,
getReloadPolicy(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SOURCE_OLDER_THAN_TIME
TranscodingJob.Source
's Property
, which prevents Alembik from reloading
a source file before the given number of minutes (passed in the property's value) have not
elapsed. This property works only in conjunction with TranscodingUtils.ReloadPolicy.IF_OLDER_THAN
policy.
setIfOlderThanTime(TranscodingJob, long)
,
getIfOlderThanTime(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String NO_TRANSCODING
TranscodingJob.Target
's Property
, which makes Alembik load a source file
without any transcoding.
setNoTranscoding(TranscodingJob)
,
isNoTranscodingSet(TranscodingJob)
,
TranscodingJob.Target.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SOURCE_PATH_PREFIX
TranscodingJob.Target
's Property
, which makes Alembik storage add a prefix
to its regular path for the
setInternalSourcePathPrefix(TranscodingJob, String)
,
getInternalSourcePathPrefix(TranscodingJob)
,
TranscodingJob.Target.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String TARGET_PATH_PREFIX
TranscodingJob.Target
's Property
, which makes Alembik storage add a prefix
to its regular path for the
setInternalTargetPathPrefix(TranscodingJob, String)
,
getInternalTargetPathPrefix(TranscodingJob)
,
TranscodingJob.Target.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String IDENTITY_URL
TranscodingJob.Source
's Property
, whose value specifies the identity URL
for the source location.
setIdentityUrl(TranscodingJob, String)
,
getIdentityUrl(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SOURCE_LOC_ESCAPED
TranscodingJob.Source
's Property
, whose true value prevents Alembik from
"escaping" the source location.
setSourceLocationEscaped(TranscodingJob, boolean)
,
isSourceLocationEscaped(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String PRESERVE_METADATA
Media
's Property
, whose true value makes Alembik
preserve meta-data information in a transcoded file.
setPreserveMetadata(Media)
,
isPreserveMetadata(Media)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MARKUP_LANGUAGE
Text
's Property
, which defines the TranscodingUtils.MarkupLanguage
value
supported by the device.
setMarkupLanguage(Text, org.alembik.util.TranscodingUtils.MarkupLanguage)
,
getMarkupLanguage(Text)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String CSS_VERSION
Text
's Property
, which defines the TranscodingUtils.CSSVersion
value
supported by the device.
setCSSVersion(Text, org.alembik.util.TranscodingUtils.CSSVersion)
,
getCSSVersion(Text)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SCREEN_WIDTH
Text
's Property
, which defines the text width (in pixels).
This property is used in web rendering for declaring the actual screen width of a device.
setDimensions(Media, Integer, Integer)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String SCREEN_HEIGHT
Text
's Property
, which defines the text height (in pixels).
This property is used in web rendering for declaring the actual screen height of a device.
setDimensions(Media, Integer, Integer)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MOBILE_PAGE_SIZE_EVAL
Text
's Property
, which selects the size evaluation algorithm
of a transcoded web page. The acceptable values for this property are defined in TranscodingUtils.PageSizeEval
enumeration.
setPageSizeEval(Text, org.alembik.util.TranscodingUtils.PageSizeEval)
,
getPageSizeEval(Text)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MOBILE_WEB_DETECTION
Text
's Property
, which changes the level of mobile-enabled
sites detection. The acceptable values for this property are defined in TranscodingUtils.DetectionLevel
enumeration.
setMobileWebDetectionLevel(TranscodingJob, org.alembik.util.TranscodingUtils.DetectionLevel)
,
getMobileWebDetectionLevel(TranscodingJob)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MOBILE_IMAGE_RENDERING
Text
's Property
, which defines the TranscodingUtils.ImageRendering
policy value for a transcoded web page.
setImageRendering(Text, org.alembik.util.TranscodingUtils.ImageRendering)
,
getImageRendering(Text)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MOBILE_HTML_SUPPORT
Text
's Property
, whose true value makes Alembik check
whether the device can handle a web page without any transcoding.
setHTMLDetection(TranscodingJob, boolean)
,
isHTMLDetection(Media)
,
Media.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String STATE_PHASE
Property
, which defines the Phase
value of a transcoding process.
This property is returned by Alembik within a JobResult
's MediaProperties
object.
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
,
getResultState(JobResult)
,
MediaProperties.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String STATE_PERCENTAGE
Property
, which defines the progress percentage of a transcoding process.
This property is returned by Alembik within a JobResult
's MediaProperties
object.
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
,
getResultState(JobResult)
,
MediaProperties.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String TRANSCODING_QUALITY
TranscodingJob.Target
's Property
, which defines the desired quality of
a transcoding profile chosen from the predefined profiles list with the
"best matching" strategy.
setBestMatchingQuality(TranscodingJob, Quality, boolean)
,
getBestMatchingQuality(TranscodingJob)
,
TranscodingJob.Target.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String TRANSCODING_HINTABLE
TranscodingJob.Target
's Property
, which specifies if the possible
requirement for video hinting should be taken into account when evaluating
a transcoding profile out of the list of predefined ones with the
"best matching" strategy.
setBestMatchingQuality(TranscodingJob, Quality, boolean)
,
getBestMatchingQuality(TranscodingJob)
,
TranscodingJob.Target.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MATCHED_QUALITY
Property
, which carries the quality name of a transcoding
profile selected from the predefined profiles list with the "best matching"
strategy. This property is returned by Alembik within a JobResult
's
MediaProperties
object.
TranscodingService.processSync(TranscodingRequest)
,
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
,
setBestMatchingQuality(TranscodingJob, Quality)
,
MediaProperties.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String MATCHED_ID
TranscodingParams
' or MediaProperties
' Property
,
by which Alembik returns the proprietary ID (predefined profile, WURFL) of a transcoding
profile resolved for the given job.
TranscodingService.getTranscodingProfile(TranscodingJob)
,
getMatchedId(TranscodingParams)
,
TranscodingParams.getExtensionData()
,
TranscodingService.processSync(TranscodingRequest)
,
getMatchedId(JobResult)
,
MediaProperties.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String TO_CACHE_ID
TranscodingJob.Source
's Property
, which defines the cache ID of a content stored in memory.
setToCache(TranscodingJob, String, long)
,
getCacheId(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String TO_CACHE_TIME
TranscodingJob.Source
's Property
, which defines the amount of time (in millis) for which
the content should be stored in memory.
setToCache(TranscodingJob, String, long)
,
getCacheTime(TranscodingJob)
,
TranscodingJob.Source.getExtensionData()
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_LEVEL_CORRECTION
Transformation
realizing image gamma correction.
public static final java.lang.String TRANSFORMATION_MIRROR
Transformation
that performs image mirroring
around a specified axis.
public static final java.lang.String TRANSFORMATION_NOISE_REDUCTION
Transformation
that reduces noise of an image.
public static final java.lang.String TRANSFORMATION_ROTATION
Transformation
that rotates an image by a declared angle.
public static final java.lang.String TRANSFORMATION_SHARPEN
Transformation
that performs image sharpening.
public static final java.lang.String TRANSFORMATION_CROPPING
Transformation
that crops an image to a declared area.
public static final java.lang.String TRANSFORMATION_FRAME_FILL
Transformation
that fills the image frame with a specified color.
public static final java.lang.String TRANSFORMATION_FRAME_RATE_SAMPLE
Transformation
that changes the number of frames/slides.
public static final java.lang.String TRANSFORMATION_FRAME_RATE_OUTPUT
Transformation
that determines the time interval for each frame.
public static final java.lang.String TRANSFORMATION_NUMBER_OF_FRAMES
Transformation
that changes the number of frames/slides in the output.
public static final java.lang.String TRANSFORMATION_BRIGHTNESS
Transformation
that performs brightness correction by a declared level.
public static final java.lang.String TRANSFORMATION_CONTRAST
Transformation
that performs contrast correction by a declared level.
public static final java.lang.String TRANSFORMATION_COLOR
Transformation
that performs color correction by a declared level.
public static final java.lang.String TRANSFORMATION_ANIMATED_TO_STATIC
Transformation
that converts an animated image to a static one.
public static final java.lang.String TRANSFORMATION_AGC
Transformation
that performs Automatic Gain Control;
public static final java.lang.String TRANSFORMATION_OVERLAY_LOGO
Transformation
that overlays a logo (image)
on an image or a video.
TranscodingUtils.OverlayLogoAttr
,
setImageOverlayLogo(TranscodingJob, String, org.alembik.util.TranscodingUtils.OverlayLogoColor, Integer)
,
setVideoOverlayLogo(TranscodingJob, String, org.alembik.util.TranscodingUtils.Coordinates, Integer)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_TEXT_OVERLAY
Transformation
that overlays text on an image or a video.
TranscodingUtils.TextOverlayAttr
,
setImageTextOverlay(TranscodingJob, String, org.alembik.util.TranscodingUtils.TextOverlayFont)
,
setVideoTextOverlay(TranscodingJob, String, org.alembik.util.TranscodingUtils.TextOverlayFont, org.alembik.util.TranscodingUtils.Coordinates)
,
setVideoTextScrollOverlay(TranscodingJob, String, org.alembik.util.TranscodingUtils.TextOverlayFont, org.alembik.util.TranscodingUtils.Coordinates)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_STREAMING
Transformation
that makes the video output be streamed.
isStreaming(Media)
,
isStreaming(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_HINTING
Transformation
that hints videos after their adaptation.
isHinting(Media)
,
isHinting(TranscodingJob)
,
setHinting(Media)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_OFFSET
Transformation
that extracts an audio/video part
starting from a declared offset.
TRANSFORMATION_OFFSET_ATTR_START
,
setSegmentBoundaries(TranscodingJob, Integer, Integer)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_OFFSET_ATTR_START
Offset
transformation attribute defining starting moment (in milliseconds).
TRANSFORMATION_OFFSET
,
setSegmentBoundaries(TranscodingJob, Integer, Integer)
,
getOffset(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DURATION_LIMIT
Transformation
that extracts an audio/video part
of a declared duration.
TRANSFORMATION_DURATION_LIMIT_ATTR_LIMIT
,
setSegmentBoundaries(TranscodingJob, Integer, Integer)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DURATION_LIMIT_ATTR_LIMIT
DurationLimit
transformation attribute defining the duration time (in milliseconds).
TRANSFORMATION_DURATION_LIMIT
,
setSegmentBoundaries(TranscodingJob, Integer, Integer)
,
getDuration(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_EXTRACT_FRAME
Transformation
that extracts an image from a video.
TRANSFORMATION_EXTRACT_FRAME_ATTR_SEC
,
setExtractFrame(TranscodingJob, String, int)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_EXTRACT_FRAME_ATTR_SEC
ExtractFrame
transformation attribute defining the second
at which the image frame should be extracted.
TRANSFORMATION_EXTRACT_FRAME
,
setExtractFrame(TranscodingJob, String, int)
,
getExtractFrameSecond(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_GIF_PREVIEW
Transformation
that extracts an animated GIF image with a video preview.
setExtractGifPreview(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT
Transformation
that controls the download of a source file.
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_START
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_OFFSET
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MIN_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
,
setDownloadSizeLimit(TranscodingJob, long)
,
setDownloadSizeSegment(TranscodingJob, long, long)
,
setDownloadDurationLimit(TranscodingJob, int)
,
setDownloadDurationSegment(TranscodingJob, int, int)
,
setDownloadSizeAndDurationLimit(TranscodingJob, int, long)
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setDownloadSizeSegment(TranscodingJob, long, long)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
setDownloadDurationSegment(TranscodingJob, int, int)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
DownloadLimit
transformation attribute defining a size limit (in bytes).
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_START
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setDownloadSizeLimit(TranscodingJob, long)
,
setDownloadSizeLimit(TranscodingJob, long, boolean)
,
setDownloadSizeAndDurationLimit(TranscodingJob, int, long)
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
setDownloadSizeSegment(TranscodingJob, long, long)
,
getDownloadSize(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_START
DownloadLimit
transformation attribute defining a size offset (in bytes).
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
setDownloadSizeSegment(TranscodingJob, long, long)
,
getDownloadStart(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
DownloadLimit
transformation attribute defining a duration limit (in seconds).
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_OFFSET
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setDownloadDurationLimit(TranscodingJob, int)
,
setDownloadDurationLimit(TranscodingJob, int, boolean)
,
setDownloadSizeAndDurationLimit(TranscodingJob, int, long)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
,
getDownloadDuration(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_OFFSET
DownloadLimit
transformation attribute defining a duration offset (in seconds).
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
,
setDownloadDurationSegment(TranscodingJob, int, int)
,
getDownloadOffset(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
DownloadLimit
transformation attribute that makes the part truncated by
size
or duration
limit be treated like a complete source file.
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
setDownloadSizeLimit(TranscodingJob, long, boolean)
,
setDownloadDurationLimit(TranscodingJob, int, boolean)
,
setDownloadSizeAndDurationLimit(TranscodingJob, int, long)
,
isDownloadTreatedAsComplete(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
DownloadLimit
transformation attribute that activates the "progressive
segmentation" of subsequent source file parts of a specified size
or
duration
limit.
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MIN_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
,
isDownloadRepeat(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MIN_DURATION
DownloadLimit
transformation attribute defining the minimum duration of
a last source file part obtained through "progressive segmentation"
(repeat
flag); if it happens to be shorter it will be concatenated with
the previous part.
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
,
getDownloadMinDuration(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
DownloadLimit
transformation attribute defining a maximum number of parts
for the "progressive segmentation" by size
or duration
.
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
,
getDownloadMaxCount(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_ADVERTISEMENT_VIDEO
Transformation
that inserts a video advertisement
before a target video.
TRANSFORMATION_ADVERTISEMENT_VIDEO_URL
,
setAdvertisementVideo(TranscodingJob, String)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_ADVERTISEMENT_VIDEO_URL
Advertisement
transformation attribute defining a url of
the video advertisement.
TRANSFORMATION_ADVERTISEMENT_VIDEO
,
setAdvertisementVideo(TranscodingJob, String)
,
getAdverstisementVideo(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_ORGANIZE_TEXT
Transformation
that makes web rendering processor
organize a web content.
setOrganizeText(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_ONLY_TEXT
Transformation
that makes web rendering processor
extract the pure text content from a web content.
setOnlyText(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_NO_LINKS
Transformation
that makes web rendering processor
remove all hyperlinks from a web content.
setNoLinks(TranscodingJob)
,
Constant Field Valuespublic static final java.lang.String TRANSFORMATION_NAVIGATION_BAR
Transformation
that adjusts the default navigition panel
appended to a web content by the web rendering processor.
TranscodingUtils.NavigationBarAttr
,
setNavigationBarAttrs(TranscodingJob, Map)
,
Constant Field ValuesConstructor Detail |
---|
public TranscodingUtils()
Method Detail |
---|
public static TranscodingRequest createRequest(java.lang.String originatorID, java.lang.String sourceUrl, java.lang.String profileID)
originatorID
- the request originator identifiersourceUrl
- the location of a source content to be transcodedprofileID
- the device User-Agent or the predefined profile ID
public static TranscodingRequest createRequest(java.lang.String originatorID, java.lang.String sourceUrl, java.lang.String profileID, java.lang.String contentType)
originatorID
- the request originator identifiersourceUrl
- the location of a source content to be transcodedprofileID
- the device User-Agent or the predefined profile IDcontentType
- the content type of the source file
public static TranscodingJob createNewJob(java.lang.String jobID, java.lang.String url, java.lang.String contentType)
jobID
- the ID of the joburl
- the location of a source content to be transcodedcontentType
- the content type of the source file (may be null
)
public static void setDimensions(Media media, java.lang.Integer width, java.lang.Integer height)
media
- Image
, Video
or Text
objectwidth
- transcoded content width (may be null
)height
- transcoded content height (may be null
)Image.setWidth(Integer)
,
Image.setHeight(Integer)
,
Video.VideoVisual.setWidth(Integer)
,
Video.VideoVisual.setHeight(Integer)
,
SCREEN_WIDTH
,
getScreenWidth(Text)
,
SCREEN_HEIGHT
,
getScreenHeight(Text)
public static java.lang.Integer getScreenWidth(Text text)
text
- media object
public static java.lang.Integer getScreenHeight(Text text)
text
- media object
public static void addRelativeResize(Media media, java.lang.Integer widthPercent, java.lang.Integer heightPercent, java.lang.String resizeDirective)
resizeDirective
argument.
media
- Image
or Video
objectwidthPercent
- relative width in percents (may be null
)heightPercent
- relative height in percents (may be null
)resizeDirective
- resize directiveOMAUtils.setResizeDirective(Media, String)
,
RESIZE_RELATIVE_WIDTH
,
getRelativeWidth(Media)
,
RESIZE_RELATIVE_HEIGHT
,
getRelativeHeight(Media)
public static java.lang.Integer getRelativeWidth(Media media)
media
- Image
or Video
object
RESIZE_RELATIVE_WIDTH
,
addRelativeResize(Media, Integer, Integer, String)
public static java.lang.Integer getRelativeHeight(Media media)
media
- Image
or Video
object
RESIZE_RELATIVE_HEIGHT
,
addRelativeResize(Media, Integer, Integer, String)
public static void removeRelativeDimensions(Media media)
Removes relative dimension values if set.
NOTE: it does not affect the resize directive.
media
- Image
or Video
objectaddRelativeResize(Media, Integer, Integer, String)
public static void addResize(Media media, java.lang.Integer width, java.lang.Integer height, java.lang.String resizeDirective)
resizeDirective
argument.
media
- Image
or Video
objectwidth
- transcoded content widthheight
- transcoded content heightresizeDirective
- resize directivesetDimensions(Media, Integer, Integer)
,
OMAUtils.setResizeDirective(Media, String)
public static void setProtocol(TranscodingJob job, TranscodingUtils.SourceProtocol protocol)
job
- transcoding jobprotocol
- source protocolSOURCE_PROTOCOL_PARAM
,
getProtocol(TranscodingJob)
,
setProtocol(TranscodingJob, org.alembik.util.TranscodingUtils.SourceProtocol, boolean)
public static void setProtocol(TranscodingJob job, TranscodingUtils.SourceProtocol protocol, boolean noCopy)
Sets the TranscodingUtils.SourceProtocol
to be used to load a source content.
If noCopy
arguments is true
, the source content will
not be copied/held in the storage. Thus if protocol is TranscodingUtils.SourceProtocol.FILE
,
the source file will be accessed directly (no copying). In case of
TranscodingUtils.SourceProtocol.HTTP
protocol and "progressive segmentation"
applied, the complete source file will not be held in the storage.
job
- transcoding jobprotocol
- source protocolnoCopy
- apply "no-copy" strategy?SOURCE_PROTOCOL_PARAM
,
getProtocol(TranscodingJob)
,
NO_COPY_SOURCE_FILE
,
isNotCopySource(TranscodingJob)
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
public static TranscodingUtils.SourceProtocol getProtocol(TranscodingJob job)
Returns the protocol specified for fetching a source file of the given transcoding job.
If none has been set, it defaults to TranscodingUtils.SourceProtocol.HTTP
.
job
- transcoding job
SOURCE_PROTOCOL_PARAM
,
setProtocol(TranscodingJob, org.alembik.util.TranscodingUtils.SourceProtocol)
public static boolean isNotCopySource(TranscodingJob job)
job
- transcoding job
NO_COPY_SOURCE_FILE
,
setProtocol(TranscodingJob, org.alembik.util.TranscodingUtils.SourceProtocol, boolean)
public static void setReloadPolicy(TranscodingJob job, TranscodingUtils.ReloadPolicy reloadPolicy)
job
- transcoding jobreloadPolicy
- reload policySOURCE_RELOAD_POLICY
,
getReloadPolicy(TranscodingJob)
public static TranscodingUtils.ReloadPolicy getReloadPolicy(TranscodingJob job)
Returns the policy of reloading of a source file of the given transcoding job.
If none has been previously set, it defaults to TranscodingUtils.ReloadPolicy.IF_OLDER_THAN
.
job
- transcoding job
SOURCE_RELOAD_POLICY
,
setReloadPolicy(TranscodingJob, org.alembik.util.TranscodingUtils.ReloadPolicy)
public static void setIfOlderThanTime(TranscodingJob job, long minutes)
TranscodingUtils.ReloadPolicy.IF_OLDER_THAN
policy.
job
- transcoding jobminutes
- number of minutesSOURCE_OLDER_THAN_TIME
,
getIfOlderThanTime(TranscodingJob)
,
setReloadPolicy(TranscodingJob, org.alembik.util.TranscodingUtils.ReloadPolicy)
public static long getIfOlderThanTime(TranscodingJob job)
TranscodingUtils.ReloadPolicy.IF_OLDER_THAN
policy.
If not set it defaults to 15 minutes.
job
- transcoding job
SOURCE_OLDER_THAN_TIME
,
setIfOlderThanTime(TranscodingJob, long)
public static void setIdentityUrl(TranscodingJob job, java.lang.String identityUrl)
job
- transcoding jobidentityUrl
- the identity URL valueIDENTITY_URL
,
getIdentityUrl(TranscodingJob)
,
TranscodingJob.Source.setLocation(String)
public static void removeIdentityUrl(TranscodingJob job)
job
- transcoding jobsetIdentityUrl(TranscodingJob, String)
public static java.lang.String getIdentityUrl(TranscodingJob job)
job
- transcoding job
IDENTITY_URL
,
setIdentityUrl(TranscodingJob, String)
public static void setSourceLocationEscaped(TranscodingJob job, boolean escaped)
job
- transcoding jobescaped
- is location escaped?SOURCE_LOC_ESCAPED
,
isSourceLocationEscaped(TranscodingJob)
public static boolean isSourceLocationEscaped(TranscodingJob job)
job
- transcoding job
SOURCE_LOC_ESCAPED
,
setSourceLocationEscaped(TranscodingJob, boolean)
public static void setInternalPathPrefix(TranscodingJob job, java.lang.String prefix)
Imposes a special prefix (i.e. extra folder) in the storage path where both source and transcoded files are to be placed.
NOTE: This feature is not applicable for text media (web rendering).
job
- trancoding jobprefix
- folder nameSOURCE_PATH_PREFIX
,
setInternalSourcePathPrefix(TranscodingJob, String)
,
getInternalSourcePathPrefix(TranscodingJob)
,
TARGET_PATH_PREFIX
,
setInternalTargetPathPrefix(TranscodingJob, String)
,
getInternalTargetPathPrefix(TranscodingJob)
public static void setInternalSourcePathPrefix(TranscodingJob job, java.lang.String prefix)
Imposes a special prefix (i.e. extra folder) in the storage path where a source file is to be placed.
NOTE: This feature is not applicable for text media (web rendering).
job
- trancoding jobprefix
- folder nameSOURCE_PATH_PREFIX
,
getInternalSourcePathPrefix(TranscodingJob)
,
setInternalPathPrefix(TranscodingJob, String)
,
setInternalTargetPathPrefix(TranscodingJob, String)
public static java.lang.String getInternalSourcePathPrefix(TranscodingJob job)
Gets the path prefix (i.e. folder name) of a storage folder where a source file will be placed.
job
- transcoding job
SOURCE_PATH_PREFIX
,
setInternalSourcePathPrefix(TranscodingJob, String)
public static void setInternalTargetPathPrefix(TranscodingJob job, java.lang.String prefix)
Imposes a special prefix (i.e. extra folder) in the storage path where a transcoded file is to be placed.
NOTE: This feature is not applicable for text media (web rendering).
job
- trancoding jobprefix
- folder nameTARGET_PATH_PREFIX
,
getInternalTargetPathPrefix(TranscodingJob)
,
setInternalPathPrefix(TranscodingJob, String)
,
setInternalSourcePathPrefix(TranscodingJob, String)
public static java.lang.String getInternalTargetPathPrefix(TranscodingJob job)
Gets the path prefix (i.e. folder name) of a storage folder where a transcoded file will be placed.
job
- transcoding job
TARGET_PATH_PREFIX
,
setInternalTargetPathPrefix(TranscodingJob, String)
public static void setNoTranscoding(TranscodingJob job)
Prevents Alembik from performing any transcoding for the given transcoding job; only the source file will be loaded into the storage.
job
- trancoding jobNO_TRANSCODING
,
isNoTranscodingSet(TranscodingJob)
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
public static void disableNoTranscoding(TranscodingJob job)
job
- trancoding jobsetNoTranscoding(TranscodingJob)
public static boolean isNoTranscodingSet(TranscodingJob job)
job
- transcoding job
NO_TRANSCODING
,
setNoTranscoding(TranscodingJob)
public static boolean isStreaming(TranscodingJob job)
job
- transcoding job
public static boolean isStreaming(Media media)
media
- Video
object
public static void setHinting(Media media)
media
- Video
objectpublic static boolean isHinting(TranscodingJob job)
job
- transcoding job
public static boolean isHinting(Media media)
media
- Video
object
public static java.lang.Long getDownloadSize(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
setDownloadSizeLimit(TranscodingJob, long)
,
setDownloadSizeAndDurationLimit(TranscodingJob, int, long)
,
setProgressiveDownloadBySize(TranscodingJob, long)
public static java.lang.Long getDownloadStart(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_START
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setDownloadSizeSegment(TranscodingJob, long, long)
public static java.lang.Integer getDownloadDuration(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
setDownloadDurationLimit(TranscodingJob, int)
,
setDownloadSizeAndDurationLimit(TranscodingJob, int, long)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
public static java.lang.Integer getDownloadOffset(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_OFFSET
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
setDownloadDurationSegment(TranscodingJob, int, int)
public static boolean isDownloadTreatedAsComplete(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
setDownloadSizeLimit(TranscodingJob, long, boolean)
,
setDownloadDurationLimit(TranscodingJob, int, boolean)
public static boolean isDownloadRepeat(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
public static java.lang.Integer getDownloadMinDuration(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MIN_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
public static java.lang.Integer getDownloadMaxCount(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
public static void setDownloadLimit(TranscodingJob job, long downloadLimit)
setDownloadSizeLimit(TranscodingJob, long)
instead
public static void setDownloadLimit(TranscodingJob job, long downloadLimit, boolean treatAsComplete)
setDownloadSizeLimit(TranscodingJob, long, boolean)
instead
public static void setDownloadSizeLimit(TranscodingJob job, long size)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching the given size limit.
If the loaded file is larger than the specified limit, it will be treated as a truncated one (i.e. stored in a folder with a special suffix).
job
- transcoding jobsize
- size limit in bytesTRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
setDownloadSizeLimit(TranscodingJob, long, boolean)
,
getDownloadSize(TranscodingJob)
public static void setDownloadSizeLimit(TranscodingJob job, long size, boolean treatAsComplete)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching the given size limit.
If the treatAsComplete argument is true the loaded file will be treated as complete, regardless of its actual size. Otherwise, if it needs to be truncated, it will be stored in a folder with a special suffix.
job
- transcoding jobsize
- size limit in bytestreatAsComplete
- treat the loaded file as complete?TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
getDownloadSize(TranscodingJob)
,
isDownloadTreatedAsComplete(TranscodingJob)
public static void setDownloadApproxDuration(TranscodingJob job, int approxDuration)
setDownloadDurationLimit(TranscodingJob, int)
instead
public static void setDownloadApproxDuration(TranscodingJob job, int approxDuration, boolean treatAsComplete)
setDownloadDurationLimit(TranscodingJob, int, boolean)
instead
public static void setDownloadDurationLimit(TranscodingJob job, int duration)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching (approximately) the given number of seconds.
If the loaded file is longer than the specified limit, it will be treated as a truncated one (i.e. stored in a folder with a special suffix).
This transformation can be applied only to audio and video content.
job
- transcoding jobduration
- number of secondsTRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
setDownloadDurationLimit(TranscodingJob, int, boolean)
,
getDownloadDuration(TranscodingJob)
public static void setDownloadDurationLimit(TranscodingJob job, int duration, boolean treatAsComplete)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching (approximately) the given number of seconds.
If the treatAsComplete argument is true the loaded file will be treated as complete, regardless of its actual duration length. Otherwise, if it needs to be truncated, it will be stored in a folder with a special suffix.
This transformation can be applied only to audio and video content.
job
- transcoding jobduration
- number of secondstreatAsComplete
- treat the loaded file as complete?TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
getDownloadDuration(TranscodingJob)
,
isDownloadTreatedAsComplete(TranscodingJob)
public static void setDownloadSizeAndDurationLimit(TranscodingJob job, int duration, long size)
Applies DownloadLimit transformation for the given transcoding job, which will make Alembik media loader truncate a source file after reaching first of the specified limits: the given number of seconds (approximately) or the given number of bytes.
Mind that the loaded file will be always treated as complete, regardless of its actual size and duration length.
This transformation can be applied only to audio and video content.
job
- transcoding jobduration
- number of secondssize
- number of bytesTRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_TREAT_COMPLETE
,
setDownloadSizeLimit(TranscodingJob, long, boolean)
,
setDownloadDurationLimit(TranscodingJob, int, boolean)
public static void setDownloadSizeSegment(TranscodingJob job, long start, long size)
Applies DownloadLimit transformation for the given transcoding job, which is
usually used to reference a particular source file part from the "progressive
segmentation" (see setProgressiveDownloadBySize(TranscodingJob, long)
.
Here the start argument must be multiplication of size, while
the latter has to match the one from a previous progressive download job.
In case when there has been no previous "progressive segmentation" made Alembik will implicitly request one until the referenced part is not reached.
job
- transcoding jobstart
- size offset in bytessize
- size of each part (in bytes)TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_START
,
setProgressiveDownloadBySize(TranscodingJob, long)
,
getDownloadSize(TranscodingJob)
,
getDownloadStart(TranscodingJob)
public static void setDownloadDurationSegment(TranscodingJob job, int offset, int duration)
Applies DownloadLimit transformation for the given transcoding job, which is
usually used to reference a particular source file part from the "progressive
segmentation" (see setProgressiveDownloadByDuration(TranscodingJob, int)
.
Here the offset argument must be multiplication of duration, while
the latter has to match the one from a previous progressive download job.
In case when there has been no previous "progressive segmentation" made Alembik will implicitly request one until the referenced part is not reached.
job
- transcoding joboffset
- duration offset in secondsduration
- duration of each part (in seconds)TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_OFFSET
,
setProgressiveDownloadByDuration(TranscodingJob, int)
,
getDownloadDuration(TranscodingJob)
,
getDownloadOffset(TranscodingJob)
public static void setProgressiveDownloadBySize(TranscodingJob job, long segmentSize)
Applies DownloadLimit transformation for the given transcoding job, which makes
Alembik perform the "progressive segmentation" of a source file while loading it.
That is the whole file will get partitioned into a parts of equal segmentSize, each
stored in a separate folder with a special suffix. The whole source file will also be retained,
providing that the NO_COPY_SOURCE_FILE
option is off.
Since the repeated loading excludes any transcoding, the method implicitly sets
NO_TRANSCODING
flag on.
job
- transcoding jobsegmentSize
- number of bytesTRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
setProgressiveDownloadBySize(TranscodingJob, long, int)
,
getDownloadSize(TranscodingJob)
,
isDownloadRepeat(TranscodingJob)
public static void setProgressiveDownloadBySize(TranscodingJob job, long segmentSize, int maxCount)
Applies DownloadLimit transformation for the given transcoding job, which makes Alembik perform the "progressive segmentation" of a source file while loading it. That is the loaded file will get partitioned into pieces of equal segmentSize, until either the end of file or the specified maximum number of parts (maxCount) is reached. Each file part will be stored in a separate folder with a special suffix.
The source file made of all loaded parts will also be retained, providing that
the NO_COPY_SOURCE_FILE
option is off. Moreover, it will always be treated
as complete, no matter if maxCount limit has made it truncated or not.
Since the repeated loading excludes any transcoding, the method implicitly sets
NO_TRANSCODING
flag on.
job
- transcoding jobsegmentSize
- number of bytesmaxCount
- maximum number of parts (0 - no maximum number imposed)TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_SIZE
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
,
getDownloadSize(TranscodingJob)
,
getDownloadMaxCount(TranscodingJob)
,
isDownloadRepeat(TranscodingJob)
public static void setProgressiveDownloadByDuration(TranscodingJob job, int segmentDuration)
Applies DownloadLimit transformation for the given transcoding job, which makes
Alembik perform the "progressive segmentation" of a source file while loading it.
That is the whole file will get partitioned into a parts of equal segmentDuration, each
stored in a separate folder with a special suffix. The whole source file will also be retained,
providing that the NO_COPY_SOURCE_FILE
option is off.
Since the repeated loading excludes any transcoding, the method implicitly sets
NO_TRANSCODING
flag on.
job
- transcoding jobsegmentDuration
- number of secondsTRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
setProgressiveDownloadByDuration(TranscodingJob, int, Integer, Integer)
,
getDownloadDuration(TranscodingJob)
,
isDownloadRepeat(TranscodingJob)
public static void setProgressiveDownloadByDuration(TranscodingJob job, int segmentDuration, java.lang.Integer minDuration, java.lang.Integer maxCount)
Applies DownloadLimit transformation for the given transcoding job, which makes Alembik perform the "progressive segmentation" of a source file while loading it. That is the loaded file will get partitioned into pieces of equal segmentDuration, until either the end of file or the specified maximum number of parts (maxCount) is reached. Each file part will be stored in a separate folder with a special suffix.
The minDuration attribute requests the last part not to be shorter than the declared number of seconds. Thus if it happens to be shorter, it will be appended to the previous part.
The source file made of all loaded parts will also be retained, providing that
the NO_COPY_SOURCE_FILE
option is off. Moreover, it will always be treated
as complete, no matter if maxCount limit has made it truncated or not.
Since the repeated loading excludes any transcoding, the method implicitly sets
NO_TRANSCODING
flag on.
job
- transcoding jobsegmentDuration
- number of secondsmaxCount
- maximum number of parts (null - no maximum number imposed)minDuration
- minimum duration of the last part (null - no minimum limit imposed)TRANSFORMATION_DOWNLOAD_LIMIT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_REPEAT
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MIN_DURATION
,
TRANSFORMATION_DOWNLOAD_LIMIT_ATTR_MAX_COUNT
,
getDownloadDuration(TranscodingJob)
,
getDownloadMinDuration(TranscodingJob)
,
getDownloadMaxCount(TranscodingJob)
,
isDownloadRepeat(TranscodingJob)
public static java.lang.Integer getOffset(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_OFFSET
,
TRANSFORMATION_OFFSET_ATTR_START
,
setSegmentBoundaries(TranscodingJob, Integer, Integer)
public static java.lang.Integer getDuration(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_DURATION_LIMIT
,
TRANSFORMATION_DURATION_LIMIT_ATTR_LIMIT
,
setSegmentBoundaries(TranscodingJob, Integer, Integer)
public static void setSegmentBoundaries(TranscodingJob job, java.lang.Integer offset, java.lang.Integer duration)
job
- transcoding joboffset
- duration offset in millis (if null - the file beginning will
be the segment's start)duration
- duration length in millis (if null - the end of file will
be the segment's end)TRANSFORMATION_OFFSET
,
TRANSFORMATION_OFFSET_ATTR_START
,
getOffset(TranscodingJob)
,
TRANSFORMATION_DURATION_LIMIT
,
TRANSFORMATION_DURATION_LIMIT_ATTR_LIMIT
,
getDuration(TranscodingJob)
public static void setExtractGifPreview(TranscodingJob job)
job
- transcoding jobTRANSFORMATION_GIF_PREVIEW
public static java.lang.Integer getExtractFrameSecond(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_EXTRACT_FRAME
,
TRANSFORMATION_EXTRACT_FRAME_ATTR_SEC
,
setExtractFrame(TranscodingJob, String, int)
public static void setExtractFrame(TranscodingJob job, java.lang.String contentType, int second)
Applies ExtractFrame transformation for the given video transcoding job, which makes Alembik extract an image frame at the specified second. The extracted image will be of the declared contentType mime format.
Note that the transcoding job's target media instance must be of Image
type.
job
- transcoding jobcontentType
- mime-type of the extracted imagesecond
- frame position (in seconds)TRANSFORMATION_EXTRACT_FRAME
,
TRANSFORMATION_EXTRACT_FRAME_ATTR_SEC
,
Media.setContentType(String)
,
getExtractFrameSecond(TranscodingJob)
public static java.lang.String getAdverstisementVideo(TranscodingJob job)
job
- transcoding job
TRANSFORMATION_ADVERTISEMENT_VIDEO
,
TRANSFORMATION_ADVERTISEMENT_VIDEO_URL
,
setAdvertisementVideo(TranscodingJob, String)
public static void setAdvertisementVideo(TranscodingJob job, java.lang.String videoURL)
job
- transcoding jobvideoURL
- URL of the video to be insertedTRANSFORMATION_ADVERTISEMENT_VIDEO
,
TRANSFORMATION_ADVERTISEMENT_VIDEO_URL
,
getAdverstisementVideo(TranscodingJob)
public static void setImageOverlayLogo(TranscodingJob job, java.lang.String location, TranscodingUtils.OverlayLogoColor transparentColor, java.lang.Integer imageWidth)
Applies OverlayLogo transformation, which will make Alembik lay a logo (image) over the image of the given transcoding job. The logo will be retrieved from the provided location and, optionally, filled with transparentColor and resized to the given imageWidth.
Moreover, the method implicitly fills the TranscodingUtils.OverlayLogoAttr.PROTOCOL
attribute by analyzing the logo location. If it starts with '/'
TranscodingUtils.SourceProtocol.FILE
is used; otherwise, if it begins with 'http'
string the method assumes TranscodingUtils.SourceProtocol.HTTP
.
job
- image transcoding joblocation
- logo locationtransparentColor
- desired logo background color; may be nullimageWidth
- desired logo width; may be nullTRANSFORMATION_OVERLAY_LOGO
,
TranscodingUtils.OverlayLogoAttr
,
getOverlayLogoAttrs(TranscodingJob)
public static void setVideoOverlayLogo(TranscodingJob job, java.lang.String location, TranscodingUtils.Coordinates coordinates, java.lang.Integer imageWidth)
Applies OverlayLogo transformation, which will make Alembik lay a logo (image) over the video of the given transcoding job. The logo will be retrieved from the provided location and, optionally, resized to the given imageWidth.
The transformation will locate the logo's upper-left corner at the [posX, posY]
position of the video picture and display it within the [offset, offset+duration]
period of video duration (see TranscodingUtils.Coordinates
class). For the default values refer to
the getOverlayLogoAttrs(TranscodingJob)
method.
Moreover, the method implicitly fills the TranscodingUtils.OverlayLogoAttr.PROTOCOL
attribute by analyzing the logo location. If it starts with '/'
TranscodingUtils.SourceProtocol.FILE
is used; otherwise, if it begins with 'http'
string the method assumes TranscodingUtils.SourceProtocol.HTTP
.
job
- video transcoding joblocation
- logo locationcoordinates
- desired logo position and visibility period; may be nullimageWidth
- desired logo width; may be nullTRANSFORMATION_OVERLAY_LOGO
,
TranscodingUtils.OverlayLogoAttr
,
TranscodingUtils.Coordinates
,
getOverlayLogoAttrs(TranscodingJob)
public static java.util.Map<TranscodingUtils.OverlayLogoAttr,java.lang.String> getOverlayLogoAttrs(TranscodingJob job)
Returns the map of the OverlayLogo transformation attributes, which have been set for the given transcoding job.
Certain attributes default to fixed values if missing:
job
- transcoding job.
TRANSFORMATION_OVERLAY_LOGO
,
TranscodingUtils.OverlayLogoAttr
,
setImageOverlayLogo(TranscodingJob, String, org.alembik.util.TranscodingUtils.OverlayLogoColor, Integer)
,
setVideoOverlayLogo(TranscodingJob, String, org.alembik.util.TranscodingUtils.Coordinates, Integer)
public static void setImageTextOverlay(TranscodingJob job, java.lang.String message, TranscodingUtils.TextOverlayFont font)
Applies TextOverlay transformation, which will make Alembik lay a text (message) over an image of the given transcoding job.
job
- image transcoding jobmessage
- text to be overlayedfont
- desired font attributes; may be nullTRANSFORMATION_TEXT_OVERLAY
,
TranscodingUtils.TextOverlayAttr
,
getTextOverlayAttrs(TranscodingJob)
public static void setVideoTextScrollOverlay(TranscodingJob job, java.lang.String message, TranscodingUtils.TextOverlayFont font, TranscodingUtils.Coordinates coordinates)
Applies TextOverlay transformation, which will make Alembik lay a scrolling text (message) over a video of the given transcoding job.
The transformation will vertically align the text upper margin to the posY
position of the video picture and display it within the [offset, offset+duration]
period of video duration (see TranscodingUtils.Coordinates
class). For the default values
refer to the getTextOverlayAttrs(TranscodingJob)
method.
job
- video transcoding jobmessage
- text to be overlayedfont
- desired font attributes; may be nullcoordinates
- desired text position and visibility period; may be nullTRANSFORMATION_TEXT_OVERLAY
,
TranscodingUtils.TextOverlayAttr
,
TranscodingUtils.Coordinates
,
getTextOverlayAttrs(TranscodingJob)
public static void setVideoTextOverlay(TranscodingJob job, java.lang.String message, TranscodingUtils.TextOverlayFont font, TranscodingUtils.Coordinates coordinates)
Applies TextOverlay transformation, which will make Alembik lay a static text (message) over a video of the given transcoding job.
The transformation will locate the text's upper-left corner at the [posX, posY]
position of the video picture and display it within the [offset, offset+duration]
period of video duration (see TranscodingUtils.Coordinates
class). For the default values refer to
the getTextOverlayAttrs(TranscodingJob)
method.
job
- video transcoding jobmessage
- text to be overlayedfont
- desired font attributes; may be nullcoordinates
- desired text position and visibility period; may be nullTRANSFORMATION_TEXT_OVERLAY
,
TranscodingUtils.TextOverlayAttr
,
TranscodingUtils.Coordinates
,
getTextOverlayAttrs(TranscodingJob)
public static java.util.Map<TranscodingUtils.TextOverlayAttr,java.lang.String> getTextOverlayAttrs(TranscodingJob job)
Returns the map of the TextOverlay transformation attributes, which have been set for the given transcoding job.
Certain attributes default to fixed values if missing:
TranscodingUtils.TextOverlayColor.WHITE
,TranscodingUtils.TextOverlayOrientation.HORIZONTAL
,
job
- transcoding job.
TRANSFORMATION_TEXT_OVERLAY
,
TranscodingUtils.TextOverlayAttr
,
setImageTextOverlay(TranscodingJob, String, org.alembik.util.TranscodingUtils.TextOverlayFont)
,
setVideoTextOverlay(TranscodingJob, String, org.alembik.util.TranscodingUtils.TextOverlayFont, org.alembik.util.TranscodingUtils.Coordinates)
,
setVideoTextScrollOverlay(TranscodingJob, String, org.alembik.util.TranscodingUtils.TextOverlayFont, org.alembik.util.TranscodingUtils.Coordinates)
public static void setNoLinks(TranscodingJob job)
job
- text transcoding jobTRANSFORMATION_NO_LINKS
public static void setOrganizeText(TranscodingJob job)
job
- text transcoding jobTRANSFORMATION_ORGANIZE_TEXT
public static void setOnlyText(TranscodingJob job)
job
- text transcoding jobpublic static java.util.Map<TranscodingUtils.NavigationBarAttr,java.lang.String> getNavigationBarAttrs(TranscodingJob job)
job
- text transcoding job
TRANSFORMATION_NAVIGATION_BAR
,
TranscodingUtils.NavigationBarAttr
public static void setNavigationBarAttrs(TranscodingJob job, java.util.Map<TranscodingUtils.NavigationBarAttr,java.lang.String> attrsMap)
job
- text transcoding jobsattrsMap
- map of the desired attributes with their valuesTRANSFORMATION_NAVIGATION_BAR
,
TranscodingUtils.NavigationBarAttr
public static void setMarkupLanguage(Text text, TranscodingUtils.MarkupLanguage markupLanguage)
text
- media object representing the transcoding job of a web documentmarkupLanguage
- desired markup languageMARKUP_LANGUAGE
,
TranscodingUtils.MarkupLanguage
,
getMarkupLanguage(Text)
public static TranscodingUtils.MarkupLanguage getMarkupLanguage(Text text)
text
- media object representing the transcoding job of a web document
MARKUP_LANGUAGE
,
TranscodingUtils.MarkupLanguage
,
setMarkupLanguage(Text, org.alembik.util.TranscodingUtils.MarkupLanguage)
public static void setCSSVersion(Text text, TranscodingUtils.CSSVersion cssVersion)
text
- media object representing the transcoding job of a web documentcssVersion
- CSS support typeCSS_VERSION
,
TranscodingUtils.CSSVersion
,
getCSSVersion(Text)
public static TranscodingUtils.CSSVersion getCSSVersion(Text text)
text
- media object representing the transcoding job of a web document
CSS_VERSION
,
TranscodingUtils.CSSVersion
,
setCSSVersion(Text, org.alembik.util.TranscodingUtils.CSSVersion)
public static void setPageSizeEval(Text text, TranscodingUtils.PageSizeEval eval)
text
- media object representing the transcoding job of a web documenteval
- size evaluation algorithmMOBILE_PAGE_SIZE_EVAL
,
TranscodingUtils.PageSizeEval
,
getPageSizeEval(Text)
public static TranscodingUtils.PageSizeEval getPageSizeEval(Text text)
text
- media object of a transcoding job
TranscodingUtils.PageSizeEval.TEXT_ONLY
MOBILE_PAGE_SIZE_EVAL
,
TranscodingUtils.PageSizeEval
,
setPageSizeEval(Text, org.alembik.util.TranscodingUtils.PageSizeEval)
public static void setImageRendering(Text text, TranscodingUtils.ImageRendering option)
text
- media object representing the transcoding job of a web documentoption
- image rendering optionMOBILE_IMAGE_RENDERING
,
TranscodingUtils.ImageRendering
,
getImageRendering(Text)
public static TranscodingUtils.ImageRendering getImageRendering(Text text)
text
- media object representing the transcoding job of a web document
TranscodingUtils.ImageRendering.CLIENT_PROCESSING
MOBILE_IMAGE_RENDERING
,
TranscodingUtils.ImageRendering
,
setImageRendering(Text, org.alembik.util.TranscodingUtils.ImageRendering)
public static TranscodingUtils.DetectionLevel getMobileWebDetectionLevel(TranscodingJob job)
Returns the mobile page detection level of the given transcoding job.
If it has not been explicitly set, the TranscodingUtils.DetectionLevel.ACTIVE
level
is returned by default for any Text
media.
Note that for any non-text content the level is invariably set to
TranscodingUtils.DetectionLevel.NONE
.
job
- transcoding job
MOBILE_WEB_DETECTION
,
TranscodingUtils.DetectionLevel
,
setMobileWebDetectionLevel(TranscodingJob, org.alembik.util.TranscodingUtils.DetectionLevel)
public static void setMobileWebDetectionLevel(TranscodingJob job, TranscodingUtils.DetectionLevel level)
Requests the specified mobile page detection level for a web document of the given transcoding job.
Note that the level can be adjusted only for the Text
content.
job
- transcoding joblevel
- desired detection levelMOBILE_WEB_DETECTION
,
TranscodingUtils.DetectionLevel
,
getMobileWebDetectionLevel(TranscodingJob)
public static boolean isHTMLDetection(Media media)
media
- media object representing the transcoding job of a web document
MOBILE_HTML_SUPPORT
,
setHTMLDetection(TranscodingJob, boolean)
,
isHTMLDetection(TranscodingJob)
public static boolean isHTMLDetection(TranscodingJob job)
job
- transcoding job
MOBILE_HTML_SUPPORT
,
setHTMLDetection(TranscodingJob, boolean)
,
isHTMLDetection(Media)
public static void setHTMLDetection(TranscodingJob job, boolean enable)
Enables or disables the HTML support detection for the given transcoding job.
If enabled the capabilities of a requesting client (device) will be analyzed to figure out whether the device is capable of HTML rendering; if so the page will not be transcoded and its original location will be returned instead.
The device will be considered as HTML-capable, if it supports either HTML, advanced XHTML (level 4 in WURFL) or JavaScript.
job
- transcoding jobenable
- true to enable HTML support, false to disable itMOBILE_HTML_SUPPORT
,
isHTMLDetection(Media)
,
isHTMLDetection(TranscodingJob)
public static boolean isPreserveMetadata(Media media)
media
- media object of a transcoding job
PRESERVE_METADATA
,
setPreserveMetadata(Media)
public static void setPreserveMetadata(Media media)
media
- media object of a transcoding jobPRESERVE_METADATA
,
isPreserveMetadata(Media)
,
removePreserveMetadata(Media)
public static void removePreserveMetadata(Media media)
media
- media object of a transcoding jobPRESERVE_METADATA
,
setPreserveMetadata(Media)
public static void setToCache(TranscodingJob job, java.lang.String cacheId, long cacheTime)
job
- transcoding jobcacheId
- cache unique keycacheTime
- caching expiry time (in milliseconds)TO_CACHE_ID
,
TO_CACHE_TIME
,
getCacheId(TranscodingJob)
,
getCacheTime(TranscodingJob)
public static java.lang.String getCacheId(TranscodingJob job)
job
- transcoding job
TO_CACHE_ID
,
setToCache(TranscodingJob, String, long)
public static java.lang.Long getCacheTime(TranscodingJob job)
job
- transcoding job
TO_CACHE_TIME
,
setToCache(TranscodingJob, String, long)
public static void setBestMatchingQuality(TranscodingJob job, Quality quality)
setBestMatchingQuality(TranscodingJob, Quality, boolean)
method for
the detailed information.
job
- transcoding jobquality
- desired quality of the matching profilesetBestMatchingQuality(TranscodingJob, Quality, boolean)
public static void setBestMatchingQuality(TranscodingJob job, Quality quality, boolean hintable)
Applies the "best matching" strategy for the given transcoding job.
The strategy will force Alembik to match the capabilities of a requesting device (resolved using its User-Agent string) against the list of profiles predefined at the server side. Then the profile of the parameters closest to the resolved ones will be used for subsequent transcoding.
Actually the parameters being matched are:
Video
and Audio
are supported),Video.VideoVisual.getCodec()
,
Video.VideoAudio.getCodec()
and Audio.getCodec()
),In case of predefined video profiles with the TRANSFORMATION_STREAMING
transformation
declared, they are considered only for the job with the same transformation applied.
In case of Quality.HIGH
, Quality.MEDIUM
or Quality.LOW
quality
passed the screen dimensions are excluded from the comparison and the first matching profile of
a given quality is selected. If none fits Alembik picks the first defined profile of the
Quality.ANY
quality and of the relevant media type (and with Streaming declared
if applicable).
In case of Quality.ANY
quality, all the levels are analyzed and the first
encountered profile of the highest possible quality is selected.
The additional hintable parameter applies to video jobs only and, if set to true,
tells the server to check, whether the device requires hinted files for playback (i.e. progressive
download). If it is so, only the "hintable" predefined profiles will be taken into account
and the eventual transcoding parameters set will contain the TRANSFORMATION_HINTING
.
job
- transcoding jobquality
- desired quality of the matching profilehintable
- does the video hinting requirement need to be considered?TRANSCODING_QUALITY
,
TRANSCODING_HINTABLE
,
Quality
,
isBestMatchingRequested(TranscodingJob)
,
getBestMatchingQuality(TranscodingJob)
,
isBestMatchingHintable(TranscodingJob)
public static Quality getBestMatchingQuality(TranscodingJob job)
job
- transcoding job
TRANSCODING_QUALITY
,
Quality
,
setBestMatchingQuality(TranscodingJob, Quality, boolean)
,
isBestMatchingRequested(TranscodingJob)
public static boolean isBestMatchingHintable(TranscodingJob job)
job
- transcoding job
TRANSCODING_HINTABLE
,
TRANSFORMATION_HINTING
,
setBestMatchingQuality(TranscodingJob, Quality, boolean)
public static boolean isBestMatchingRequested(TranscodingJob job)
job
- transcoding job
TRANSCODING_QUALITY
,
Quality
,
setBestMatchingQuality(TranscodingJob, Quality, boolean)
public static java.lang.String getResultInfo(JobResult result, TranscodingUtils.FileInfo key)
result
- job result returned by the serverkey
- information property
TranscodingUtils.FileInfo
,
TranscodingService.processSync(TranscodingRequest)
,
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
public static TranscodingState getResultState(JobResult result)
result
- job result returned by the server
TranscodingState
,
TranscodingService.processSync(TranscodingRequest)
,
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
public static Quality getResultQuality(JobResult result)
result
- job result returned by the server
MATCHED_QUALITY
,
TranscodingService.processSync(TranscodingRequest)
,
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
,
setBestMatchingQuality(TranscodingJob, Quality)
public static java.lang.String getMatchedId(TranscodingParams profile)
Returns the proprietary identifier of a transcoding profile resolved by Alembik. The value may come from one of the following sources:
profile
- transcoding profile returned by the server
MATCHED_ID
,
TranscodingService.getTranscodingProfile(TranscodingJob)
public static java.lang.String getMatchedId(JobResult result)
Returns the proprietary identifier of a transcoding profile resolved by Alembik. The value may come from one of the following sources:
result
- job result returned by the server
MATCHED_ID
,
TranscodingService.processSync(TranscodingRequest)
,
TranscodingService.getTranscodingInfo(TranscodingRequest, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |