How to use TMediaPlayer for playing mpg in memory rather then via filename

Hi,

I use Borland C++ Builder 4.

I want to play a MediaFile with NO filename.
E.g.  Now, the component runs when a Filename is delivered via a String object.

I'd like (if possible) to play from memory ???
Is that possible ??
If yes ... How ???

< More points can be earned since I already have 200 points 'for grabs' in the C++ group ! >
sneeuwAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
cyber13Connect With a Mentor Commented:
Can't be done cause the TMediaPlayer used MCI commands and all.
NOT TMemorySTream.
(E.g. see Alex' answer on same question in C++ group)
0
 
interCommented:
what do you want to play? avi, wav?
0
 
brainwareCommented:
Listening..
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Stuart_JohnsonCommented:
I dont think it is possible to do this.  MediaPlayer doesn't support memory streams.

If you are using AVIs, then there are plenty of components around which will allow you to use memory streams.

Stu.
0
 
sneeuwAuthor Commented:
I was thinking of playing mpg streams from memory !!!!
No components around that allow that ?
0
 
RLancasterCommented:
Not possible ... I think !!!

Why would you want to do this any way ?
0
 
sneeuwAuthor Commented:
Well ...

I am creating a little program that interprets the file system of CD-i (amongst other things, e.g. not finalised CDs, first session ...).

It would be nice if I could play the mpg of CD-i movies without having to copy the mpg to HD first.
I realise there are possibilities such as creating a Windows driver (so that Windows does it for you), but that is not my intention.

So, that's why.
It would be nice to have this as an extra options in my program with as little effort as possible (that's why I was thinking of using the TMediaPlayer Component).

But ...
If not possible ...
I'll leave it out !
0
 
Stuart_JohnsonCommented:
No.  It is totally impossible using the TMediaPlayer component.  It does not support memory streaming at all, regardless of file type.

However, if you already have access to the file on the CD, why can't you just play it straight off the CD?  I don't get why you have to copy it too the hard drive first?  Maybe I have over looked something here, I don't know, but I am not really following what you want to do.

Stu.
0
 
sneeuwAuthor Commented:
I cannot play directly from CD because Windows does not see the files (as I mentioned before).  I do it (or rather my app interprets the file structure on the CD), but because I am not writing a driver, I cannot tell Windows what is located where.


And what if I inherit from the TMediaPlayer component ??
Can I acces the source code for that component in Builder 4 (Enterprise edition) and how ??
Maybe files are handled via the TFileStream component ... ???
What if I create something with a TMemoryStream component instead ??

Any thoughts on this ??
0
 
Stuart_JohnsonCommented:
Sorry my friend, but this is beyond my experiences.  You could inherit the TMediaPlayer and give it memory streaming support I guess.  How, I honestly do not know.

Cheers,

Stu
0
All Courses

From novice to tech pro — start learning today.