 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John Guest
|
Posted: Sun Oct 30, 2005 10:25 am Post subject: Struggling with WriterAdvanced2.SetInputSetting |
|
|
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
|
Posted: Thu Nov 03, 2005 9:45 pm Post subject: Re: Struggling with WriterAdvanced2.SetInputSetting |
|
|
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
|
Posted: Mon Nov 07, 2005 8:31 am Post subject: Re: Struggling with WriterAdvanced2.SetInputSetting |
|
|
"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 |
|
 |
|
|
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
|
|