• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

The MMAPI Player class.

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we create a Player (MMAPI), we MUST associate it with a media (be it streaming/media file etc eg.wav,mid etc files) ? We are not allowed to create an "independent"/"blank" player which is free from any media ?

From the Manager API, I can only see 3 createPlayer methods, all of which "force" us to create the player WITH a media file.


If we are can create a "blank" player instance, then we can tied it to different media at different times "dynamically" without instantiating new players. As far as I know, the object instantiation process might be a little CPU intensive.
Currently, if I just want to play a different file, I had to :
1) close it by calling close()
2) assign my player reference var to a new player by calling createPlayer again (at the same time this lets the old one elegible for garbage collection). This means instantiate.
3) call realise(), prefetch() again.
I think going through this whole process just to change media is a little "overkill". Don't you think so ?
Can't we have an intermediate state (like one of these existing intermediate states : UNREALIZED, REALIZED, PREFETCHED etc.) that allows us to switch media ? Kinda equivalent to changing CDs of a physical CD player.
We don't throw away a CD player when we wish to listen to another CD, do we ?
Thanks.
[ January 20, 2004: Message edited by: Timothy Toh ]
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you are using a factory method not a constructor to get the new player instances, right? That indicates that the implement is probably re-using the player object in a way it sees efficient.
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, I see you're talking about class Player. I've got a problem and you might be able to help me.
I've developed an application which plays audio and video via HTTP and RTP, and everything works except from RTP video, because when I call the method player.realize() it blocks forever (without explanation).
Could you please tell me why is that? What's happening? I've no idea.
Thanks a lot
 
Yes, my master! Here is the tiny ad you asked for:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic