Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JMF Applet without client side installation

Reply
Thread Tools

JMF Applet without client side installation

 
 
amitatgroups@gmail.com
Guest
Posts: n/a
 
      07-26-2007
HI,

I need to create an Applets and applications that will transmitt and
recieve media using RTP
in [JMF]Java Compatible environment--including Web browsers--without
having to worry about client side JMF installation.Will it be possible
to deploy a java applet on a client browser without having the client
to install stuff?

Thanks...

 
Reply With Quote
 
 
 
 
amitatgroups@gmail.com
Guest
Posts: n/a
 
      07-27-2007
On Jul 26, 11:33 pm, (E-Mail Removed) wrote:
> HI,
>
> I need to create an Applets and applications that will transmitt and
> recieve media using RTP
> in [JMF]Java Compatible environment--including Web browsers--without
> having to worry about client side JMF installation.Will it be possible
> to deploy a java applet on a client browser without having the client
> to install stuff?
>
> Thanks...


My Applet will run on client machine and need to capture and play
audio and video using JMF.
My Applet also needs JMF classes so, i send jmf.jar file with my
applet.
My Applet is also signed.

I also try with some alternate on client machine where JMF is not
installed.
I keep perform.wav on client machine at location c:\perform.wav and
try to create Processor object using MediaLocator but it is also not
working.

MediaLocator ml = new MediaLocator("file://c:/perform.wav");

above line works but :->

processor = Manager.createProcessor(ml);

is not working.

so can any one clear that, for creating Processor object we also need
JMF installation at client machine even we send jmf.jar file with our
applet.

Note here I am not trying to Capture Client Device

 
Reply With Quote
 
 
 
 
amitatgroups@gmail.com
Guest
Posts: n/a
 
      07-27-2007
Find here with my code:->

import javax.media.*;
import javax.media.control.*;
import javax.media.datasink.*;
import javax.media.format.*;
import javax.media.protocol.*;
import javax.media.control.TrackControl;
import jmapps.util.StateHelper;

import java.io.*;
import java.util.*;

public class SoundApplet extends java.applet.Applet {

public void init() {
//doSpeak();
//doSpeakJMF();
doRTPWork();
}

private void doRTPWork() {

MediaLocator ml = null;

Processor processor = null;
StateHelper sh = null;

try{
ml = new MediaLocator("file://c:/perform.wav");
}catch(Exception ex){
System.out.println("*exceptoin* "+ex);
}
//http://groups.google.co.in/group/comp.lang.java.programmer/
browse_thread/thread/1fa2b20a25eadba0/965262ce1bdeb4bb?lnk=st&q=jmf
+applet+without+installation&rnum=1&hl=en#965262ce 1bdeb4bb
try{
System.out.println("a");
processor = Manager.createProcessor(ml);
System.out.println("b");
sh = new StateHelper(processor);
System.out.println("c");
}/*catch (IOException e) {
System.out.println("**22** io exception:-> "+e);
System.exit(-1);
}*/catch (NoProcessorException e) {
System.out.println("*33* no processor exception:-> "+e);
System.exit(-1);
}catch(Exception ex){
System.out.println("*44*:-> "+ex);
}

// Configure the processor
processor.configure();
while (processor.getState() != Processor.Configured){
System.out.println("state:-> "+processor.getState());
System.out.println("configured:-> "+Processor.Configured);
}

processor.realize();
while(processor.getState()!=Processor.Realized);

System.out.println("d");
if (!sh.configure(10000))
System.exit(-1);

System.out.println("e");

// Set the output content type and realize the processor
//processor.setContentDescriptor(new
FileTypeDescriptor(FileTypeDescriptor.WAVE));
//processor.setContentDescriptor(new
ContentDescriptor( ContentDescriptor.RAW));
processor.setContentDescriptor(new
ContentDescriptor( ContentDescriptor.RAW_RTP));
System.out.println("f");

/*if (!sh.realize(10000))
System.exit(-1);*/


// create a File protocol MediaLocator with the location of the
// file to which the data is to be written
MediaLocator dest = new MediaLocator("rtp://192.168.1.7:8080");
System.out.println("h");
// get the output datasource of the processor and exit
// if we fail
DataSource source = null;

try {

source = processor.getDataOutput();
System.out.println("i");
}catch (NotRealizedError e) {
System.out.println("*5* no realized error:-> "+e);
System.exit(-1);
}catch (Exception e) {
System.out.println("*6* exception creating datasource:->
"+e);
System.exit(-1);
}

// hand this datasource to manager for creating an RTP
// datasink our RTP datasink will multicast the audio
try{
DataSink d = Manager.createDataSink(source, dest);
System.out.println("j");
d.open();
System.out.println("k");
d.start();
System.out.println("l");
processor.start();
System.out.println("m");
}catch (Exception e) {
System.out.println("*7*:-> "+e);
System.exit(-1);
}
}
}



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-27-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
>HI,
>
>I need ..


I saw your post on the other group and was wondering
if I could be bothered taking yet another person through
the entire applets/JMF saga.

Now I know you are a multi-poster*, I won't waste my time.
Please refrain from multi-posting, in future.

* <http://www.physci.org/codes/javafaq.html#xpost>

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com

 
Reply With Quote
 
amitatgroups@gmail.com
Guest
Posts: n/a
 
      07-27-2007
On Jul 27, 2:28 pm, "Andrew Thompson" <u32984@uwe> wrote:
> (E-Mail Removed) wrote:
> >HI,

