Handle one-element gstreamer pipelines

Steps to reproduce

Steps to reproduce:
1. open lecturesight.properties
2. set cv.lecturesight.framesource.input.mrl=gst://videotestsrc
3. start LS

Actual Results:
After when the FrameSourceManager tries to instantiate the GstFrameSource, the thread halts.

Expected Results:
A FrameSource showing the standard Gst video test pattern should be instantiated.

Workaround (if any):

Activity

Show:
Benjamin Wulff
September 22, 2014, 12:23 PM

The Gst binding fails to lauch the pipeline throwing an NPE. This happens when there is only one element in the pipeline, probably because it needs at least two elements to have the bus properly initialized.

The implementation should detect this edge case and handle it by instantiating the element itself instead of letting Gst build the pipeline.

Benjamin Wulff
September 22, 2014, 2:11 PM

Workaround: Add an 'identity' element at the end to make the pipeline have two elements. The identity element just passes on every data it receives.

Example:

gst-launch-0.10 videotestsrc ! autovideosink

translates to

gst://videotestsrc ! identity

Stephen Marquard
March 18, 2016, 9:01 AM

Attached image is the results from:

cv.lecturesight.framesource.input.mrl=gst://videotestsrc ! identity

Looks like a helpful configuration for testing that object detection and templates are behaving correctly.

Assignee

Benjamin Wulff

Reporter

Benjamin Wulff

Severity

None

Components

Fix versions

Affects versions

Priority

Major
Configure