Package flash.swf

Examples of flash.swf.MovieEncoder


        // some other object that can accept an OutputStream in its constructor. The point is
        // to eliminate the extra buffers, and just always write directly to the intended target.
        // - mikemo
        final boolean useCompression = configuration.getCompilerConfiguration().useCompression();
        TagEncoder encoder = configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();
        new MovieEncoder(encoder).export(movie, useCompression);
        encoder.writeTo(out);
        generateSizeReport(configuration, movie, encoder);

        if (ThreadLocalToolkit.getBenchmark() != null)
        {
View Full Code Here


        // some other object that can accept an OutputStream in its constructor. The point is
        // to eliminate the extra buffers, and just always write directly to the intended target.
        // - mikemo
        final boolean useCompression = configuration.getCompilerConfiguration().useCompression();
        TagEncoder encoder = configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();       
        new MovieEncoder(encoder).export(movie, useCompression);
        encoder.writeTo(out);
        generateSizeReport(configuration, movie, encoder);

        if (ThreadLocalToolkit.getBenchmark() != null)
        {
View Full Code Here

    if (lib == null || lib.data == null || lib.data.movie == null) return 0;
   
    try
    {
      TagEncoder handler = new TagEncoder();
      MovieEncoder encoder = new MovieEncoder(handler);
      encoder.export(lib.data.movie);
           
            //TODO PERFORMANCE: A lot of unnecessary recopying here
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      handler.writeTo(baos);
View Full Code Here

        versions.setMinimumVersion(linkerConfiguration.getMinimumSupportedVersionString());
       
        // get SWF bytes
        ByteArrayOutputStream swfOut = new ByteArrayOutputStream();
        TagEncoder encoder = linkerConfiguration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();
        new MovieEncoder(encoder).export(movie, true); // always compress library.swf
        encoder.writeTo(swfOut);
        generateSizeReport(linkerConfiguration, movie, encoder);

        swfOut.flush();
        byte[] swf = swfOut.toByteArray();
View Full Code Here

          frame.addExport(asset);
        }
      }

      TagEncoder handler = new TagEncoder();
      MovieEncoder encoder = new MovieEncoder(handler);
      encoder.export(movie, true); // use compression

      // Hack: Nasty hard-coded knowledge that 'out' refers to the same file as 'file'
      writeU32(out, 0);
      out.flush();
      long before = file.getFilePointer();
View Full Code Here

                flex2.tools.WebTierAPI.optimize(movie, configuration);

                    //TODO PERFORMANCE: A lot of unnecessary recopying and buffering here
                // encode
                TagEncoder handler = new TagEncoder();
                MovieEncoder encoder = new MovieEncoder(handler);
                encoder.export(movie, true);
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                handler.writeTo(out);
               
                FileUtil.writeBinaryFile(output, out.toByteArray());
                System.out.println(output + " (" + outputFile.length() + " bytes)");             
View Full Code Here

        po3.setRef(sprite);
        po3.depth = depth;
        frame.controlTags.add(po3);

        TagEncoder tagEncoder = new TagEncoder();
        MovieEncoder movieEncoder = new MovieEncoder(tagEncoder);
        movieEncoder.export(movie);
        tagEncoder.writeTo(fout);

    }
View Full Code Here

        // some other object that can accept an OutputStream in its constructor. The point is
        // to eliminate the extra buffers, and just always write directly to the intended target.
        // - mikemo
        final boolean useCompression = configuration.getCompilerConfiguration().useCompression();
        TagEncoder encoder = configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();       
        new MovieEncoder(encoder).export(movie, useCompression);
        encoder.writeTo(out);
        generateSizeReport(configuration, movie, encoder);

        if (ThreadLocalToolkit.getBenchmark() != null)
        {
View Full Code Here

        // some other object that can accept an OutputStream in its constructor. The point is
        // to eliminate the extra buffers, and just always write directly to the intended target.
        // - mikemo
        final boolean useCompression = configuration.getCompilerConfiguration().useCompression();
        TagEncoder encoder = configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder();
        new MovieEncoder(encoder).export(movie, useCompression);
        encoder.writeTo(out);
        generateSizeReport(configuration, movie, encoder);

        if (ThreadLocalToolkit.getBenchmark() != null)
        {
View Full Code Here

        long time = System.currentTimeMillis();

        // encode the movie with the product info (compilation time)
        TagEncoder te = new TagEncoder();
        MovieEncoder me = new MovieEncoder(te);

        Movie movie = new Movie();
        movie.size = new Rect(100, 100);
        movie.frames = new ArrayList();
        movie.productInfo = new ProductInfo(time);
        me.export(movie);

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        te.writeTo(bos);

        // decode the movie and save the compilation time in the special handler
View Full Code Here

TOP

Related Classes of flash.swf.MovieEncoder

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.