Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Canvas performance

john16384Sep 2 2012 — edited Sep 6 2012
I've been testing Canvas performance on a very fast machine (quad core Xeon) with a one of the latest NVidia graphics boards, but I'm unable to render full screen 1920x1080 video with this setup using the Canvas.

Is this simply too much to hope for or am I missing some obvious performance improvements?

Here's the code I used:
import java.nio.ByteBuffer;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.image.PixelFormat;
import javafx.scene.image.PixelWriter;
import javafx.scene.image.WritablePixelFormat;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import uk.co.caprica.vlcj.component.DirectMediaPlayerComponent;

import com.sun.jna.Memory;
import com.sun.jna.NativeLibrary;

public class VLCDirectTest extends Application {

  public static void main(final String[] args) {
    Application.launch(args);
  }

  private DirectMediaPlayerComponent mp;

  @Override
  public void start(Stage primaryStage) throws Exception {
    NativeLibrary.addSearchPath("libvlc", "c:/program files (x86)/videolan/vlc");

    BorderPane borderPane = new BorderPane();
    final Canvas canvas = new Canvas(1920, 1080);
    borderPane.setCenter(canvas);
    System.out.println(">>> " + canvas.getGraphicsContext2D().getPixelWriter().getPixelFormat());
    Scene scene = new Scene(borderPane);
    final PixelWriter pixelWriter = canvas.getGraphicsContext2D().getPixelWriter();
    final WritablePixelFormat<ByteBuffer> byteBgraInstance = PixelFormat.getByteBgraInstance();

    mp = new DirectMediaPlayerComponent("RV32", 1920, 1080, 1920*4) {
      @Override
      public void display(Memory nativeBuffer) {
        ByteBuffer byteBuffer = nativeBuffer.getByteBuffer(0, nativeBuffer.size());
        pixelWriter.setPixels(0, 0, 1920, 1080, byteBgraInstance, byteBuffer, 1920*4);
      }
    };

    mp.getMediaPlayer().playMedia("L:\\test-movies\\2012.mkv");

    primaryStage.setScene(scene);
    primaryStage.show();
  }
}
It works, but it hickups and distorts a lot when it hickups. Lowering the resolution to say 1600x900 makes it almost smooth. Lowering it further gets the expected 24 frames per second.
This post has been answered by 935214 on Sep 2 2012
Jump to Answer

Comments

Vlad Visan-Oracle
Answer

TLS 1.2 works in 12c by default.

For 11gR2, you can only use it in 11.2.0.4 with MES Bundle Patch ( see MOS Note 2026419.1 ).

You cannot use TLS1.1 or 1.2 in previous versions ( 11.2.0.3 or any version behind )

Marked as Answer by user12840908 · Sep 27 2020
user12840908

Thanks Viad Visan! it's very helpful. If you could also please provide a link for 11.2.0.3 or previous version from Oracle.

Vlad Visan-Oracle

11.2.0.4 is the only 11gR2 version that got TLSv1.2 and 1.1 backported from 12c.

In 11.2.0.3 or previous versions, only TLSv1.0 can be used.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 4 2012
Added on Sep 2 2012
9 comments
17,318 views