SendScript command gives unpredictable timings in the archived fil
- From: KÅDER <KÅDER@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 May 2005 09:19:16 -0700
When archiving only (or both archiving and broadcasting), I have problem
sending two script commands with a predefined delay in between. I want to
send these script commands with a delay of 100 ms ideally, but I have had to
experiment a closest value of 200 ms (I'll get back to why, later in the
text).
The code that works for 2 x CPU ( at 2.8GHz, 1GB RAM) encoder, encoding a
Video and audio source (Shown below).
Now when I encode using only an audio source, the timings get weird.
Sometimes the both commands ends up at the same encoding time in the output
file, sometimes with a time delay of 500 ms.
At another machine with just one CPU (3.4 GHz HT) the timings allways get
weird, not only for strict audio encoding.
When trying to send to the encoder with just 100 ms delay between the
commands in MySendScript, the entries ends up with same time more often than
not in the resulting archived file, when encoding a video and audio source.
The load of the CPU:s is never above 20%.
Example code:
// Scripting method
private void MySendScript()
{
myEncoder.SendScript(0, "TEXT", strTEXTScript); //myEncoder is a class
member
System.Threading.Thread.Sleep( 200 );
myEncoder.SendScript(0, "URL", strURLScript);
}
// Method calling MySencScript
public void MyPooledProcess(some args...)
{
...
MyProcess();
...
}
public void ThreadedCommandLoop
{
Init();
while (true)
{
...
MyDelegate myDelegate = new MyDelegate( MyObject.MyPooledProcess);
myDelegate.BeginInvoke(data1, data2, new
AsyncCallback(MyPooledProcessCallback), dataObject);
...
}
}
/KÅDER
.
- Prev by Date: Broadcasting using WME SDK
- Next by Date: Re: Broadcasting using WME SDK
- Previous by thread: Broadcasting using WME SDK
- Next by thread: WMEncBasicEdit move scripts to header
- Index(es):
Loading