correctoins
This commit is contained in:
parent
360dab18c2
commit
6fe272c32e
1 changed files with 15 additions and 11 deletions
|
|
@ -107,7 +107,8 @@ namespace DMX2
|
||||||
set{
|
set{
|
||||||
if(element==null) return;
|
if(element==null) return;
|
||||||
if(element.CurrentState != Gst.State.Paused && element.CurrentState != Gst.State.Playing){
|
if(element.CurrentState != Gst.State.Paused && element.CurrentState != Gst.State.Playing){
|
||||||
lock(taskQueue)taskQueue.Enqueue(delegate(){
|
lock(this)
|
||||||
|
taskQueue.Enqueue(delegate(){
|
||||||
PlayTime = value;
|
PlayTime = value;
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
@ -122,12 +123,12 @@ namespace DMX2
|
||||||
public TimeSpan Duration {
|
public TimeSpan Duration {
|
||||||
get {
|
get {
|
||||||
if(element==null) return TimeSpan.Zero;
|
if(element==null) return TimeSpan.Zero;
|
||||||
if(duration == TimeSpan.Zero) {
|
//if(duration == TimeSpan.Zero) {
|
||||||
Gst.Format format = Gst.Format.Time ;
|
Gst.Format format = Gst.Format.Time ;
|
||||||
long dur;
|
long dur;
|
||||||
element.QueryDuration(ref format, out dur);
|
element.QueryDuration(ref format, out dur);
|
||||||
duration = TimeSpan.FromMilliseconds(dur/1000000);
|
duration = TimeSpan.FromMilliseconds(dur/1000000);
|
||||||
}
|
//}
|
||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +163,8 @@ namespace DMX2
|
||||||
{
|
{
|
||||||
if(element == null)return;
|
if(element == null)return;
|
||||||
if(element.CurrentState != Gst.State.Paused && element.CurrentState != Gst.State.Playing){
|
if(element.CurrentState != Gst.State.Paused && element.CurrentState != Gst.State.Playing){
|
||||||
lock(taskQueue)taskQueue.Enqueue(delegate(){
|
lock(this)
|
||||||
|
taskQueue.Enqueue(delegate(){
|
||||||
Play();
|
Play();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
@ -211,7 +213,7 @@ namespace DMX2
|
||||||
|
|
||||||
void UiDestroyed (object sender, EventArgs e)
|
void UiDestroyed (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//throw new NotImplementedException ();
|
ui=null;
|
||||||
}
|
}
|
||||||
public override int ValeurCircuit (Circuit c)
|
public override int ValeurCircuit (Circuit c)
|
||||||
{
|
{
|
||||||
|
|
@ -221,7 +223,9 @@ namespace DMX2
|
||||||
public override void Tick (TimeSpan time)
|
public override void Tick (TimeSpan time)
|
||||||
{
|
{
|
||||||
if(element!=null && taskQueue.Count>0)
|
if(element!=null && taskQueue.Count>0)
|
||||||
lock(taskQueue)taskQueue.Dequeue()();
|
if(element.CurrentState == Gst.State.Paused || element.CurrentState == Gst.State.Playing)
|
||||||
|
lock(this)
|
||||||
|
taskQueue.Dequeue()();
|
||||||
|
|
||||||
if (fading != TimeSpan.Zero) {
|
if (fading != TimeSpan.Zero) {
|
||||||
fading-=time;
|
fading-=time;
|
||||||
|
|
@ -282,7 +286,7 @@ namespace DMX2
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex(
|
static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex(
|
||||||
@"(?<file>\d+)(?<params>[gvp](.+)?)?",
|
@"^(?<file>\d+)(?<params>[gvp](.+)?)?",
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue