trans code api which for file mode and stream mode