var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, inputTI, outputTI, customFilter;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- tizen.ml.pipeline.unregisterCustomFilter("flattenFilter");
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, inputTI, outputTI, customFilter, errorCallback;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- tizen.ml.pipeline.unregisterCustomFilter("flattenFilter");
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
test(function () {
var pipeline, pipelineDefinition;
- add_result_callback(function () {
- try {
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
+
pipelineDefinition = "videotestsrc num-buffers=3 " +
"! video/x-raw,width=20,height=15,format=BGRA " +
"! tensor_converter " +
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, listener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
listener = t.step_func(function (newState) {
if (newState === "PAUSED") {
assert_equals(pipeline.state, "PAUSED", "Incorrect pipeline state");
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, inputTI, outputTI, retValue, customFilter;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- tizen.ml.pipeline.unregisterCustomFilter("flattenFilter");
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), inputTI, outputTI, pipeline, pipelineDefinition, customFilter, errorCB;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- tizen.ml.pipeline.unregisterCustomFilter("testfilter");
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("ti1", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), inputTI, outputTI, customFilter;
t.step(function () {
- add_result_callback(function () {
- try {
- tizen.ml.pipeline.unregisterCustomFilter("testfilter2");
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), retValue, inputTI, outputTI, pipeline, pipelineDefinition, customFilter, errorCB;
t.step(function () {
- add_result_callback(function () {
- try {
- tizen.ml.pipeline.unregisterCustomFilter("flattenFilter");
- inputTI.dispose();
- outputTI.dispose();
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), inputTI, outputTI, retValue, customFilter;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, inputTI, outputTI, customFilter;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- pipeline.stop();
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), inputTI, outputTI, customFilter;
t.step(function () {
- add_result_callback(function () {
- try {
- inputTI.dispose();
- outputTI.dispose();
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
inputTI = new tizen.ml.TensorsInfo();
inputTI.addTensorInfo("3D", "UINT8", [4, 20, 15, 1]);
outputTI = new tizen.ml.TensorsInfo();
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, stateChangeListener, ready = false;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
stateChangeListener = t.step_func(function (newState) {
if(ready) {
assert_type(newState, "string", "pipeline state should be string");
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, retValue, sinkListener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.stop();
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
sinkListener = t.step_func(function(sinkName, data){
assert_type(retValue, "undefined", "Incorrect return type.");
assert_equals(sinkName, "sinkx", "Incorrect sink name.");
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, invalidSinkListener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
invalidSinkListener = {
ondata : t.step_func(function(sinkName, data){
assert_unreached("invalid sinkListener should not be invoked: " + error.name + ", msg: " + error.message);
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, sinkListener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
sinkListener = t.step_func(function(sinkName, data){
assert_unreached("sinkListener should not be invoked when sinkName is invalid");
});
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, listener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.stop();
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
listener = t.step_func(function (newState) {
if (newState === "PLAYING") {
assert_equals(pipeline.state, "PLAYING", "Incorrect pipeline state.");
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, retValue, sinkListener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.stop();
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
sinkListener = t.step_func(function(sinkName, data){
retValue = pipeline.unregisterSinkListener("sinkx");
assert_type(retValue, "undefined", "Incorrect return type.");
var t = async_test(document.title, {timeout: 90000}), pipeline, pipelineDefinition, retValue, sinkListener;
t.step(function () {
- add_result_callback(function () {
- try {
- pipeline.unregisterSinkListener("sinkx");
- pipeline.dispose();
- } catch (err) {
- // do nothing in case dispose throw an exception
- }
- });
-
sinkListener = t.step_func(function(sinkName, data){
});
pipelineDefinition = "videotestsrc num-buffers=3 " +
assert_type(data, "object", "Incorrect sinkName type.");
assert_not_equals(data, null, "data should not be null");
assert_not_equals(data, undefined, "data should not be undefined");
- pipeline.unregisterSinkListener("sinkx");
- pipeline.stop();
- pipeline.dispose();
t.done();
});