Class ShadowMediaMetadataRetriever

    • Constructor Detail

      • ShadowMediaMetadataRetriever

        public ShadowMediaMetadataRetriever()
    • Method Detail

      • setDataSource

        public void setDataSource​(DataSource dataSource)
      • setDataSource

        @Implementation
        protected void setDataSource​(String path)
      • setDataSource

        @Implementation
        protected void setDataSource​(Context context,
                                     Uri uri)
      • setDataSource

        @Implementation
        protected void setDataSource​(String uri,
                                     Map<String,​String> headers)
      • setDataSource

        @Implementation
        protected void setDataSource​(FileDescriptor fd,
                                     long offset,
                                     long length)
      • setDataSource

        @Implementation(minSdk=23)
        protected void setDataSource​(MediaDataSource mediaDataSource)
      • extractMetadata

        @Implementation
        protected String extractMetadata​(int keyCode)
      • getFrameAtTime

        @Implementation
        protected Bitmap getFrameAtTime​(long timeUs,
                                        int option)
      • getFrameAtTime

        @Implementation
        protected Bitmap getFrameAtTime()
      • getScaledFrameAtTime

        @Implementation(minSdk=27)
        protected Bitmap getScaledFrameAtTime​(long timeUs,
                                              int option,
                                              int dstWidth,
                                              int dstHeight)
      • addMetadata

        public static void addMetadata​(DataSource ds,
                                       int keyCode,
                                       String value)
      • addFrame

        public static void addFrame​(DataSource ds,
                                    long time,
                                    Bitmap bitmap)
      • addScaledFrame

        public static void addScaledFrame​(DataSource ds,
                                          long time,
                                          int dstWidth,
                                          int dstHeight,
                                          Bitmap bitmap)
      • addFrame

        public static void addFrame​(FileDescriptor fd,
                                    long offset,
                                    long length,
                                    long time,
                                    Bitmap bitmap)
        Adds the given bitmap at the given time for the given data source. Uses path to call DataSource.toDataSource(FileDescriptor, long, long) and then calls addFrame(DataSource, long, Bitmap). This method is retained mostly for backwards compatibility; you can call addFrame(DataSource, long, Bitmap) directly.
        Parameters:
        fd - file descriptor of the data source.
        offset - the byte offset within the specified file from which to start reading the data.
        length - the number of bytes to read from the file.
        time - the playback time at which the specified bitmap should be retrieved.
        bitmap - the bitmap to retrieve.
      • reset

        @Resetter
        public static void reset()