Thread View: borland.public.cppbuilder.multimedia
1 messages
1 total messages
Started by rob conklin
Sat, 15 Mar 2003 18:55
Using DirectX9 with C++Builder
Author: rob conklin
Date: Sat, 15 Mar 2003 18:55
Date: Sat, 15 Mar 2003 18:55
26 lines
2866 bytes
2866 bytes
Hi!
I've got a DLL that encapsulates some routines for DirectShow (essentially, the routines needed to display videos). I've reworked the DLL to be accessable to a C++ Builder (v5) program. The Builder program is able to initialize (HRESULTs returned S_OK through call to DirectShow RenderFile), but when I call the IMediaControl->Run() method, the Form Window flashes briefly, and then the Run method immedeately returns. No video. (the DLL works fine in C#.NET, MFC, and VB 6.0) There seems to be something a little "different" about the way a Builder Form is implemented internally that makes it a no-go situation. Here is the code:
// calls to XLib are located in DLL and encapsulate
// DirectShow functionality
hr = XLibInit();
XLibSetMediaWindowHandle(Handle);
XLibSetMainWindowHandle(Handle);
hr = XLibPrepareMedia("D:\\MyMovie.avi");
XLibFixMediaPlacement();
// calls the Run() method of IMediaControl interface
hr = XLibShowFile(); // RETURNS after flashing screen,
// NO playback
Unfortunately, the DLL is currently configured such that the hr variable is not a real HRESULT, but simply a BOOL variable, so the result I get back from XLibShowFile is not very diagnostic, it returns TRUE.
In any case, I am hoping that this is just one of those little snags that somebody will recognize and be able to say, "oh, you dummy, you just need to do such and such to make your borland form act more like an MS style form, and then it will run..."
A long shot perhaps, but any help greatly appreciated. If you would consider emailing me directly, that would be very helpful, as this newgroup does not seem extremely active and it is hard for me to monitor it... (robconklin@worldnet.att.net)
TIA
RC
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads