When encoding from a file the codec fails to initialize:
$ gst-launch -v filesrc location=/opt/media/raw_uyvy.yuv ! TIVidenc1
codecName=mpeg4enc engineName=encode contiguousInputFrame=FALSE iColorSpace=UYVY
resolution=320x240 frameRate=30 ! filesink location=sample2.m4v
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to
create video encoder: mpeg4enc
Additional debug info:
gsttividenc1.c(1522): gst_tividenc1_codec_start ():
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
The attached patches fix this problem. Simply put, the code_start function
always looks at videnc1->device when initializing the codec, but
videnc1->device was only being set when caps negotiation was taking
place. If there was no caps negotiation, it was not set properly and the codec
was failing to initialize.
The change is broken into four patches. The first three are set-up for the fix,
and the last one is the fix.