Class DirectRenderMediaPlayerPanel

    • Field Detail

      • m_VideoWidth

        protected int m_VideoWidth
        The width of the video
      • m_VideoHeight

        protected int m_VideoHeight
        The height of the video
      • m_MediaComponent

        protected uk.co.caprica.vlcj.component.DirectMediaPlayerComponent m_MediaComponent
        Media component for playing the video
      • m_Image

        protected BufferedImage m_Image
        an image to fill with the video frame
      • m_BufferFormatCallback

        protected uk.co.caprica.vlcj.player.direct.BufferFormatCallback m_BufferFormatCallback
    • Constructor Detail

      • DirectRenderMediaPlayerPanel

        public DirectRenderMediaPlayerPanel()
    • Method Detail

      • initGUI

        protected void initGUI()
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • initialize

        protected void initialize()
        Overrides:
        initialize in class adams.gui.core.BasePanel
      • finishInit

        protected void finishInit()
        Overrides:
        finishInit in class adams.gui.core.BasePanel
      • open

        public void open​(String fileName)
        opens a file for playing
        Parameters:
        fileName - the file to be played
      • setRate

        public void setRate​(float rate)
        Sets the playback rate
        Parameters:
        rate - the rate play back at
      • setPosition

        public void setPosition​(float v)
        Sets the position in the video
        Parameters:
        v - the position to go to
      • getRate

        public float getRate()
        A getter for the playback rate
        Returns:
        the current playback rate
      • isMute

        public boolean isMute()
        checks to see if the player is muted
        Returns:
        true if the player is muted, false otherwise
      • getPosition

        public float getPosition()
        a getter for the current position in the video playback
        Returns:
        the current position
      • getTime

        public long getTime()
        Returns the current playback time
        Returns:
        the current playback time
      • getLength

        public long getLength()
        Gets the length of the media
        Returns:
        the length
      • addMediaPlayerEventListener

        public void addMediaPlayerEventListener​(uk.co.caprica.vlcj.player.MediaPlayerEventListener mediaPlayerEventListener)
        adds a media player event listener to our media player
        Parameters:
        mediaPlayerEventListener - the listener to add
      • pause

        public void pause()
        Pauses the video playback
      • play

        public void play()
        Plays the current media
      • stop

        public void stop()
        Stops playback
      • mute

        public void mute()
        mutes the player
      • unmute

        public void unmute()
        unmutes the player
      • prepareMedia

        public void prepareMedia​(String absolutePath)
        Pre prepares a media file for playing
        Parameters:
        absolutePath - the file name and path to prepare
      • release

        public void release()
        releases the media player to clean up memory usage
      • isPlaying

        public boolean isPlaying()
        A getter for the playing state of the player
        Returns:
        true if the media is playing