IT. Expert System.

Android Reference

MediaImageItem


android.media.videoeditor

Class MediaImageItem



  • public class MediaImageItem
    extends MediaItem
    This class represents an image item on the storyboard. Note that images are scaled down to the maximum supported resolution by preserving the native aspect ratio. To learn the scaled image dimensions use getScaledWidth() and getScaledHeight() respectively.
    • Constructor Detail

      • MediaImageItem

        public MediaImageItem(VideoEditor editor,
                      String mediaItemId,
                      String filename,
                      long durationMs,
                      int renderingMode)
                       throws IOException
        Constructor
        Parameters:
        editor - The video editor reference
        mediaItemId - The media item id
        filename - The image file name
        durationMs - The duration of the image on the storyboard
        renderingMode - The rendering mode
        Throws:
        IOException
    • Method Detail

      • getFileType

        public int getFileType()
        Specified by:
        getFileType in class MediaItem
        Returns:
        The source file type
      • getWidth

        public int getWidth()
        Specified by:
        getWidth in class MediaItem
        Returns:
        Get the native width of the media item
      • getHeight

        public int getHeight()
        Specified by:
        getHeight in class MediaItem
        Returns:
        Get the native height of the media item
      • getScaledWidth

        public int getScaledWidth()
        Returns:
        The scaled width of the image.
      • getScaledHeight

        public int getScaledHeight()
        Returns:
        The scaled height of the image.
      • getAspectRatio

        public int getAspectRatio()
        Description copied from class: MediaItem
        Get aspect ratio of the source media item.
        Specified by:
        getAspectRatio in class MediaItem
        Returns:
        the aspect ratio as described in MediaProperties. MediaProperties.ASPECT_RATIO_UNDEFINED if aspect ratio is not supported as in MediaProperties
      • setDuration

        public void setDuration(long durationMs)
        This method will adjust the duration of bounding transitions, effects and overlays if the current duration of the transactions become greater than the maximum allowable duration.
        Parameters:
        durationMs - The duration of the image in the storyboard timeline
      • getDuration

        public long getDuration()
        Specified by:
        getDuration in class MediaItem
        Returns:
        The is the full duration of the media item (not trimmed)
      • getTimelineDuration

        public long getTimelineDuration()
        Specified by:
        getTimelineDuration in class MediaItem
        Returns:
        The timeline duration. This is the actual duration in the timeline (trimmed duration)
      • getThumbnail

        public Bitmap getThumbnail(int width,
                          int height,
                          long timeMs)
                            throws IOException
        Description copied from class: MediaItem
        Create a thumbnail at specified time in a video stream in Bitmap format
        Specified by:
        getThumbnail in class MediaItem
        Parameters:
        width - width of the thumbnail in pixels
        height - height of the thumbnail in pixels
        timeMs - The time in the source video file at which the thumbnail is requested (even if trimmed).
        Returns:
        The thumbnail as a Bitmap.
        Throws:
        IOException - if a file error occurs
      • getThumbnailList

        public void getThumbnailList(int width,
                            int height,
                            long startMs,
                            long endMs,
                            int thumbnailCount,
                            int[] indices,
                            MediaItem.GetThumbnailListCallback callback)
                              throws IOException
        Description copied from class: MediaItem
        Get the array of Bitmap thumbnails between start and end.
        Specified by:
        getThumbnailList in class MediaItem
        Parameters:
        width - width of the thumbnail in pixels
        height - height of the thumbnail in pixels
        startMs - The start of time range in milliseconds
        endMs - The end of the time range in milliseconds
        thumbnailCount - The thumbnail count
        indices - The indices of the thumbnails wanted
        callback - The callback used to pass back the bitmaps
        Throws:
        IOException - if a file error occurs
      • nextPowerOf2

        public static int nextPowerOf2(int n)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 120 / 158770737. Delta: 0.02688 с