Package uk.co.caprica.vlcj.player.condition.conditions

Examples of uk.co.caprica.vlcj.player.condition.conditions.ParsedCondition


        // There is a small overhead of actually having to start the media - but
        // to mitigate this the media player factory configuration has disabled
        // audio and video outputs so there will be no visible/audible sign of
        // the media playing

        Condition<Integer> parsedCondition = new ParsedCondition(mediaPlayer) {
            @Override
            protected boolean onBefore() {
                // Some media, such as mpg, must be played before all meta data (e.g. duration) is available
                mediaPlayer.startMedia(mrl); // "start" waits until the media is playing before returning
                mediaPlayer.requestParseMedia(); // asynchronous invocation
                return true;
            }

            @Override
            protected void onAfter(Integer result) {
                mediaPlayer.stop();
            }
        };
        parsedCondition.await();

        // This is functionally equivalent to the simpler synchronous version:
        /*
        mediaPlayer.startMedia(mrl);  // "start" waits until the media is playing before returning
        mediaPlayer.parseMedia(); // synchronous invocation
View Full Code Here

TOP

Related Classes of uk.co.caprica.vlcj.player.condition.conditions.ParsedCondition

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.