Package serializers.activemq.protobuf.MediaContentHolder.MediaContent

Examples of serializers.activemq.protobuf.MediaContentHolder.MediaContent.MediaContentBean


    public byte[] serialize(MediaContent content) throws IOException {
        return content.freeze().toUnframedByteArray();
    }

    public MediaContent create() {
        MediaContentBean content = new MediaContentBean()
        .setMedia(
            new MediaBean()
            .setUri("http://javaone.com/keynote.mpg")
            .setFormat("video/mpg4")
            .setTitle("Javaone Keynote")
            .setDuration(1234567)
            .setSize(123)
            .setBitrate(0)
            .addPerson("Bill Gates")
            .addPerson("Steve Jobs")
            .setPlayer(Player.JAVA)
            .setWidth(0)
            .setHeight(0)
        )
        .addImage(
            new ImageBean()
            .setUri("http://javaone.com/keynote_large.jpg")
            .setSize(Size.LARGE)
            .setTitle("Javaone Keynote")
            .setWidth(0)
            .setHeight(0)
        )
        .addImage(
            new ImageBean()
            .setUri("http://javaone.com/keynote_thumbnail.jpg")
            .setSize(Size.SMALL)
            .setTitle("Javaone Keynote")
            .setWidth(0)
            .setHeight(0)
        );
        return content.freeze();
    }
View Full Code Here

TOP

Related Classes of serializers.activemq.protobuf.MediaContentHolder.MediaContent.MediaContentBean

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.