Examples of VideoSurfaceAdapter


Examples of uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurfaceAdapter

        nsviewCanvas.setBackground(Color.black);

        xwindowCanvas = new Canvas();
        xwindowCanvas.setBackground(Color.black);

        aglVideoSurface = new CanvasVideoSurface(aglCanvas, new VideoSurfaceAdapter() {
            @Override
            public void attach(LibVlc libvlc, MediaPlayer mediaPlayer, long componentId) {
                dump("AGL", aglCanvas);
                libvlc.libvlc_media_player_set_agl(aglMediaPlayer.mediaPlayerInstance(), RuntimeUtil.safeLongToInt(componentId));
            }
        });

        nsobjectVideoSurface = new CanvasVideoSurface(nsobjectCanvas, new VideoSurfaceAdapter() {
            @Override
            public void attach(LibVlc libvlc, MediaPlayer mediaPlayer, long componentId) {
                dump("NSObject", nsobjectCanvas);
                libvlc.libvlc_media_player_set_nsobject(nsobjectMediaPlayer.mediaPlayerInstance(), componentId);
            }
        });

        nsviewVideoSurface = new CanvasVideoSurface(nsviewCanvas, new VideoSurfaceAdapter() {
            @Override
            public void attach(LibVlc libvlc, MediaPlayer mediaPlayer, long componentId) {
                dump("NSView", nsviewCanvas);
                // TODO shouldn't this component pointer be on the attach template method?
                // (that may be moot since it returns the same value anyway)
                try {
                    long viewPtr = getViewPointer(nsviewCanvas);
                    libvlc.libvlc_media_player_set_nsobject(nsobjectMediaPlayer.mediaPlayerInstance(), viewPtr);
                }
                catch(Throwable t) {
                    System.out.println("Failed to set nsobject view");
                }
            }
        });

        xwindowVideoSurface = new CanvasVideoSurface(xwindowCanvas, new VideoSurfaceAdapter() {
            @Override
            public void attach(LibVlc libvlc, MediaPlayer mediaPlayer, long componentId) {
                dump("XWindow", xwindowCanvas);
                libvlc.libvlc_media_player_set_xwindow(xwindowMediaPlayer.mediaPlayerInstance(), RuntimeUtil.safeLongToInt(componentId));
            }
View Full Code Here

Examples of uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurfaceAdapter

     * @param canvas canvas
     * @return video surface
     */
    public CanvasVideoSurface newVideoSurface(Canvas canvas) {
        Logger.debug("newVideoSurface(canvas={})", canvas);
        VideoSurfaceAdapter videoSurfaceAdapter;
        if(RuntimeUtil.isNix()) {
            videoSurfaceAdapter = new LinuxVideoSurfaceAdapter();
        }
        else if(RuntimeUtil.isWindows()) {
            videoSurfaceAdapter = new WindowsVideoSurfaceAdapter();
View Full Code Here

Examples of uk.co.caprica.vlcj.player.embedded.videosurface.VideoSurfaceAdapter

     * @param componentId native component id
     * @return video surface
     */
    public ComponentIdVideoSurface newVideoSurface(long componentId) {
        Logger.debug("newVideoSurface(componentId={})", componentId);
        VideoSurfaceAdapter videoSurfaceAdapter;
        if(RuntimeUtil.isNix()) {
            videoSurfaceAdapter = new LinuxVideoSurfaceAdapter();
        }
        else if(RuntimeUtil.isWindows()) {
            videoSurfaceAdapter = new WindowsVideoSurfaceAdapter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.