I am working with a dm368 with the 4.02.00.06 DVSDK. I aw working with gstreamer. Based on the Software Developers Guide and various suggestions from the web, I have cobbled together the following pipeline:
gst-launch -v v4l2src always-copy=FALSE input-src=Composite num-buffers=800 ! video/x-raw-yuv, format=\(fourcc\)NV12, width=720, height=480, framerate=30000/1001 ! TIPrepEncBuf contiguousInputFrame=true ! TIVidenc1 codecName=mpeg4enc engineName=codecServer ! filesink location=/opt/video/sample.m4v
This pipeline works beautifully--ONCE. Next I run a pipeline to display the video I recorded with the following pipeline:
gst-launch filesrc location=/opt/video/sample.m4v ! typefind ! TIViddec2 ! queue ! tidisplaysink2 video-standard=auto display-output=component
When I run the encoding (first) pipeline a second (or sometimes third) time, it fails. The failure reason changes everytime I run it. Sometimes there is a SIGSEGV. Sometimes it is a problem with free(). Sometimes it is an invalid pointer. It's not the same problem every time.
Note: Actually, the problem can occur without running the display pipeline. The display pipeline seems to work well when not in conjunction with the encoding pipeline, so I strongly doubt it's the problem.
My suspicion is that one of the TI plugins (TIPrepEncBuf or TIVidenc1) doesn't clean memory correctly (or as I expect it to). Or maybe I'm using them incorrectly.
Could somebody help me correct my pipeline so I don't keep having these memory problems?
Thanks
(Edit: fix spelling, clarify which pipeline fails)