javauis/mmapi_qt/baseline/javasrc.emc/com/nokia/microedition/media/ManagerImpl.java
changeset 48 e0d6e9bd3ca7
parent 35 85266cc22c7f
child 56 abc41079b313
equal deleted inserted replaced
47:f40128debb5d 48:e0d6e9bd3ca7
   466         {
   466         {
   467             throw new IllegalArgumentException("Locator is null.");
   467             throw new IllegalArgumentException("Locator is null.");
   468         }
   468         }
   469         InternalPlayer player =null;
   469         InternalPlayer player =null;
   470         /// Implementation done for java ui 3.x req
   470         /// Implementation done for java ui 3.x req
   471         // in case of AnimationPlayer, we won't be using the ProtocolFactory class.
   471         // in case of AnimationPlayer file protocol, we won't be using the ProtocolFactory class.
   472         //
   472         // We need to do this kind of work out, only if it is file protocol 
   473         Enumeration plugins = iPlugIns.elements();
   473 		if (new Locator(aLocator).getProtocol().equals("file")) {
   474         AnimationPlayerFactory apf=null;
   474 			Enumeration plugins = iPlugIns.elements();
   475         while (plugins.hasMoreElements() && (player == null))
   475 			AnimationPlayerFactory apf = null;
   476         {
   476 			while (plugins.hasMoreElements() && (player == null)) {
   477             PlugIn temp = (PlugIn) plugins.nextElement();
   477 				PlugIn temp = (PlugIn) plugins.nextElement();
   478             if (temp instanceof AnimationPlayerFactory)
   478 				if (temp instanceof AnimationPlayerFactory) {
   479             {
   479 					apf = (AnimationPlayerFactory) temp;
   480                 apf = (AnimationPlayerFactory) temp;
   480 					break;
   481                 break;
   481 				}
   482             }
   482 			}
   483         }
   483 			if (apf != null) {
   484         if (apf!=null)
   484 				player = apf.createPlayer(aLocator);
   485         {
   485 			}
   486             player=apf.createPlayer(aLocator);
   486 		}
   487         }
       
   488         ////////////////////////////////////////////////////////
   487         ////////////////////////////////////////////////////////
   489         // if player is still null, try to create the native player
   488         // if player is still null, try to create the native player
       
   489 		System.out.println("ManagerImpl::createPlayer(String locator )locator is "+aLocator );
   490         if (player==null)
   490         if (player==null)
   491             player =iProtocolFactory.createPlayer(
   491             player =iProtocolFactory.createPlayer(
   492                         new Locator(aLocator));
   492                         new Locator(aLocator));
   493         if (player == null)
   493         if (player == null)
   494         {
   494         {