add(/stop) recording while live preview

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

add(/stop) recording while live preview

Rashmi
I have created a gstreamer pipeline(for dm368 application) for DVI +stream with the following elements
v4l2src-->dmaiaccel--->filtercaps--->tee-->
-->queuev-->videosink
--->queueu--->encoder-->rtp payload-->udpsink

I have also created a recording bin with
queues-->encoder-->mux---filesink
that records video based on user command received over tcp.

When recording is to be initiated the following steps are followed
1)get static pad to recording bin
2)block the pad
3)add recording bin to pipeline
4)set its state to playing
5)get request pad to tee
6)link it to recording bin
7)unblock the pad

for stopping recording
1)block the tee src pad
2)send eos to queues
3)remove the recording bin
4)set its state to null
5)unlink the tee pad and sink pad of recording bin
6)remove the tee pad
7)unblock the tee src pad

My problem is I am able to record video only for the first time.The DVI +streaming doesn't halt when I add and remove the bin.
but the application crashes teh seond time i try to record with the error
GLib (gthread-posix.c): Unexpected error from C library during 'pthread_mutex_lock': Invalid argument.  Aborting.

I have attached code for reference.


record.c
Reply | Threaded
Open this post in threaded view
|

Re: add(/stop) recording while live preview

GregChapman
I think you have posted at the wrong forum. This one is for Nabble Support only.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.