Changeset 26236

Show
Ignore:
Timestamp:
24.09.2012 10:43:05 (7 years ago)
Author:
jmt12
Message:

Limit the size of the keyframe preview field so that we can have a hardcoded lenght for the field in terrier.properties configuration without breaking things. I've started with maxlength=1024 - which should be around 80 thumbnails.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/video-and-audio/trunk/src/opt/Terrier/VideoDocument.java

    r26235 r26236  
    6767  protected final String preview_width = ApplicationSetup.getProperty("ImageDocument.preview_width", "200"); 
    6868 
     69  protected int max_keyframe_images_length = 1024; 
    6970 
    7071  /** Default constructor. **/ 
     
    287288          else 
    288289          { 
    289             keyframe_images += "," + image_filename; 
     290            // Consider the maximum size of the preview images field 
     291            if ((keyframe_images.length() + image_filename.length() + 1) < this.max_keyframe_images_length) 
     292            { 
     293              keyframe_images += "," + image_filename; 
     294            } 
     295            // Break out of loop 
     296            else 
     297            { 
     298              i = files.length; 
     299            } 
    290300          } 
    291301        }