This post is more than 5 years old
41 Posts
0
1061
trigger an EBR event multiple times
Hi,
I'm doing some experiments with JCasScript aorund EBR and I'm seeing some strange results.
- create a clip:
CASScript>clipNew testebr
Clip Properties:
Name: testebr
Creation Date: 2011.12.11 02:03:33 GMT
Size: 0
Number of Tags: 0
Number of Blobs: 0
Retention Class:
Retention Seconds: -2
Modified: True
EBR Enabled : False
- enable EBR with a period:
CASScript>clipEnableEBRWithPeriod 12345
Clip Properties:
Name: testebr
Creation Date: 2011.12.11 02:03:33 GMT
Size: 0
Number of Tags: 0
Number of Blobs: 0
Retention Class:
Retention Seconds: 0
Modified: True
EBR Enabled : True
EBR Event Triggered: False
EBR Period : 12345
EBR Class :
- So far so good. Now we write the clip:
CASScript>clipWrite
New Clip ID: FOJ60QNJ8GNHQe3HA8CSOC64KQRG416GMN20LI0S8L5295OG6B5VJ
- and we trigger an EBR event:
CASScript>clipTriggerEBR
Clip Properties:
Name: testebr
Creation Date: 2011.12.11 02:03:33 GMT
Size: 0
Number of Tags: 0
Number of Blobs: 0
Retention Class:
Retention Seconds: 0
Modified: False
EBR Enabled : True
EBR Event Triggered: True
EBR Event Time : 2011.12.11 02:05:39 GMT
EBR Period : 12345
EBR Class :
(so, EBR event triggered == true).
- we try to do that again:
CASScript>clipTriggerEBR
SDK Error Occurred:
Error Number: -10160
System Error: 0
Error: FP_EBR_OVERRIDE_ERR
Error Class: Server Error
Trace: FPClipTree::TriggerEBREvent(-)
This is as expected, and a described in the spec.
However, if we close the clip, and open it again:
CASScript>clipOpen C441HTBGDFJNNe5TJLD3Q273B0UG416GMLTO6I0B9K4VP7NNQ3RUO
Clip Properties:
Name: test2
Creation Date: 2011.12.11 01:44:20 GMT
Size: 0
Number of Tags: 0
Number of Blobs: 0
Retention Class:
Retention Seconds: 0
Modified: False
EBR Enabled : True
EBR Event Triggered: False
EBR Period : 12345
EBR Class :
'EBR event triggered' has gone to 'false' again. So, let's try to trigger it again:
CASScript>clipTriggerEBR
Clip Properties:
Name: test2
Creation Date: 2011.12.11 01:44:20 GMT
Size: 0
Number of Tags: 0
Number of Blobs: 0
Retention Class:
Retention Seconds: 0
Modified: False
EBR Enabled : True
EBR Event Triggered: True
EBR Event Time : 2011.12.11 02:08:22 GMT
EBR Period : 12345
EBR Class :
And it worked, contradicting the spec:
An EBR event can be triggered only once. If an attempt is made to
trigger the event multiple times, the call returns the
FP_EBR_OVERRIDE_ERR error.
Also, the EBR event time has changed.
Am I interpreting the spec wrongly, is it a problem in JCasScript, ... ?
Tx,
Kim
mckeown_paul
409 Posts
0
December 28th, 2011 08:00
after you trigger the event are you doing a clip write to save the state of the clip i.e. that the event has been triggered? I think that is the step you are missing
kim_marivoet
41 Posts
0
December 29th, 2011 01:00
After I have triggered the EBR event, the state of the clip indicates that it's not modified:
From my post:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- and we trigger an EBR event:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
So I had the impression that I didn't had to write the clip again since the clip itself is not modified. I'll try the scenario again, including writing the clip after the EBR trigger to see if that solves my problem.
Regards,
Kim
kim_marivoet
41 Posts
0
January 15th, 2012 02:00
writing the clip again solved the problem. tx.
Kim