1 Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 @page l4t_mm_jpeg_capture_group 09_camera_jpeg_capture
7 - [Overview](#overview)
8 - [Building and Running](#build_and_run)
10 - [Key Structure and Classes](#key)
12 - - - - - - - - - - - - -
16 This sample shows how to use libargus to create camera objects and
interface as frame producer so either EGL
17 image renderer can display, preview, or perform image capture to a JPEG file.
20 <a name=
"build_and_run">
21 - - - - - - - - - - - - - - -
22 ## Building and Running ##
24 ### Prerequisites ####
26 * You have followed Steps 1-3 in @ref mmapi_build.
27 * If you are building from your host Linux PC (x86), you have
28 followed Step 4 in @ref mmapi_build.
34 $ cd $HOME/multimedia_api/samples/09_camera_jpeg_capture
40 $ ./camera_jpeg_capture [OPTIONS]
42 The captured preview stream can display over HDMI. JPEG files are
43 stored in the current directory.
45 ### To view supported options
47 $ ./camera_jpeg_capture -h
51 - - - - - - - - - - - - - - -
53 The following diagram shows the flow of data through the sample.
55 
57 The sample uses producer and consumer model to establish frame flow from camera
object producing frame
58 output to consumer connecting EGLstream buffer
for rendering preview mode.
60 The programming model is quite straightforward and efficient once you are familiar with it.
62 The API is frame-based cross-platform user mode API. The design is to ensure zero buffer copy when it
63 comes to consuming output frame.
66 - - - - - - - - - - - - - - -
67 ## Key Structure and Classes ##
69 Regarding libargus and EGLStream, please refer to libargus document.
73 |
class [NvEGLRender](classNvEglRenderer.html) | The
class contains elements and functions to render frames to EGL window. |
74 | class [NvJpegEncoder](classNvJPEGEncoder.html) | The class contains elements and functions to encode JPEG images.
76 %NvEGLRender is the
class that packages all the functions for video rendering. Key members used in the
77 sample are as follows:
79 | %NvEGLRender | Description |
80 |-------------|-------------|
83 %NvJpegEncoder is the class that packages all the functions for JPEG encoding. Key members used are:
86 |--------------------|-------------|
87 | [encodeFromFd](classNvJPEGEncoder.html#a4c7f16d4d8ee39fcc52279ee14418fea) | Encode form FD of buffer exported by V4L2 element. |
Defines a helper class for operations performed on a V4L2 Element plane.
int render(int fd)
Renders a buffer.