LEADTOOLS Support
Multimedia
Multimedia SDK Questions
Re: setting AxltmmPlayCtrl.sourcestream property from C# byte[] array
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, October 5, 2009 3:35:25 PM(UTC)
Groups: Registered
Posts: 2
Hi,
I'm getting "COMException: LTMM Error: Unspecified error" when setting AxltmmPlayCtrl.sourcestream to a byte[] populated with a video (.wmv) read from Sql Server database. I tried converting the byte[] into MemoryStream but still no good.
MemoryStream ms = new MemoryStream(aBuffer);
ms.Flush();
try
{
axltmmPlayCtrl.sourcestream = ms;
axltmmPlayCtrl.SeekStart();
}
catch(Exception)
{
}
Could you please point me to .net support documentation for future queries.
Thanks!
#2
Posted
:
Tuesday, October 6, 2009 4:06:16 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
You will not be able to read the WMV data from memory, because our toolkit uses the Microsoft WMV reader, which doesn't allow reading from memory. You need to write the file to disk, and then you can play it back using our toolkit.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Tuesday, October 6, 2009 11:44:03 PM(UTC)
Groups: Registered
Posts: 2
Ok, I can flush the MemoryStream to disk as temp file and pass it to AxltmmPlayCtrl, but I need to know if the memorystream (or the newly written tmp file) contains Audio or Video and also their type (wmv, avi, mp3, etc) so that I can rename the temp file appropriately. More than the renaming part, I need to perform certain actions depening upon the type of file read from database.
Please also point me to .net support documentation for Lead Multimedia tools.
Thanks!
#4
Posted
:
Wednesday, October 7, 2009 12:46:37 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
After saving the file to disk, you can get detailed information about the source media file by using the ltmmMediaInfo Object.
For more information, please see the help topic "ltmmMediaInfo Object" in the LEADTOOLS Multimedia COM Help file.
Also, please read the help topic "Retrieving Media File Information Example for Visual Basic".
About the .Net support documentation for Lead Multimedia tools, you can check the VB6 code samples in the LEADTOOLS Multimedia COM Help file.
The VB6 code samples can be very helpful when programming in .Net, because the object model of our COM interfaces is similar when used in VB6 and .Net.
You can check the LEADTOOLS Multimedia COM help file online by using the following link:
http://www.leadtools.com/help/LEADTOOLS/v16/Multimedia/COM/
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
Multimedia
Multimedia SDK Questions
Re: setting AxltmmPlayCtrl.sourcestream property from C# byte[] array
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.