Post not yet marked as solved
Post marked as unsolved with 0 replies, 815 views
I have an application in iOS that needs to be stream from a device and display on iPhone. Also the user needs to record the stream to phone storage when they tap a button.
Added a pipeline in server side:
gst-launch-1.0 -v avfvideosrc device-index=0 ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! queue ! udpsink host=192.168.0.106 port=5005
also in client side: (GStreamerBackend.m)
pipeline = gst_parse_launch("udpsrc port=5005 caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, tune=zerolatency, bitrate=500, speed-preset=superfast, payload=96" ! rtph264depay ! h264parse ! tee name=t t. ! queue ! avimux ! filesink location=/var/mobile/Containers/Data/Application/C40A7960-18CC-480E-9171-520ADF26BB8D/Documents/video1.avi t. ! queue leaky=1 ! decodebin ! videoconvert ! autovideosink sync=false", &error);
This will display and record the stream correctly.
But how do I separate the display and record?
I need to record the stream only on button click.
I need to add a new class for start and stop recording. I found the code in .c
But need it in objective c.
If anybody knows, please let me inform.