[Helix-client-dev] Re: Mimetype for rm video file

[Helix-client-dev] Re: Mimetype for rm video file

Christina Dunn cdunn at real.com
Tue Aug 8 12:17:35 PDT 2006


At 04:39 PM 8/7/2006, Stanley Kao wrote:

>Christina,
>
>So the file i am trying to test is videotest.rm that comes with real 
>player.   I have used both video/x-pn-realvideo and audio/x-pn-realaudio 
>as mimetype and both doesnt work.  With DataSource if the byte array 
>contains two streams, it will find the correct stream based on the 
>mimetype?   Or will it get confused.
>
>Right now i am just reading the whole file which contains 2 streams and 
>giving that to DataSource.   Do I need to manually separate the two streams?

No, just create two players, one that plays audio, one that plays video. 
Or, it might be easier for your implementation to enhance the example 
DataSource, 'MyDataSource', to have two SourceStreams. Below is an example 
of how I played audio/video of the videotest.rm using InputStream.

new MyPlayer().playInputStream2("e:\\src\\music\\videotest.rm", 
"video/x-pn-realvideo", "audio/x-pn-realaudio");
...
     public void playInputStream2(String url, String mimeTypeVideo, String 
mimeTypeAudio) {
         try {
             InputStream is1 = new java.io.FileInputStream(url);
             InputStream is2 = new java.io.FileInputStream(url);
             Player p1 = Manager.createPlayer(is1, mimeTypeVideo);
             Player p2 = Manager.createPlayer(is2, mimeTypeAudio);

             p1.realize();

             VideoControl video = 
(VideoControl)p1.getControl("VideoControl");   // Get the video control 
from the first player
                 setupVideo(video); // Setup the java window

             p1.start();
             p2.start();

             System.out.println("Playing for 20s...");
             Thread.currentThread().sleep(20000);

             p1.close();
             p2.close();

          } catch (MediaException pe) {
          } catch (IOException ioe) {
          } catch (InterruptedException ie) {
          }
     }

--christina


>-stan
>
>From: Christina Dunn <cdunn at real.com>
>To: "Stanley Kao" <aircow33 at hotmail.com>, 
>Helix-client-dev at helixcommunity.org, player-dev at helixcommunity.org
>Subject: Re: Mimetype for rm video file
>Date: Mon, 07 Aug 2006 16:25:51 -0700
>
>Stan,
>
>DataSource only supports one stream, currently. You could try to create 
>two players, one with the audio stream, one with the video stream. This 
>hasn't been tested, but I don't see why it wouldn't work.
>
>--christina
>
>At 04:06 PM 8/7/2006, Stanley Kao wrote:
>
>So when i play the rm file in splay it shows that it actually has two 
>streams.  first one is  "audio/x-pn-realaudio", then the second one is 
>"video/x-pn-realvideo".  What to do in this case?
>-stan
>
>
>
>From:  Christina Dunn <cdunn at real.com>
>To:  aircow33 at hotmail.com, Helix-client-dev at helixcommunity.org, 
>player-dev at helixcommunity.org
>Subject:  Re: Mimetype for rm video file
>Date:  Mon, 07 Aug 2006 15:37:22 -0700
> >Hi Stan,
> >
> >I usually run the clip in RealPlayer or splay and view the clip
> >properties to find the correct mime type.
> >For RealVideo the mime type is most likely "video/x-pn-realvideo",
> >but you should double check with
> >RealPlayer or splay.
> >
> >--christina
> >
> >At 03:02 PM 8/7/2006, stankao wrote:
> >>Hi Chrstina,
> >>
> >>I am wondering for jsr135 kit for datasourceadapter what should be
> >>passed in
> >>for mimetype for rm video file.   I tried "realVideo"  but it
> >>doesn't seem
> >>to work.  I can play the video file if I use the url and not from
> >>the
> >>inputstream.   Any suggestions?
> >>
> >>-stan
> >
> >
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.helixcommunity.org/pipermail/helix-client-dev/attachments/20060808/9e2f4156/attachment.html


More information about the Helix-client-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.