LEADTOOLS Support
General
General Questions
LTMM Error: The operation could not be performed because the filter is in the wrong state.
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, October 19, 2007 5:01:01 AM(UTC)
Groups: Registered
Posts: 4
I have an issue while adding my WAV file the AVI file I have generated with the LeadTools Multimedia package. The code works fine on my development machine where I have LeadTools installed, but when I move the release to it's environment I get "LTMM Error: The operation could not be performed because the filter is in the wrong state." I'm not sure if there is something in addition to the redistributables that I'm supposed to move to the final environment or not? Below is a sample of the code where the error is happening on the StartConvert() line.
_ltmmMulti.StreamCount = 2;
ltmmMediaType mtAVI = new ltmmMediaType();
// set the type to 24-bit RGB video
mtAVI.Type = ltmmMEDIATYPE_Video;
mtAVI.SubType = ltmmMEDIASUBTYPE_RGB24;
mtAVI.formattype = ltmmFORMAT_VideoInfo;
ltmmMediaType mtAud = new ltmmMediaType();
// set the type to PCM audio
mtAud.Type = ltmmMEDIATYPE_Audio;
mtAud.SubType = ltmmMEDIASUBTYPE_PCM;
mtAud.formattype = ltmmFORMAT_WaveFormatEx;
PrepareSampleAndTarget(
ref _ltmmConvertAVI, aviPath, mtAVI.Type, ref _ltmmSampleTargetAVI, ref _ltmmMulti, 0);
PrepareSampleAndTarget(
ref _ltmmConvertAudio, audioPath, mtAud.Type, ref _ltmmSampleTargetAudio, ref _ltmmMulti, 1);
Console.WriteLine("PrepareSampleAndTarget calls made");
_ltmmConvertDest.SourceObject = _ltmmMulti;
_ltmmConvertDest.TargetFormat = (
int)ltmmConvert_TargetFormat.ltmmConvert_TargetFormat_OGG;
_ltmmConvertDest.InterleaveMode = (
int)ltmmConvert_InterleavingMode.ltmmConvert_Interleave_None;
string final = aviPath.Replace(".avi", "-Final.avi");
_ltmmConvertDest.TargetFile = final;
Console.WriteLine("StartConvert called");
_ltmmConvertDest.StartConvert();
Console.WriteLine("Before CopySamples");
CopySamples(
ref _ltmmConvertAVI, ref _ltmmSampleTargetAVI, ref _ltmmMulti, 0);
CopySamples(
ref _ltmmConvertAudio, ref _ltmmSampleTargetAudio, ref _ltmmMulti, 1);
Console.WriteLine("CopySamples calls made");
if (_ltmmConvertDest.State == (int)ltmmConvert_State.ltmmConvert_State_Running)
_ltmmConvertDest.StopConvert();
_ltmmConvertDest.ResetSource();
#2
Posted
:
Friday, October 19, 2007 7:01:15 AM(UTC)
Groups: Registered
Posts: 4
I should mention that the environment I'm building on is Windows XP. I have a simple GUI program that implements the code that I normally have running in a Windows Service. It all works great. When the code is running as a service on Windows Server 2003 that is when I'm getting this error.
#3
Posted
:
Monday, October 22, 2007 7:13:28 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
If the GUI application works on
Windows 2003 Server, but the exact same code fails when you put it in a service,
and the same service works on Windows XP, this could mean the operating system
(Server 2003) causes the problem, for example due to permissions issues.
Is this the case, or where exactly does the code work
and where does it fail?
LEADTOOLS Support
General
General Questions
LTMM Error: The operation could not be performed because the filter is in the wrong state.
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.