[ML][pipeline] Implement Pipeline::getSwitch() 75/251075/11
authorPawel Wasowski <p.wasowski2@samsung.com>
Tue, 12 Jan 2021 15:38:43 +0000 (16:38 +0100)
committerPawel Wasowski <p.wasowski2@samsung.com>
Mon, 18 Jan 2021 17:59:36 +0000 (18:59 +0100)
commitee3d5a03fee9b4234e707bbb15dc3cd824704bbb
tree8d0651386ce5dd330af9acbcae0d82eec6c8fd2d
parent27b5b872d50716bb74077a2bedab36e100658484
[ML][pipeline] Implement Pipeline::getSwitch()

ACR: TWDAPI-274

[Verification] Code tested in Chrome DevTools with below snippets works
fine

var pipeline_def = "videotestsrc is-live=true"
                   + " ! videoconvert"
                   + " ! tensor_converter"
                   + " ! output-selector name=outs outs.src_0"
                   + " ! tensor_sink name=sink0 async=false outs.src_1"
                   + " ! tensor_sink name=sink1 async=false"

var pipeline = tizen.ml.pipeline.createPipeline(pipeline_def, function(state) {console.log(state);})

pipeline.getSwitch('outs')
// Switch {name: "outs", type: "OUTPUT_SELECTOR", _pipeline_id: 3}

pipeline.getSwitch('non existent switch')
//  VM31:1 Uncaught WebAPIException {code: 0, name: "InvalidValuesError"

Change-Id: Ia7d6838b5e49072c35f0b796151c436d4a3b60e1
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
src/ml/js/ml_pipeline.js
src/ml/ml.gyp
src/ml/ml_instance.cc
src/ml/ml_instance.h
src/ml/ml_pipeline.cc
src/ml/ml_pipeline.h
src/ml/ml_pipeline_manager.cc
src/ml/ml_pipeline_manager.h
src/ml/ml_pipeline_switch.cc [new file with mode: 0644]
src/ml/ml_pipeline_switch.h [new file with mode: 0644]