Package com.totalchange.jizz.data.entity

Examples of com.totalchange.jizz.data.entity.JizzSongEncoding


        song.setMasterBlobRef("Test");
       
        Set<JizzSongEncoding> encodings = new HashSet<>();
        song.setEncodings(encodings);
       
        JizzSongEncoding encoding = new JizzSongEncoding();
        encoding.setSong(song);
        encoding.setFormat(JizzTrackAudioFormat.Format.MP3.name());
        encoding.setBitRateKbps(128);
        encoding.setBlobRef("encodingBlob1");
        encodings.add(encoding);
       
        encoding = new JizzSongEncoding();
        encoding.setSong(song);
        encoding.setFormat(JizzTrackAudioFormat.Format.MP3.name());
        encoding.setBitRateKbps(192);
        encoding.setBlobRef("encodingBlob1");
        encodings.add(encoding);

        return jizzSongJpaDao.createOrUpdateSong(song);
    }
View Full Code Here


                    .iterator();
            if (!encodings.hasNext()) {
                throw new RuntimeException("Song has no encodings");
            }

            JizzSongEncoding encoding = encodings.next();
            format = new JizzTrackAudioFormat();
            format.setFormat(JizzTrackAudioFormat.Format.valueOf(encoding
                    .getFormat()));
            format.setBitRate(encoding.getBitRateKbps());
        } else {
            // No songs? No format needed then. Will be a short broadcast :-(
            format = null;
        }
View Full Code Here

        }

        logger.trace("Transcoded, committing encoded blob");
        String encodedBlobRef = encodedBlob.commit();

        JizzSongEncoding encoding = new JizzSongEncoding();
        encoding.setFormat(format.getFormat().name());
        encoding.setBitRateKbps(format.getBitRate());
        encoding.setBlobRef(encodedBlobRef);

        Set<JizzSongEncoding> encodings = new HashSet<>(1);
        encodings.add(encoding);
        song.setEncodings(encodings);
View Full Code Here

TOP

Related Classes of com.totalchange.jizz.data.entity.JizzSongEncoding

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.