Class PlayerFactory


  • public final class PlayerFactory
    extends java.lang.Object
    Author:
    Group 3
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected uk.co.caprica.vlcj.factory.MediaPlayerFactory factory
      Player Factory.
      protected java.util.Map<java.lang.Integer,​Player> playerMap
      Created Players.
    • Constructor Summary

      Constructors 
      Constructor Description
      PlayerFactory()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void free​(Player pl)
      Free a player object's native resources.
      void freeAll()
      Close all players and free resources.
      Player newPlayer()
      Make a new player.
      Player newPlayer​(java.lang.Double width, java.lang.Double height)
      Get a new player.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • playerMap

        protected java.util.Map<java.lang.Integer,​Player> playerMap
        Created Players.
      • factory

        protected uk.co.caprica.vlcj.factory.MediaPlayerFactory factory
        Player Factory.
    • Constructor Detail

      • PlayerFactory

        public PlayerFactory()
        Constructor.
    • Method Detail

      • newPlayer

        public Player newPlayer()
        Make a new player.
        Returns:
        Player.
      • newPlayer

        public Player newPlayer​(java.lang.Double width,
                                java.lang.Double height)
        Get a new player.
        Parameters:
        width - Player target width.
        height - Player target height.
        Returns:
        player.
      • freeAll

        public void freeAll()
        Close all players and free resources.
      • free

        public void free​(Player pl)
                  throws java.lang.IllegalStateException
        Free a player object's native resources.
        Parameters:
        pl - player to free.
        Throws:
        java.lang.IllegalStateException - Couldn't find player in my map.