Add encode/decode input class and capi wrapper, add encode and decode test in C.

Signed-off-by: Tang Xin <xin.t.tang@intel.com>