rocprofiler-sdk/rocdecode/api_args.h Source File

rocprofiler-sdk/rocdecode/api_args.h Source File#

Rocprofiler SDK Developer API: rocprofiler-sdk/rocdecode/api_args.h Source File
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
api_args.h
Go to the documentation of this file.
1// MIT License
2//
3// Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
4//
5// Permission is hereby granted, free of charge, to any person obtaining a copy
6// of this software and associated documentation files (the "Software"), to deal
7// in the Software without restriction, including without limitation the rights
8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9// copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21// THE SOFTWARE.
22
23#pragma once
24
26#include <rocprofiler-sdk/version.h>
27
28#if !defined(ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE)
29# if defined __has_include
30# if __has_include(<rocdecode/rocparser.h>) && __has_include(<rocdecode/rocdecode.h>) && __has_include(<rocdecode/roc_bitstream_reader.h>)
31# define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE 1
32# else
33# define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE 0
34# endif
35# else
36# define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE 0
37# endif
38#endif
39
40#if ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE > 0
41# include <rocdecode/roc_bitstream_reader.h>
42# include <rocdecode/rocdecode.h>
43# include <rocdecode/rocparser.h>
44#else
48#endif
49
50#include <stdint.h>
51
52ROCPROFILER_EXTERN_C_INIT
53
54// Empty struct has a size of 0 in C but size of 1 in C++.
55// This struct is added to the union members which represent
56// functions with no arguments to ensure ABI compatibility
61
67
69{
70 struct
71 {
72 RocdecVideoParser* parser_handle;
73 RocdecParserParams* params;
75
76 struct
77 {
78 RocdecVideoParser parser_handle;
81
82 struct
83 {
84 RocdecVideoParser parser_handle;
86
87 struct
88 {
89 rocDecDecoderHandle* decoder_handle;
90 RocDecoderCreateInfo* decoder_create_info;
92
93 struct
94 {
95 rocDecDecoderHandle decoder_handle;
97
98 struct
99 {
100 RocdecDecodeCaps* decode_caps;
102
103 struct
104 {
105 rocDecDecoderHandle decoder_handle;
106 RocdecPicParams* pic_params;
108
109 struct
110 {
111 rocDecDecoderHandle decoder_handle;
112 int pic_idx;
113 RocdecDecodeStatus* decode_status;
115
116 struct
117 {
118 rocDecDecoderHandle decoder_handle;
119 RocdecReconfigureDecoderInfo* reconfig_params;
121
122 struct
123 {
124 rocDecDecoderHandle decoder_handle;
125 int pic_idx;
126 void** dev_mem_ptr;
127 uint32_t* horizontal_pitch;
128 RocdecProcParams* vid_postproc_params;
130 struct
131 {
132 rocDecStatus rocdec_status;
134
135#if ROCDECODE_RUNTIME_API_TABLE_STEP_VERSION >= 1
136 struct
137 {
138 RocdecBitstreamReader* bs_reader_handle;
139 const char* input_file_path;
141 struct
142 {
143 RocdecBitstreamReader bs_reader_handle;
144 rocDecVideoCodec* codec_type;
146 struct
147 {
148 RocdecBitstreamReader bs_reader_handle;
149 int* bit_depth;
151 struct
152 {
153 RocdecBitstreamReader bs_reader_handle;
154 uint8_t** pic_data;
155 int* pic_size;
156 int64_t* pts;
158 struct
159 {
160 RocdecBitstreamReader bs_reader_handle;
162#endif
164
165ROCPROFILER_EXTERN_C_FINI
This structure is used in rocDecCreateDecoder API.
Definition rocdecode.h:206
This structure is used in rocDecGetDecoderCaps API.
Definition rocdecode.h:182
Struct for reporting decode status. This structure is used in RocdecGetDecodeStatus API.
Definition rocdecode.h:257
Picture parameters for postprocessing This structure is used in rocDecGetVideoFrame API.
Definition rocdecode.h:1781
Struct for decoder reset This structure is used in rocDecReconfigureDecoder() API.
Definition rocdecode.h:270
The AMD rocDecode library.\Used in rocDecCreateVideoParser API.
Definition rocparser.h:283
Data Packet Used in rocDecParseVideoData API IN for rocDecParseVideoData.
Definition rocparser.h:185
The AMD rocBitstreamReader Library.
rocDecStatus ROCDECAPI rocDecGetBitstreamCodecType(RocdecBitstreamReader bs_reader_handle, rocDecVideoCodec *codec_type)
rocDecStatus ROCDECAPI rocDecGetBitstreamPicData(RocdecBitstreamReader bs_reader_handle, uint8_t **pic_data, int *pic_size, int64_t *pts)
rocDecStatus ROCDECAPI rocDecGetBitstreamBitDepth(RocdecBitstreamReader bs_reader_handle, int *bit_depth)
rocDecStatus ROCDECAPI rocDecCreateBitstreamReader(RocdecBitstreamReader *bs_reader_handle, const char *input_file_path)
void * RocdecBitstreamReader
HANDLE of rocBitstreamReader Used in subsequent API calls after rocDecCreateBitstreamReader.
rocDecStatus ROCDECAPI rocDecDestroyBitstreamReader(RocdecBitstreamReader bs_reader_handle)
struct rocprofiler_rocdecode_api_args_t::@763 rocDecReconfigureDecoder
struct rocprofiler_rocdecode_api_args_t::@758 rocDecCreateDecoder
struct rocprofiler_rocdecode_api_args_t::@755 rocDecCreateVideoParser
struct rocprofiler_rocdecode_api_args_t::@761 rocDecDecodeFrame
struct rocprofiler_rocdecode_api_args_t::@760 rocDecGetDecoderCaps
struct rocprofiler_rocdecode_api_args_t::@759 rocDecDestroyDecoder
struct rocprofiler_rocdecode_api_args_t::@757 rocDecDestroyVideoParser
struct rocprofiler_rocdecode_api_args_t::@764 rocDecGetVideoFrame
struct rocprofiler_rocdecode_api_args_t::@756 rocDecParseVideoData
struct rocprofiler_rocdecode_api_args_t::@765 rocDecGetErrorName
struct rocprofiler_rocdecode_api_args_t::@762 rocDecGetDecodeStatus
The AMD rocDecode Library.
rocDecStatus
Definition rocdecode.h:78
rocDecVideoCodec
Definition rocdecode.h:97
void * rocDecDecoderHandle
HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder.
Definition rocdecode.h:69
The AMD rocParser Library.
void * RocdecVideoParser
HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder.
Definition rocparser.h:62