1 Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 @page l4t_mm_camera_recording 10_camera_recording
5 - [Overview](#overview)
6 - [Building and Running](#build_and_run)
8 - [Key Structure and Classes](#key)
11 - - - - - - - - - - - - -
14 This sample demonstrates how to use libargus to set
15 up the camera
class components for a capture operation.
16 An EGLStream is also created to connect to the V4L2
17 video encoder to allow for capturing encoded video
20 <a name=
"build_and_run">
21 - - - - - - - - - - - - -
22 ## Building and Running ##
25 #### Prerequisites ####
27 * You have followed Steps 1-3 in @ref mmapi_build.
28 * If you are building from your host Linux PC (x86), you have
29 followed Step 4 in @ref mmapi_build.
35 $ cd $HOME/multimedia_api/samples/10_camera_recording
37 The sample creates the H.264 video file in the current directory.
43 $ ./camera_recording [OPTIONS]
45 ### To view supported options
47 $ ./camera_recording -h
51 - - - - - - - - - - - - - - -
53 The following diagram shows the flow of data through
this sample.
55 
57 This sample demonstrates the camera producer and consumer programming model.
58 The image output is performed
using the EGLStream.
59 This is an efficient and zero-copy output to various EGLStream consumers.
60 Possible consumers include:
64 * Direct EGL display output
68 - - - - - - - - - - - - - - -
69 ## Key Structure and Classes ##
71 The following classes are used. For more information on libargus and the EGLStream, refer to
72 the libargus documentation.
74 | Classes | Description |
75 | ------- | ----------- |
76 |
class [
NvVideoEncoder](classNvVideoEncoder.html) | The
class contains all the video encode related elements and functions. |
78 The \c %
NvVideoEncoder class packages all the video encoding related elements and functions.
79 The key members used in the sample are as follows:
82 | -------------- | ----------- |
83 | [output_plane](classNvV4l2Element.html#aaba251827cef1b23e7c42f776e95fee5) | V4L2 output plane. |
84 | [capture_plane](classNvV4l2Element.html#a91806d7ed13b4b2c48758e8a02f46c6d) | V4L2 capture plane. |
85 | [createVideoEncoder](classNvVideoEncoder.html#aabb707f9188805ab7f097f82b3648351) | Static function to create video encode object. |
86 | [setExtControls](classNvV4l2Element.html#aaec1f40b777bb98870f18766690d7984) | Sets the external control to the V4L2 device. |
87 | [setOutputPlaneFormat](classNvVideoDecoder.html#a7cacbe8afce830495c25514cbd7c8efe) | Sets the output plane format. |
88 | [setCapturePlaneFormat](classNvVideoDecoder.html#abc20773d70cfafed881238dfda6046ce) | Sets the capture plane format. |
89 | [isInError](classNvV4l2Element.html#aa60303288ff142ea08e53fa1dc7a72bf) | Checks if under an error state. |
95 The %
NvVideoEncoder object is derived from the following class type:
98 The key members used in the sample are as follows:
101 | ------------------ | ----------- |
102 | [setupPlane](classNvV4l2ElementPlane.html#a89959f455e5222f686187cc826b1b345) | Sets up the plane of the V4L2 element. |
103 | [deinitPlane](classNvV4l2ElementPlane.html#af89cfe87d8f818beb0478bcf5b72574c) | Destroys the plane of the V4L2 element. |
104 | [setStreamStatus](classNvV4l2ElementPlane.html#a03164dde4d7ab41f3e92b41e13059316) | Starts/stops the stream. |
105 | [setDQThreadCallback](classNvV4l2ElementPlane.html#a37f213325e0e4857180f5b2319317d6a) | Sets the callback function of the dqueue buffer thread. |
106 | [startDQThread](classNvV4l2ElementPlane.html#a31f77f5e5ed1f320caa44a868a7cbedd) | Starts the thread of the dqueue buffer. |
107 | [stopDQThread](classNvV4l2ElementPlane.html#aa798d14493de321fa90aeab6d944ca87) | Stops the thread of the dqueue buffer. |
108 | [qBuffer](classNvV4l2ElementPlane.html#af4d52964fcfd37082f47682e457f5e95) | Queues the V4L2 buffer. |
109 | [dqBuffer](classNvV4l2ElementPlane.html#a8dfcbc666ee6f36a02abfb1170ae05cd) | Dqueue the V4L2 buffer. |
110 | [getNumBuffers](#NvV4l2ElementPlane::getNumBuffers) | Gets the number of V4L2 buffers. |
111 | [getNthBuffer](classNvV4l2ElementPlane.html#a868d438908f3d267dd4af1033133892f) | Gets the nth number V4L2 buffer. |
Defines a helper class for operations performed on a V4L2 Element plane.
Defines a helper class for V4L2 Video Encoder.