Link to home
Start Free TrialLog in
Avatar of sneeuw
sneeuwFlag for Belgium

asked on

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 ! >
Avatar of inter
inter
Flag of Türkiye image

what do you want to play? avi, wav?
Avatar of brainware
brainware

Listening..
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.
Avatar of sneeuw

ASKER

I was thinking of playing mpg streams from memory !!!!
No components around that allow that ?
Not possible ... I think !!!

Why would you want to do this any way ?
Avatar of sneeuw

ASKER

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 !
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.
Avatar of sneeuw

ASKER

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 ??
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
ASKER CERTIFIED SOLUTION
Avatar of cyber13
cyber13

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial