1697
Comment:
|
← Revision 4 as of 2018-08-07 04:50:32 ⇥
1759
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
import sys | |
Line 17: | Line 18: |
* Setup your pipeline by specifying frame_cache(=cache file name) and instrument(=K1) | * Initialize your pipeline |
Line 24: | Line 25: |
* Run your pipeline | * Put your pipeline description {{{ ... }}} * Run your pipeline where you need to specify gps_start_time and gps_end_time |
Step 1: Use GstLAL in your python script
- Include the following part in your python script to use GstLAL
- Initialize your pipeline
- Put your pipeline description
...
- Run your pipeline where you need to specify gps_start_time and gps_end_time
1 print >>sys.stderr, "seeking GPS start and stop times ..."
2 if pipeline.set_state(Gst.State.READY) != Gst.StateChangeReturn.SUCCESS:
3 raise RuntimeError("pipeline failed to enter READY state")
4 datasource.pipeline_seek_for_gps(pipeline, gps_start_time, gps_end_time)
5
6 print >>sys.stderr, "setting pipeline state to playing ..."
7 if pipeline.set_state(Gst.State.PLAYING) != Gst.StateChangeReturn.SUCCESS:
8 raise RuntimeError("pipeline failed to enter PLAYING state")
9 else:
10 print >>sys.stderr, "set to playing successfully"
11
12 print >>sys.stderr, "running pipeline ..."
13
14 mainloop.run()
15
16 if pipeline.set_state(Gst.State.NULL) != Gst.StateChangeReturn.SUCCESS:
17 raise RuntimeError("pipeline could not be set to NULL")