[Open-discuss] playing data using storeData() method.
"Amvya Patel" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.general |
|---|---|
| Message-ID | <[email protected]> |
---------- Forwarded message ---------- From: Amvya Patel <[email protected]> Date: May 25, 2006 2:07 PM Subject: Re: playing data using storeData() method. To: Christina Dunn <[email protected]> Cc: [email protected], [email protected], [email protected]. On 5/4/06, Christina Dunn <[email protected]> wrote: > At 05:29 AM 5/3/2006, Amvya Patel wrote: > >On 5/3/06, Christina Dunn <[email protected]> wrote: > >>At 02:40 AM 5/1/2006, Amvya Patel wrote: > >> >Hi, > >> > > >> >I have a question. In splay, we used to give the URL which we wanted to > >> play. > >> >If the media file is inside a JAR file, I have to create an input > >> >stream and pass the stream and MIME type. > >> >Now, I have a Emulator where once I create a player with input stream, > >> >the actual file data comes to win32 native layer function. I am trying > >> >to integrate this emulator with Helix(JSR135 adaption code). > >> > > >> >Is there any way, I can pass this data to the Helix method (in stead > >> >of the URL) along with mimetype? That is, is there any way using which > >> >I can pass the data to Helix(JSR135 project code) in place of URL?? > >> > >>Yes, you can use the JSR135 Java interface "createPlayer( InputStream is, > >>String mimeType )", > >>or use the _DataSourceAdapter C++ interface, where you provide data to the > >>engine via a ring buffer. > >In my emulator, once I say createPlayer, the call comes to the win32 > >implementation so I can't use the "createPlayer( InputStream is, > >String mimeType )" Java method. If I use > >_DataSourceAdapter.stroredata(), how do I call createplayer? Sorry to > >disturb you, but could you pls elaborate on that?? > > I'm not sure what you mean by "comes to the win32 implementation". Are you > using > the Java JSR135 interface, or the C++ version? > > If you want to use the C++ interface, without the Java layer for > InputStream type input, > you will need to implement _DataSourceAdapter just as it is done on the > Java side, > create the _DataSourceAdapter, and pass it into 'createPlayer'. > > from Manager.java, converted to C++ : > > > // Create the C++ DataSource and Player objects > _DataSourceAdapter ds = new _DataSourceAdapter(NULL, mimeType, > _DataSourceAdapter::NOT_SEEKABLE); > _Player p = _Manager.createPlayer(ds); > > // Add data, look at > javax/microedition/media/DataSourceHelper.java for an example on how to add > data > ds.storeData(buf_read_from_source, bufsize); > > --christina > yes, I did _DataSourceAdapter ds = new _DataSourceAdapter(NULL, mimeType, _DataSourceAdapter::NOT_SEEKABLE); _Player p = _Manager.createPlayer(ds); in createplayer() and when I had the actual file data in realize(), I called _DataSourceAdapter.storeData(buf_read_from_source, bufsize); Then _Player.start() works fine. In the above case I have a small file, the entire file is read at once and that data is given to ds.storeData(), it works. If I have a large file, I get the file data in packets. For each packet recieved, I tried calling _DataSourceAdapter.storeData(buf_read_from_source, bufsize); But it plays only the first packet. THe packet No.2 onwards, it does not play. The packet size can be configured but the max limit is appx 300K per packet. Is there any way I can handle packet data instead of complete file data? Simulataneous reception of individual packets and playback of the same would be possble?? Amvya > > > >Amvya > > > >>--christina > >> > >> > >> >How do I go about this entire thing?? > >> > > >> >Regards, > >> >Amvya Patel > > > _______________________________________________ Open-discuss mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/open-discuss