BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Struggling with WriterAdvanced2.SetInputSetting

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
John
Guest





PostPosted: Sun Oct 30, 2005 10:25 am    Post subject: Struggling with WriterAdvanced2.SetInputSetting Reply with quote



Hi,

I'm struggling with the conversion of WriterAdvanced2.SetInputSetting to
Delphi. I'm using DSPack and the closest I can get is the following:

try
CheckDSError(AsfWriter.WriterAdvanced2.SetInputSetting(
0, g_wszDeinterlaceMode, WMT_TYPE_DWORD,
PByte(WM_DM_DEINTERLACE_NORMAL), SizeOf(PByte)+1));
except
on E:Exception do
begin
ShowMessage( 'Unable to set de-interlace mode - ' + E.Message );
Exit;
end;
end;

CheckDSError raises the exception: One or more arguments are invalid
($80070057).

Without the +1 in the SizeOf(PByte) argument, I get a more general Access
violation error:

"Access violation at address 088877C7 in module WMVCORE.DLL. read of address
00000001"

I've managed to stumble over other hurdles/challenges in the project
(stopping the asfwriter writing a file, setting my own profiles and adding
Stream HeaderInfo) but this one's got me stumped.

I've tried various variable types, tried changing the last argument to
different "SizeOfs" and tried moving the code to before, during and after
the FilterGraph is built without any success.

Any help on this one would be appreciated please. I have asked in the dspack
forum but nothing was forthcoming.

Thanks,
John.









Back to top
Jonathan Benedicto
Guest





PostPosted: Thu Nov 03, 2005 9:45 pm    Post subject: Re: Struggling with WriterAdvanced2.SetInputSetting Reply with quote




John wrote:
Quote:
I'm struggling with the conversion of
WriterAdvanced2.SetInputSetting to Delphi. I'm using DSPack
and the closest I can get is the following:

Maybe try this? { Untested }

var
Value: Longword;

Value := WM_DM_DEINTERLACE_NORMAL;

CheckDSError(AsfWriter.WriterAdvanced2.SetInputSetting( 0, g_wszDeinterlaceMode, WMT_TYPE_DWORD, @Value,
SizeOf(Longword) ) );

Sorry for any syntax errors, I'm still learning Delphi, but have had experience with ASF's in C++.

HTH

Jonathan

Back to top
John
Guest





PostPosted: Mon Nov 07, 2005 8:31 am    Post subject: Re: Struggling with WriterAdvanced2.SetInputSetting Reply with quote




"Jonathan Benedicto" wrote:

Quote:
Maybe try this? { Untested }

var
Value: Longword;

Value := WM_DM_DEINTERLACE_NORMAL;

CheckDSError(AsfWriter.WriterAdvanced2.SetInputSetting( 0,
g_wszDeinterlaceMode, WMT_TYPE_DWORD, @Value,
SizeOf(Longword) ) );

Brilliant! Thank you.

--
John.






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.