L4T Multimedia API Reference

32.3.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NvVideoDecoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of NVIDIA CORPORATION nor the names of its
13  * contributors may be used to endorse or promote products derived
14  * from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
45 #ifndef __NV_VIDEO_DECODER_H__
46 #define __NV_VIDEO_DECODER_H__
47 
48 #include "NvV4l2Element.h"
49 
59 {
60 public:
75  static NvVideoDecoder *createVideoDecoder(const char *name, int flags = 0);
76 
88  int setCapturePlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height);
99  int setOutputPlaneFormat(uint32_t pixfmt, uint32_t sizeimage);
100 
111 
122  int setFrameInputMode(unsigned int ctrl_value);
123 
133  int disableDPB();
134 
147  int getMinimumCapturePlaneBuffers(int & num);
148 
161  int setSkipFrames(enum v4l2_skip_frames_type skip_frames);
162 
175  int setMaxPerfMode(int flag);
176 
187 
190 
206  int getMetadata(uint32_t buffer_index,
208 
224  int getInputMetadata(uint32_t buffer_index,
225  v4l2_ctrl_videodec_inputbuf_metadata &input_metadata);
226 
233  int DevicePoll(v4l2_ctrl_video_device_poll *devicepoll);
234 
239  int SetPollInterrupt();
240 
245  int ClearPollInterrupt();
246 
247 private:
251  NvVideoDecoder(const char *name, int flags);
252 
253  static const NvElementProfiler::ProfilerField valid_fields =
256 };
258 #endif
int setMaxPerfMode(int flag)
Sets the decoder for maximum performance.
static NvVideoDecoder * createVideoDecoder(const char *name, int flags=0)
Creates a new V4L2 Video Decoder object named name.
int DevicePoll(v4l2_ctrl_video_device_poll *devicepoll)
Issues Poll on the device which blocks until : a) Either there is something to dequeue from capture o...
int getInputMetadata(uint32_t buffer_index, v4l2_ctrl_videodec_inputbuf_metadata &input_metadata)
Gets metadata for the decoder output plane buffer.
NVIDIA Multimedia API: V4L2 Helper Class
Defines a helper class for V4L2 based components.
Definition: NvV4l2Element.h:65
int setFrameInputMode(unsigned int ctrl_value)
Informs the decoder that input buffers may not contain complete frames.
Holds the video decoder input header error metadata for a frame.
Defines a helper class for V4L2 Video Decoder.
int setSkipFrames(enum v4l2_skip_frames_type skip_frames)
Sets the skip-frames parameter of the decoder.
static const ProfilerField PROFILER_FIELD_FPS
int getMetadata(uint32_t buffer_index, v4l2_ctrl_videodec_outputbuf_metadata &metadata)
Gets metadata for the decoded capture plane buffer.
int disableDPB()
Disables the display picture buffer.
int MasteringDisplayData(v4l2_ctrl_video_hdrmasteringdisplaydata *hdrmasteringdisplaydata)
static const ProfilerField PROFILER_FIELD_TOTAL_UNITS
int SetPollInterrupt()
Sets the polling interrupt, now if the application calls Poll, the device should not block...
v4l2_skip_frames_type
Enum v4l2_skip_frames_type, possible methods for decoder skip frames.
int checkifMasteringDisplayDataPresent(v4l2_ctrl_video_displaydata &displaydata)
int ClearPollInterrupt()
Clears the polling interrupt, now if the application calls Poll, the device should block until the ev...
int setOutputPlaneFormat(uint32_t pixfmt, uint32_t sizeimage)
Sets the format on the decoder output plane.
int setCapturePlaneFormat(uint32_t pixfmt, uint32_t width, uint32_t height)
Sets the format on the decoder output plane.
Holds the video decoder output metadata for a frame.
int getMinimumCapturePlaneBuffers(int &num)
Gets the minimum number of buffers to be requested on the decoder capture plane.
int disableCompleteFrameInputBuffer()
Informs the decoder that input buffers may not contain complete frames.
int enableMetadataReporting()
Enables video decoder output metadata reporting.