app/src/main/java/fi/finwe/orion360/sdk/pro/examples/gallery/ThumbnailPager.java
void addVideosFromPath(String path, String filter) {
            for (File file : new File(path).listFiles()) {
                String fileName = file.getName();
                if (fileName.endsWith(filter)) {
                    String filePath = path + fileName;
                    String thumbPath = filePath.replace(filter, ".jpg");
                    MainMenu.createThumbnailForVideo(
                            ThumbnailPager.this, filePath,
                            10000, // Grab a frame at 10s from the beginning for a thumbnail.
                            720,   // Scale thumbnails for 720 pixels high
                            thumbPath,
                            90);   // Save thumbnails as jpg files with quality level 90.
                    mGalleryItems.add(new GalleryItem(filePath, thumbPath));
                    Log.v(TAG, "Added file " + filePath + " with thumb " + thumbPath);
                }
            }
        }
/**
         * Scan the given path for video files, create thumbnails, and add to video gallery.
         *
         * @param path The file system path to scan for video files.
         * @param filter The filename extension for recognizing videos from other files.
         */
Scan the given path for video files, create thumbnails, and add to video gallery.
@param path The file system path to scan for video files.
@param filter The filename extension for recognizing videos from other files.
Scan the given path for video files create thumbnails and add to video gallery . @param path The file system path to scan for video files . @param filter The filename extension for recognizing videos from other files .
void addVideosFromPath(String path, String filter) {
            for (File file : new File(path).listFiles()) {
                String fileName = file.getName();
                if (fileName.endsWith(filter)) {
                    String filePath = path + fileName;
                    String thumbPath = filePath.replace(filter, ".jpg");
                    MainMenu.createThumbnailForVideo(
                            ThumbnailPager.this, filePath,
                            10000, 
                            720,   
                            thumbPath,
                            90);   
                    mGalleryItems.add(new GalleryItem(filePath, thumbPath));
                    Log.v(TAG, "Added file " + filePath + " with thumb " + thumbPath);
                }
            }
        }
void addVideosFromPath ( String path , String filter ) { for ( File file : new File ( path ) . listFiles ( ) ) { String fileName = file . getName ( ) ; if ( fileName . endsWith ( filter ) ) { String filePath = path + fileName ; String thumbPath = filePath . replace ( filter , ".jpg" ) ; MainMenu . createThumbnailForVideo ( ThumbnailPager . this , filePath , 10000 , 720 , thumbPath , 90 ) ; mGalleryItems . add ( new GalleryItem ( filePath , thumbPath ) ) ; Log . v ( TAG , "Added file " + filePath + " with thumb " + thumbPath ) ; } } }
Scan the given path for video files, create thumbnails, and add to video gallery.
Scan the given path for video files create thumbnails and add to video gallery .
// Grab a frame at 10s from the beginning for a thumbnail. // Scale thumbnails for 720 pixels high // Save thumbnails as jpg files with quality level 90.