Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, October 19, 2007 5:06:01 AM(UTC)
EricLearn

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();

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, October 19, 2007 7:06:15 AM(UTC)
EricLearn

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:18:28 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 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?
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.256 seconds.