v4l2videoenc: work but break the framework

It seems that it could work only with encoded out black and white
mode, there must be some bugs in code. Of couse I break the
buffer allocate detect and start streaming in v4l2 framework.

v4l2videoenc: a bug in code

I forget to check it in the master tree, yesterday compiling
report it.

v4l2videoenc: fix requesting buffer in OUTPUT

The encoder is different to decoder, it need to set format of
CAPTURE side before requesting any buffer for it.
Searhing case S5P_FIMV_R2H_CMD_OPEN_INSTANCE_RET of kernel.

v4l2videoenc: set the encoded size in CAPTURE

As the  gst_v4l2_object_set_format won't set
the encoded size correctly so I can't use
it to do that. Now I have problem with
allocate the buffer for CAPTURE and
the requested buffers in OUTPUT seems that
they are not queued.

v4l2videoenc: fix alloc buffers in CAPTURE

I am wrong, we don't need to queue all the buffers
after reqbufs, just fix the time to  start stream
in both side.
I use some raw code as I have no idea to fix it in
framework now.

v4l2videoenc: a little fix

Encoder need to enqueue buffers in CAPTURE after
allocated and queryed them, but not in
OUTPUT side.

v4l2videoenc: a ugly work version

Only pass the test of videotestsrc but not usb camera
not merge with the lastest gst. The code is not clean
too.

v4l2videoenc: don't start stream on CAPTURE here

Well, encoder need to do that later, I forget
to do this in the last commit.

v4l2videoenc: some fix

Just port to 1.3.4, it seems that the color it encoded is not
correct, only black and white using
gst-launch-1.0 videotestsrc ! v4l2video9enc ! h264parse \
! matroskamux ! filesink location=1.mkv

v4l2videoenc: fix buffer allocator detect

It is just a kernel bug, I have tested in kernel 3.5.
gst-launch-1.0 --gst-debug=v4l2videoenc:9,v4l2allocator:9,v4l2:9 \
--gst-debug-no-color videotestsrc num-buffers=500 ! video/x-raw, \
format=\(string\)NV12,width=320,height=240 ! videoconvert \
! v4l2video9enc ! filesink location=1.h264
Could output color data.
480x320 works too.
640x480 will have the green color at the button part.
But the 1920x1080 is full green.