From: Jordan Bigel <[EMAIL PROTECTED]>
Subject: Re: sdk+jmf
Ok, I have one last idea.
>So how is the linking
>done between JMF and the Real Player? I thought "java
com.real.util.RJMFConfig"
>will register the Real Player with JMF.
You ask a very astute question. And the answer depends on which version of JMF
you are using. I suspect now that you are using the JMF "pure" Java version.
What this means is that they have avoided using native methods.
Now, the first area where JMF (non-pure) version uses native methods is to read
in the jmf.properties file. I cannot recall WHY they used native methods to
read in this file, some security issue, but they do.
The jmf.properties file contains the list of class package prefixes which the
JMF Manager will use to search for a class which can deal with the protocol and
content type of the URL provided.
The RJMFConfig class updates the jmf.properties file so it includes the
"com.real" package prefix.
Now, the JMF "pure" versions do away with the jmf.properties file. It
*simulates* the existence of this files properties in memory structures. In
this case, when you execute RJMFConfig the class is told com.real does not
exist. It adds it. What really happened is it was added to the mem structures
which contain the prefix list. Of course, when this app exits your prefix is no
longer registered.
So (finally) when using the "pure" version(s) of JMF, you must register the
package prefix at the start of your app, each time your app loads. This is
actually a better system then using the jmf.properties file and the native
methods (at least I like it better). It is more analgous to how JDBC driver
registration works.
Anyway, make this call at the top of your app/applet:
com.real.util.RJMFConfig.registerPackage("com.real");
Now, if you are NOT using the "pure" jmf version, I am really stumped. Let me
know.
Jordan.
At 09:46 AM 8/13/99 -0700, RealForum wrote:
>From: Kevin Liu <[EMAIL PROTECTED]>
>Subject: Re: sdk+jmf
>
>Hi Jordan,
>I have tried JDK 1.1.8 and JMF 1.x but still can't pass the
> "NoPlayerFoundException". As with JDK 1.2.2, I can run JMF supported
>media types such as http, file but can not pass any Real Systems
>media types such as pnm and rtsp as url parameters. So how is the linking
>done between JMF and the Real Player? I thought "java
com.real.util.RJMFConfig"
>will register the Real Player with JMF. When I call the method
>"Manager.CreatePlayer", it identifies the media type and loads its player.
>The configuration seems OK, as "Java com.real.util.RJMFConfig"
>did not generate any exceptions.
>-- Kevin