# Camera
Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/camera.html](https://docs.qualcomm.com/doc/80-70022-50/topic/camera.html)
The Qualcomm IM SDK camera plugin, camsrc, acts as a client to the Qualcomm camera
service. The camera use cases show the execution and display of the 1080p YUV streams from a
live source.
For more information about the camera plugin, see [camera
architecture](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html#camera).
Before running the use case, ensure that you complete the preconditions mentioned in
[GStreamer command-line use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/gstreamer-application-use-cases.html).
### Single 1080p YUV stream from live source
Run the use case on the target
device:
gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! waylandsink fullscreen=true sync=falseCopy to clipboard
The content from the camera stream is displayed.
To stop the use case, use CTRL + C.
The following pipeline shows a single 1080p stream taken from the camera and sent to
display.
### Three 720 YUV streams from live source
Run the use case on the target
device:
gst-launch-1.0 -e qtivcomposer name=mixer sink_0::position="<0, 0>" sink_0::dimensions="<480, 270>" sink_1::position="<480, 0>" sink_1::dimensions="<480, 270>" sink_2::position="<960, 0>" sink_2::dimensions="<480, 270>" mixer. ! queue ! waylandsink fullscreen=true qtiqmmfsrc name=camsrc camera=0 video_0::type=preview video_1::type=video ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! mixer. camsrc. ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! mixer. camsrc. ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! mixer.Copy to clipboard
The content from camera streams is displayed.
To stop the use case, use CTRL + C.
Note: With the GMSL camera, it's been observed that the display
doesn't work and the use case doesn't stop when using CTRL
+ C.
The following pipeline shows three 720p streams taken from the camera and sent to
display with each stream displayed at different positions on the screen.
### Request many streams with different fps from camera
Run the following use cases on the target device:
- Two streams with capture request mode at 30 fps/15
fps:
gst-launch-1.0 -e --gst-debug=fpsdisplaysink:6 qtiqmmfsrc name=qmmf frc-mode=capture-request video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! fpsdisplaysink name=disp1 signal-fps-measurements=true text-overlay=false video-sink="fakesink" qmmf. ! video/x-raw,format=NV12,width=1920,height=1080,framerate=15/1 ! fpsdisplaysink name=disp2 signal-fps-measurements=true text-overlay=false video-sink="fakesink"Copy to clipboard
- Two streams with capture request mode at 17 fps/10
fps:
gst-launch-1.0 -e --gst-debug=fpsdisplaysink:6 qtiqmmfsrc name=qmmf frc-mode=capture-request video_0::type=video video_1::type=preview qmmf.video_0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=17/1 ! fpsdisplaysink name=disp1 signal-fps-measurements=true text-overlay=false video-sink="fakesink" qmmf.video_1 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=10/1 ! fpsdisplaysink name=disp2 signal-fps-measurements=true text-overlay=false video-sink="fakesink"Copy to clipboard
Note: This use case isn't supported in the current
release.
- Two streams with capture request mode at 5 fps/25 fps:
The smaller frame rate
is processed first and the camera updates the frame rate on the second
stream.
gst-launch-1.0 -e --gst-debug=fpsdisplaysink:6 qtiqmmfsrc name=qmmf frc-mode=capture-request video_0::type=video video_1::type=preview qmmf.video_0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=5/1 ! fpsdisplaysink name=disp1 signal-fps-measurements=true text-overlay=false video-sink="fakesink" qmmf.video_1 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=25/1 ! fpsdisplaysink name=disp2 signal-fps-measurements=true text-overlay=false video-sink="fakesink"Copy to clipboard
### Set sensor mode
Set the sensor mode in the camsrc
plugin:
export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0 && gst-launch-1.0 qtiqmmfsrc camera=0 name=camsrc sensor-mode=0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! multifilesink enable-last-sample=false location="/opt/frame%d.yuv" max-files=5Copy to clipboard
For `sensor-mode=