[TensorSink/UnitTest] Add a test option for sync property in TensorSink
authorDongju Chae <dongju.chae@samsung.com>
Fri, 13 Dec 2019 03:10:13 +0000 (12:10 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 13 Dec 2019 04:39:47 +0000 (13:39 +0900)
commitd2f37985b3fe8e36ca38ccf4c97ae361a5feb701
tree7324187fbd5262cafdc828f96ddac9d33e5af710
parent034675550c1200559bc14a4be853e7a704cc7b03
[TensorSink/UnitTest] Add a test option for sync property in TensorSink

This commit adds a test option, need_sync, for sync property in TensorSink.

Basically, GstBaseSink has a 'sync' property enabled by default, and
TensorSink also does. In this case, if the frame is later than max-lateness,
the sink will drop the buffer without calling the render method.

It can be a problem if some unittests (e.g., 'signals') expects the exact
number of received data. In slow system, if a signal callback is too slow,
some buffer can be dropped.

To fix this problem, this patch adds a test option for sync property and
set 'sync' property as FALSE by default to disable the buffer dropping
feature for 'signals' unittest.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
tests/nnstreamer_sink/unittest_sink.cpp