>
> >I need ..

>
> I saw your post on the other group and was wondering
> if I could be bothered taking yet another person through
> the entire applets/JMF saga.
>
> Now I know you are a multi-poster*, I won't waste my time.
> Please refrain from multi-posting, in future.
>
> * <http://www.physci.org/codes/javafaq.html#xpost>
>
> --
> Andrew Thompsonhttp://www.athompson.info/andrew/
>
> Message posted viahttp://www.javakb.com


yes i accept, i post multiple time but reason is that i need answer.
If got answer in single post then i will not it post next time

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-27-2007
(E-Mail Removed) wrote:
>> (E-Mail Removed) wrote:
>> >HI,

>[quoted text clipped - 14 lines]
>>
>> Message posted viahttp://www.javakb.com

>
>yes i accept, i post multiple time but reason is that i need answer.


Reason is of no concern to me. Your time
schedule is not my problem.

>If got answer in single post ...


If you need an urgent answer, see a help desk or consultant,
then offer them premium rates to consider your problem ahead
of others.

>...then i will not it post next time


Feel free not to post, *first* or subsequent times, if
that is your attitude to these discussion forums.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via http://www.javakb.com

 
Reply With Quote
 
amitatgroups@gmail.com
Guest
Posts: n/a
 
      07-27-2007
yes I got your point, I will remember next time.

can any one help

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      07-27-2007
(E-Mail Removed) wrote:
> On Jul 27, 2:28 pm, "Andrew Thompson" <u32984@uwe> wrote:
>> (E-Mail Removed) wrote:
>>> HI,
>>> I need ..

>> I saw your post on the other group and was wondering
>> if I could be bothered taking yet another person through
>> the entire applets/JMF saga.
>>
>> Now I know you are a multi-poster*, I won't waste my time.
>> Please refrain from multi-posting, in future.
>>
>> * <http://www.physci.org/codes/javafaq.html#xpost>
>>
>> --
>> Andrew Thompsonhttp://www.athompson.info/andrew/
>>
>> Message posted viahttp://www.javakb.com

>
> yes i accept, i post multiple time but reason is that i need answer.
> If got answer in single post then i will not it post next time


That would only make sense if you waited long enough for an answer to show up,
which you did not do. Also, multiposting is bad enough that you still
shouldn't do it; it divides the answers amongst several threads, reducing the
value of the answers and annoying the very people who have those answers.

If you really must reach more than one group, cross-post (address multiple
groups at the same time instead of in separate messages) with followup set to
just one group.

Don't reject the advice to follow the netiquette as you did in your reply.
For one thing, the excuse wasn't credible. You do, of course, have the
freedom to be as rude as you want. That would tend to reduce the willingness
of folks to help you, and thus the utility of the group to you.

If you really do "need answer" then it's better would be for you to get the
helpfulness of Andrew's advice and not make implausible excuses. You'll
actually /reduce/ the likelihood of getting answers and that of getting them
from the most knowledgeable people by multiposting. For example, Andrew is
one of the most knowledgeable people around here about applets. (Notice that
by telling you that he'd answered this question before that he gave you a
hint: you can search the newsgroup archives and possibly find the answer
already there for you.) By multiposting, you've pretty much lost that
valuable source of knowledge. By justifying it with that odd excuse, you have
pretty much damaged the chance of getting that source back.

So please, do not multipost. For your own benefit.

--
Lew
 
Reply With Quote
 
amitatgroups@gmail.com
Guest
Posts: n/a
 
      07-27-2007
Lew,
I accept my mistake and i also commit next time I'll not post multiple
time.

Once Again,
Sorry

Amit Jain

 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      07-27-2007
On Jul 27, 9:14 pm, (E-Mail Removed) wrote:
> ...I will remember next time.


Good. That's covered and over.

We can procceed to the technical matter.

1st - are you aware of Java Web Start (JWS)?

This is relevant to your technical point
in that JWS is a *much* better way to laucnh
some types of applications 'from a web page'.

It is not 'embedded' in a web page as you
originally requested, but I think it is a
much beter way to launch media based projects
(free floating, in their onw resizable windows).

Here is a 'simple' example of launching a
(JMF based) movie shown in a free floating
JWS window..
<http://www.javasaver.com/testjs/jmf/#test3>

Note that -
- this deployment could be made much smaller for
*your* project
- it could probably be 'sandboxed' as opposed to
asking the end user to accept code signed by
'some guy from usenet' (this is a huge advantage).

So, it comes down to "what do you (or your end user)
consider to be an 'install'"? The JWS launch is much
less 'Must REBOOT dialog' friendly, since it does not
ask the user to do any such thing, but it is still
(effectively) an installation. Is that acceptible
to your 'use case'?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running signed applet without creating policy file in client side abcd Software 0 02-17-2009 06:37 AM
How to execute client-side code _after_ client-side validation? Bogdan ASP .Net 2 06-09-2008 01:31 PM
API Jmf:Transcoding to different formats (Solution SUN jmf: "Transcode.java ) Misterysword@hotmail.com Java 0 08-13-2007 11:40 AM
Client side script after client side validation with asp.net 2.0 Boss302 ASP .Net 0 11-21-2006 08:43 AM
A bug of JMF(when JMF is playing video, InterruptedException occurs after the "refresh" button of IE is clicked)? taowang.gml@gmail.com Java 1 07-19-2006 11:21 PM



Advertisments