tests: add simple-encoder program
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 5 May 2015 11:08:25 +0000 (13:08 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 12 May 2015 09:24:41 +0000 (11:24 +0200)
commitbe40a1d479794539bc335ecba45b3a012489eecf
treecef21aefcef350825ce6f4934100a82acd2c0260
parent069edff757d92e37cce0ec1411a9821cc9df2ace
tests: add simple-encoder program

This patch adds a simple-encoder test program that uses libgstvaapi for video
encoding to elementary (raw) streams. Input stream is raw YUV in the Y4M
format. That can be from a regular file or standard input when the input
filename is "-".

Usage: simple-encoder [options]* <source>

Options:
--output|-o     output file name
--codec|-c      codec to use for video encoding
--bitrate|-b    desired bitrate (kbps)

By default, and as an initial patch, the encoded stream shall conform to the
minimally supported profile. That is "Constrained Baseline Profile" for H.264
and "Simple Profile" for MPEG-2. Though, those are the defaults to be
generated by libgstvaapi.

You can find Y4M sample files here http://samples.mplayerhq.hu/yuv4mpeg2/

Original-patch-by: Changzhi Wei <changzhix.wei@intel.com>
* general code clean-up
* removed the yuv reader thread
* re-wrote the y4m file parser
* updated used API fixed some wrong usage
* fixed a lot of memory leaks
* added the bitrate setting
* keep fps' numerator and denominator
* simplified the thread control
* removed custom logging and use glib

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=719528
tests/Makefile.am
tests/simple-encoder.c [new file with mode: 0644]
tests/y4mreader.c [new file with mode: 0644]
tests/y4mreader.h [new file with mode: 0644]