[Repo] Add checking caps compatibility between repo_src & repo_sink
authorjijoong.moon <jijoong.moon@samsung.com>
Mon, 14 Jan 2019 22:44:21 +0000 (07:44 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Mon, 21 Jan 2019 13:46:41 +0000 (22:46 +0900)
commit6860304135d02c3df31768938db3f075c740b091
treebd06c63c7c200a9b897a857c3707990d20c9199d
parent5e9aa88623895b08b4cedadf7e453b34959747f3
[Repo] Add checking caps compatibility between repo_src & repo_sink

It is difficult to check caps compatibility during negotiation because
they are not pipelined each other. That's why reposrc needs caps
property by the way. However, we have to check compatibility somehow
during runtime. In order to do that, GstMetaRepo is introduced.
In this PR, functions and defines are included to manipulate the meta
for repo. During generating buffer in reposink, insert GstMetaRepo
data with GstCaps and push to repo. After that, reposrc extracts the
GstMetaRepo when pulling the gstbuffer from repo
and compare it with caps defined by user. If they are not compatible,
it shows error and return GST_FLOW_EOS.

**Changes proposed in this PR:**
- Add GstMetaRepo type and manipulation functions
- Add insert GstMetaRepo into buffer
- Add comparison routine during get gstbuffer from repo
- Add Error handling if they are not compatible

Resolves: Issue #1026

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
gst/nnstreamer/tensor_repo.c
gst/nnstreamer/tensor_repo.h
gst/nnstreamer/tensor_reposink/tensor_reposink.c
gst/nnstreamer/tensor_reposrc/tensor_reposrc.c
gst/nnstreamer/tensor_reposrc/tensor_reposrc.h
tests/nnstreamer_repo_lstm/runTest.sh
tests/nnstreamer_repo_rnn/runTest.sh