[ML][Pipeline] Fix issues reported by TCT team
Fixed problems:
- Pipeline::{getNodeInfo, getSwitch, getValve}: throw TypeMismatchError
when no argument is passed
- NodeInfo::setProperty: throw TypeMismatchError, instead of AbortError
when value type is other than expected
- Pipeline::unregisterSinkListener: throw InvalidValuesError when sink
has not been registered
[Verification] Code was tested with the snippets below and worked fine
///// checking problems with getNodeInfo, getSwitch, getValve,
///// and unregisterSinkListener
var pipelineDefinition = "videotestsrc name=vsrc is-live=true " +
"! videoconvert " +
"! videoscale name=vscale " +
"! video/x-raw,format=RGBx,width=224,height=224,framerate=60/1 " +
"! tensor_converter " +
"! valve name=valvex " +
"! input-selector name=is01 " +
"! tensor_sink name=sinkx";
var pipeline = tizen.ml.pipeline.createPipeline(pipelineDefinition);
pipeline.getNodeInfo();
// TypeMismatchError
pipeline.getSwitch();
// TypeMismatchError
pipeline.getValve();
// TypeMismatchError
pipeline.unregisterSinkListener('test')
// InvalidValuesError
///// checking problem with setProperty
pipelineDefinition = "videotestsrc name=vsrc is-live=true " +
"! videoconvert " +
"! videoscale name=vscale " +
"! video/x-raw,format=RGBx,width=224,height=224,framerate=60/1 " +
"! tensor_converter " +
"! valve name=valvex " +
"! input-selector name=is01 " +
"! tensor_sink name=sinkx";
pipeline = tizen.ml.pipeline.createPipeline(pipelineDefinition);
nodeInfo = pipeline.getNodeInfo("vsrc");
nodeInfo.setProperty("is-live", "DOUBLE", NaN);
// TypeMismatchError
Change-Id: I25438b037e0a2dd2f91f8d9b398cffcaf457386b
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>