# qtiqmmfsrc
The qtiqmmfsrc plugin captures the video frames through Qualcomm Camera Service.
The plugin has the GstQtiQmmfSrc main class that acts as a wrapper on top of the Qualcomm multimedia framework (QMMF) recorder client with separate pads for video and image streams.
- The pads store the creation time parameters (passed as GstCaps during pipeline creation) for the particular stream.
- The GstQtiQmmfSrc takes that information, translates it to the QMMF recorder client parameters, and calls the necessary APIs on each state transition of the element.
- For video and image pads, set the camera device ID through the `camera` property. By default, this ID is 0.
The following are the transition states of the plugin:
- During the transition between the NULL and READY states, the plugin opens and initializes the camera device with the specified ID.
- When transitioning to PAUSED state from READY, the plugin translates the set pad parameters and makes calls to the QMMF service to create the source streams for each pad.
- The session streams are started when transition is done to the PLAYING state.
While the plugin receives a frame in the main class, it creates a GstBuffer and sends it to the relevant pad buffer queue. The pad pushes the buffer to its linked sink pad from the next plugin.
The QMMF service does the following:
- It assigns the buffers. The plugin returns the buffers to the service when they’re no longer in use.
- For video, the QMMF service sends the buffers when the plugin state is PLAYING.
- For image pad, a *capture-image* signal must be sent. For each capture-image, the QMMF service sends a single buffer.
## Inheritance chain
[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → GstQmmfSrc
The following tables provide information on pad templates and element properties of qtiqmmfsrc. For use cases, see [Camera](https://docs.qualcomm.com/doc/80-80021-50/topic/camera.html).
## Pad configuration
| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| SRC template: 'image\_%u'
>
>
>
Availability: On request
Direction: source
Availability: On request
Direction: source
Availability: On request
Direction: source
Availability: On request
Direction: source
Availability: On request
Direction: source
Availability: On request
Direction: source
flags: readable, writable
Enum "GstRotate" Default: 0, "none"
(0): none - No rotation
(1): 90CCW - Rotate 90 degrees counter-clockwise
(2): 180CCW - Rotate 180 degrees counter-clockwise
(3): 270CCW - Rotate 270 degrees counter-clockwise
flags: readable, writable, changeable only in NULL or READY state
Integer. Range: -1 - 2147483647 Default: -1
Note
source-index is deprecated and is no longer in use.
flags: readable, writable, changeable in NULL, READY, PAUSED, or PLAYING state
Double. Range: 0 - 30 Default: 30
flags: readable, writable, changeable in NULL, READY, PAUSED, or PLAYING state
GstValueArray of GValues of type "gint"
flags: readable, writable, changeable only in NULL or READY state
Unsigned Integer.
Range: 0 - 4294967295 Default: 0
flags: readable, writable, changeable in NULL, READY, PAUSED, or PLAYING state
Enum "GstQmmfSrcStreamType" Default: 0, "video"
(0): video - The stream is configured with tunings and settings most fitted for directly encoding the buffers.
(1): preview - The stream is configured with tunings and settings most fitted for directly visualizing the buffers.
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Enum "GstRotate" Default: 0, "none"
(0): none - No Rotation
(1): 90CCW - Rotate 90 degrees counter-clockwise
(2): 180CCW - Rotate 180 degrees counter-clockwise
(3): 270CCW - Rotate 270 degrees counter-clockwise
flags: readable, writable, changeable only in NULL or READY state
Boolean. Default: false
flags: readable, writable
String. Default: "qmmfsrc0"
flags: readable, writable
Object of type "GstObject"
flags: readable, writable
Unsigned Integer. Range: 0 - 32 Default: 0
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Boolean. Default: false
flags: readable, writable; changeable in NULL, READY, PAUSED or PLAYING state
Boolean. Default: false
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraControlMode" Default: 1, "auto"
(0): off - Full application control of pipeline
(1): auto - Manual control of capture parameters is disabled
(2): use-scene-mode - Use a specific scene mode
(3): off-keep-state - Same as OFF mode, except that this capture isn't used by camera device background 3A to update their statistics.
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraEffectMode" Default: 0, "off"
(0): off - No color effect is applied.
(1): mono - A 'monocolor' effect where the image is mapped into a single color.
(2): negative - A 'photo-negative' effect where the image colors are inverted.
(3): solarize - A 'solarisation' effect (Sabattier effect) where the image is completely or partially reversed in tone.
(4): sepia - A 'sepia' effect where the image is mapped into warm gray, red, and brown tones.
(5): posterize - A 'posterization' effect where the image uses discrete regions of tone rather than a continuous gradient of tones.
(6): whiteboard - A 'whiteboard' effect where the image is typically displayed as regions of white, with black, or grey details.
(7): blackboard - A 'blackboard' effect where the image is typically displayed as regions of black, with white, or grey details.
(8): aqua - An 'aqua' effect where a blue hue is added to the image.
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraSceneMode" Default: 1, "face-priority"
(0): disabled - Indicates that no scene modes are set
(1): face-priority - Optimized for photos of with priority of people faces
(2): action - Optimized for photos of quickly moving objects.
(3): portrait - Optimized for still photos of people
(4): landscape - Optimized for photos of distant macroscopic objects
(5): night - Optimized for low-light settings
(6): night-portrait - Optimized for still photos of people in low-light settings
(7): theatre - Optimized for dim, indoor settings where flash must remain off
(8): beach - Optimized for bright, outdoor beach settings
(9): snow - Optimized for bright, outdoor settings containing snow
(10): sunset - Optimized for scenes of the setting sun
(11): steady-photo - Optimized to avoid blurry photos due to small amounts of device motion (for example: due to handshake)
(12): fireworks - Optimized for nighttime photos of fireworks
(13): sports - Optimized for photos of fast moving people
(14): party - Optimized for dim, indoor settings with several moving people
(15): candlelight - Optimized for dim settings where the main light source is a candle
(16): hdr - Turn on a device-specific high dynamic range (HDR) mode
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstAntibandingMode" Default: 3, "auto"
(0): off - The camera device doesn't adjust exposure duration to avoid banding problems
(1): 50 Hz - The camera device adjusts exposure duration to avoid banding problems with 50 Hz illumination sources
(2): 60 Hz - The camera device adjusts exposure duration to avoid banding problems with 60 Hz illumination sources
(3): auto - The camera device automatically adapts its antibanding routine to the current illumination condition
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: 0 - 6 Default: 2
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: 1 - 10 Default: 5
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: 0 - 10 Default: 5
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraISOMode" Default: 0, "auto"
(0): auto - The chosen ISO exposure mode depending on the scene
(1): deblur - The ISO exposure sensitivity set to prioritize motion deblur
(2): 100 - The ISO exposure sensitivity set to prioritize level 100
(3): 200 - The ISO exposure sensitivity set to prioritize level 200
(4): 400 - The ISO exposure sensitivity set to prioritize level 400
(5): 800 - The ISO exposure sensitivity set to prioritize level 800
(6): 1600 - The ISO exposure sensitivity set to prioritize level 1600
(7): 3200 - The ISO exposure sensitivity set to prioritize level 3200
(8): manual - The ISO exposure value provided by manual-iso-value is used
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: 100 - 3200 Default: 800
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraExposureMode" Default: 1, "auto"
(0): off - The auto exposure routine is disabled. Manual exposure time is used to set the 'exposure-time' property
(1): auto - The auto exposure routine is active
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Boolean. Default: false
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraExposureMetering" Default: 0, "average"
(0): average - The camera exposure metering is calculated as average from the whole frame.
(1): center-weighted - The camera exposure metering is calculated from the center region of the frame.
(2): spot - The camera exposure metering is calculated from a chosen spot.
(6): custom - The camera exposure metering is calculated from a custom metering table.
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer. Range: -12 - 12 Default: 0
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Integer64. Range: 0 - 9223372036854775807 Default: 33333333
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
String. Default: "org.codeaurora.qcamera3.exposuretable;"
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraWiteBalanceMode" Default: 3, "auto"
(0): off - Both auto and manual white balance routines are disabled
(1): manual-cc-temp - The auto-white balance routine is inactive and manual color correction temperature is used, which is set through the 'manual-wb-settings' property
(2): manual-rgb-gains - The auto-white balance routine is inactive and manual R/G/B gains are used, which are set through the 'manual-wb-settings' property
(3): auto - The auto-white balance routine is active
(4): shade - The camera device uses shade light as the assumed scene illumination for white balance correction
(5): incandescent - The camera device uses incandescent light as the assumed scene illumination for white balance correction
(6): fluorescent - The camera device uses fluorescent light as the assumed scene illumination for white balance correction
(7): warm-fluorescent - The camera device uses warm fluorescent light as the assumed scene illumination for white balance correction
(8): daylight - The camera device uses daylight light as the assumed scene illumination for white balance correction
(9): cloudy-daylight - The camera device uses cloudy daylight light as the assumed scene illumination for white balance correction
(10): twilight - The camera device uses twilight light as the assumed scene illumination for white balance correction
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Boolean. Default: false
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
String. Default: "org.codeaurora.qcamera3.manualWB;"
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraFocusMode" Default: 0, "off"
(0): off - The auto focus routine is disabled
(1): auto - The auto focus routine is active
(2): macro - In this mode, the auto focus algorithm is optimized for focusing on objects close to the camera
(3): continuous - In this mode, the AF algorithm modifies the lens position continually to try to provide a constantly-in-focus image stream
(4): edof - The camera device produces images with an extended depth of field automatically; no special focusing operations must be done before taking a picture
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraNoiseReduction" Default: 1, "fast"
(0): off - No noise reduction filter is applied.
(1): fast - TNR (Temporal Noise Reduction) Fast Mode
(2): hq - TNR (Temporal Noise Reduction) High Quality Mode
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
String. Default: "org.quic.camera.anr_tuning;"
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
GstValueArray of GValues of type "gint". Default: "< (int)0, (int)0, (int)0, (int)0 >".
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
String. Default: "org.quic.camera.defog;"
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
String. Default: "org.quic.camera.ltmDynamicContrast;"
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstCameraIRMode" Default: 0, "off"
(0): off - The infrared LED is OFF and cut filter is applied, that is, infrared light is blocked.
(1): on - The infrared LED is ON and cut filter is removed, that is, infrared light is allowed.
(2): auto - The infrared LED and cut filter are turned ON or OFF depending on the conditions.
(3): cut-filter-only - The infrared LED is turned OFF and cut filter is applied, that is, IR light is blocked.
(4): cut-filter-disable - Infrared cut filter is removed allowing IR light to pass. This mode is used for transitioning from 'cut-filter-only' mode, that is, disabling only the cut filter.
flags: readable, changeable in NULL, READY, PAUSED or PLAYING state
GstValueArray of GValues of type "gint". Default: "< (int)0, (int)0, (int)0, (int)0 >".
flags: readable, writable
Integer. Range: -1 - 15 Default: -1
flags: readable, writable
Enum "GstFrcMode" Default: 0, "frame-skip"
(0): frame-skip - Controls stream frame rate by frame skip.
(1): capture-request - Controls stream frame rate by camera capture request
flags: readable, writable
Flags "GstFrameSelection" Default: 0x00000001, "none"
(0x00000001): none - Enables normal camera operation mode
(0x00000002): frameselection - Enables frameselection camera operation mode
(0x00000004): fastswitch - Enables fastswitch camera operation mode
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Enum "GstSHDRMode" Default: 0, "off"
(0): off - VHDR is disabled.
(1): shdr-raw - Raw SHDR line interleaved mode with 2 frame. Use this mode for better performance on supporting sensor.
(2): shdr-yuv - YUV SHDR virtual channel mode with 2 frames. Use this mode for better quality on supporting sensor. This mode may result in reduced framerate.
(3): raw-shdr-switch - Enable Raw SHDR switch. Use this mode for enabling shdr switch in camera backend based on lux value. The switch is between linear and Raw SHDR based on support in camera.
(4): yuv-shdr-switch - Enable YUV SHDR switch. Use this mode for enabling shdr switch in camera backend based on lux value. The switch is between linear and YUV SHDR based on support in camera.
(5): qbc-hdr-video - Enable in-sensor HDR for video stream. This mode is applicable for sensor that support this feature only.
(6): qbc-hdr-snapshot - Enable in-sensor HDR for snapshot. When enabled camera backend decides to enable in-sensor hdr for snapshot based on the scene. This mode is applicable for sensor that support this feature only.
flags: readable, writable
Boolean. Default: false
flags: readable, writable
Boolean. Default: false
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state.
GstValueArray of GValues of type "gint".
flags: readable, writable
Boolean. Default: false
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state.
Enum " GstPadActivationMode" Default: 0, "normal"
flags: readable, changeable in NULL, READY, PAUSED or PLAYING state.
Pointer
flags: readable
Boxed pointer of type "GHashTable"
flags: writable, changeable in NULL, READY, PAUSED or PLAYING state
Pointer. Write-only.
flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
Pointer
flags: readable, changeable in NULL, READY, PAUSED or PLAYING state
Pointer