L4T Multimedia API Reference

27.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 
121  int disableDPB();
122 
135  int getMinimumCapturePlaneBuffers(int & num);
136 
149  int setSkipFrames(enum v4l2_skip_frames_type skip_frames);
150 
161 
177  int getMetadata(uint32_t buffer_index,
179 
180 private:
184  NvVideoDecoder(const char *name, int flags);
185 
186  static const NvElementProfiler::ProfilerField valid_fields =
187  NvElementProfiler::PROFILER_FIELD_TOTAL_UNITS |
188  NvElementProfiler::PROFILER_FIELD_FPS;
189 };
191 #endif
static NvVideoDecoder * createVideoDecoder(const char *name, int flags=0)
Creates a new V4L2 Video Decoder object named name.
NVIDIA Multimedia API: V4L2 Helper Class
Defines a helper class for V4L2 based components.
Definition: NvV4l2Element.h:65
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.
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.
v4l2_skip_frames_type
Enum v4l2_skip_frames_type, possible methods for decoder skip frames.
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.