Package net.datacrow.util.movie

Examples of net.datacrow.util.movie.FilePropertiesMovie


        movie.setValue(Movie._A_TITLE, getName(filename, directoryUsage));

        try {
            Hash.getInstance().calculateHash(movie);

            FilePropertiesMovie fpm = new FilePropertiesMovie(filename);
            Long playlength = Long.valueOf(fpm.getDuration());
            if (playlength.intValue() <= 0 && fpm.getVideoWidth() <= 0)
                return movie;

            if (directoryUsage != 1 && fpm.getName() != null && fpm.getName().trim().length() > 0)
                movie.setValue(Movie._A_TITLE, fpm.getName());
           
            DataManager.createReference(movie, Movie._D_LANGUAGE, fpm.getLanguage());
           
           
            long frames = (long) (fpm.getDuration() * fpm.getVideoRate());
            movie.setValue(Movie._L_PLAYLENGTH, playlength);
            movie.setValue(Movie._N_VIDEOCODEC, fpm.getVideoCodec());
            movie.setValue(Movie._O_AUDIOCODEC, fpm.getAudioCodec());
            movie.setValue(Movie._P_WIDTH, fpm.getVideoWidth() <= 0 ? null : Long.valueOf(fpm.getVideoWidth()));
            movie.setValue(Movie._Q_HEIGHT, fpm.getVideoHeight() <= 0 ? null : Long.valueOf(fpm.getVideoHeight()));
            movie.setValue(Movie._R_FPS, fpm.getVideoRate() <= 0 ? null : Double.valueOf(fpm.getVideoRate()));
            movie.setValue(Movie._S_FRAMES, frames <= 0 ? null : frames);
            movie.setValue(Movie._T_AUDIOBITRATE, fpm.getAudioBitRate() <= 0 ? null : Long.valueOf(fpm.getAudioBitRate()));
            movie.setValue(Movie._U_AUDIOSAMPLINGRATE, fpm.getAudioRate() <= 0 ? null : Long.valueOf(fpm.getAudioRate()));
            movie.setValue(Movie._V_AUDIOCHANNEL, fpm.getAudioChannels() <= 0 ? null : Long.valueOf(fpm.getAudioChannels()));
           
            DataManager.createReference(movie, Movie._2_SUBTITLELANGUAGE, fpm.getSubtitles());
           
            setImages(filename, movie, Movie._X_PICTUREFRONT, Movie._Y_PICTUREBACK, Movie._Z_PICTURECD);
           
            int bitrate = fpm.getVideoBitRate();
            if (bitrate <= 0) {
                MovieFile mf = new MovieFile(filename);
                bitrate = (int) mf.getVideoBitrate();
            }

View Full Code Here

TOP

Related Classes of net.datacrow.util.movie.FilePropertiesMovie

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.