H.264 Codec for ESP32-S3
Loading...
Searching...
No Matches
codec_api.h
Go to the documentation of this file.
1/*!
2 *@page License
3 *
4 * \copy
5 * Copyright (c) 2013, Cisco Systems
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
34
35#ifndef WELS_VIDEO_CODEC_SVC_API_H__
36#define WELS_VIDEO_CODEC_SVC_API_H__
37
38#ifndef __cplusplus
39#if defined(_MSC_VER) && (_MSC_VER < 1800)
40typedef unsigned char bool;
41#else
42#include <stdbool.h>
43#endif
44#endif
45
46#include "codec_app_def.h"
47#include "codec_def.h"
48
49#if defined(_WIN32) || defined(__cdecl)
50#define EXTAPI __cdecl
51#else
52#define EXTAPI
53#endif
54
55/**
56 * @file codec_api.h
57*/
58
59/**
60 * @page Overview
61 * * This page is for openh264 codec API usage.
62 * * For how to use the encoder,please refer to page UsageExampleForEncoder
63 * * For how to use the decoder,please refer to page UsageExampleForDecoder
64 * * For more detail about ISVEncoder,please refer to page ISVCEncoder
65 * * For more detail about ISVDecoder,please refer to page ISVCDecoder
66*/
67
68/**
69 * @page DecoderUsageExample
70 *
71 * @brief
72 * * An example for using the decoder for Decoding only or Parsing only
73 *
74 * Step 1:decoder declaration
75 * @code
76 *
77 * //decoder declaration
78 * ISVCDecoder *pSvcDecoder;
79 * //input: encoded bitstream start position; should include start code prefix
80 * unsigned char *pBuf =...;
81 * //input: encoded bit stream length; should include the size of start code prefix
82 * int32_t iSize =...;
83 * //output: [0~2] for Y,U,V buffer for Decoding only
84 * unsigned char *pData[3] =...;
85 * //in-out: for Decoding only: declare and initialize the output buffer info, this should never co-exist with Parsing only
86 * SBufferInfo sDstBufInfo;
87 * memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
88 * //in-out: for Parsing only: declare and initialize the output bitstream buffer info for parse only, this should never co-exist with Decoding only
89 * SParserBsInfo sDstParseInfo;
90 * memset(&sDstParseInfo, 0, sizeof(SParserBsInfo));
91 * sDstParseInfo.pDstBuff = new unsigned char[PARSE_SIZE]; //In Parsing only, allocate enough buffer to save transcoded bitstream for a frame
92 *
93 * @endcode
94 *
95 * Step 2:decoder creation
96 * @code
97 * WelsCreateDecoder(&pSvcDecoder);
98 * @endcode
99 *
100 * Step 3:declare required parameter, used to differentiate Decoding only and Parsing only
101 * @code
102 * SDecodingParam sDecParam = {0};
103 * sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC;
104 * //for Parsing only, the assignment is mandatory
105 * sDecParam.bParseOnly = true;
106 * @endcode
107 *
108 * Step 4:initialize the parameter and decoder context, allocate memory
109 * @code
110 * pSvcDecoder->Initialize(&sDecParam);
111 * @endcode
112 *
113 * Step 5:do actual decoding process in slice level;
114 * this can be done in a loop until data ends
115 * @code
116 * //for Decoding only
117 * iRet = pSvcDecoder->DecodeFrameNoDelay(pBuf, iSize, pData, &sDstBufInfo);
118 * //or
119 * iRet = pSvcDecoder->DecodeFrame2(pBuf, iSize, pData, &sDstBufInfo);
120 * //for Parsing only
121 * iRet = pSvcDecoder->DecodeParser(pBuf, iSize, &sDstParseInfo);
122 * //decode failed
123 * If (iRet != 0){
124 * //error handling (RequestIDR or something like that)
125 * }
126 * //for Decoding only, pData can be used for render.
127 * if (sDstBufInfo.iBufferStatus==1){
128 * //output handling (pData[0], pData[1], pData[2])
129 * }
130 * //for Parsing only, sDstParseInfo can be used for, e.g., HW decoding
131 * if (sDstBufInfo.iNalNum > 0){
132 * //Hardware decoding sDstParseInfo;
133 * }
134 * //no-delay decoding can be realized by directly calling DecodeFrameNoDelay(), which is the recommended usage.
135 * //no-delay decoding can also be realized by directly calling DecodeFrame2() again with NULL input, as in the following. In this case, decoder would immediately reconstruct the input data. This can also be used similarly for Parsing only. Consequent decoding error and output indication should also be considered as above.
136 * iRet = pSvcDecoder->DecodeFrame2(NULL, 0, pData, &sDstBufInfo);
137 * //judge iRet, sDstBufInfo.iBufferStatus ...
138 * @endcode
139 *
140 * Step 6:uninitialize the decoder and memory free
141 * @code
142 * pSvcDecoder->Uninitialize();
143 * @endcode
144 *
145 * Step 7:destroy the decoder
146 * @code
147 * DestroyDecoder(pSvcDecoder);
148 * @endcode
149 *
150*/
151
152/**
153 * @page EncoderUsageExample1
154 *
155 * @brief
156 * * An example for using encoder with basic parameter
157 *
158 * Step1:setup encoder
159 * @code
160 * ISVCEncoder* encoder_;
161 * int32_t rv = WelsCreateSVCEncoder (&encoder_);
162 * assert (rv == 0);
163 * assert (encoder_ != NULL);
164 * @endcode
165 *
166 * Step2:initilize with basic parameter
167 * @code
168 * SEncParamBase param;
169 * memset (&param, 0, sizeof (SEncParamBase));
170 * param.iUsageType = usageType; //from EUsageType enum
171 * param.fMaxFrameRate = frameRate;
172 * param.iPicWidth = width;
173 * param.iPicHeight = height;
174 * param.iTargetBitrate = 5000000;
175 * encoder_->Initialize (&param);
176 * @endcode
177 *
178 * Step3:set option, set option during encoding process
179 * @code
180 * encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &g_LevelSetting);
181 * int32_t videoFormat = videoFormatI420;
182 * encoder_->SetOption (ENCODER_OPTION_DATAFORMAT, &videoFormat);
183 * @endcode
184 *
185 * Step4: encode and store ouput bistream
186 * @code
187 * int32_t frameSize = width * height * 3 / 2;
188 * BufferedData buf;
189 * buf.SetLength (frameSize);
190 * assert (buf.Length() == (size_t)frameSize);
191 * SFrameBSInfo info;
192 * memset (&info, 0, sizeof (SFrameBSInfo));
193 * SSourcePicture pic;
194 * memset (&pic, 0, sizeof (SsourcePicture));
195 * pic.iPicWidth = width;
196 * pic.iPicHeight = height;
197 * pic.iColorFormat = videoFormatI420;
198 * pic.iStride[0] = pic.iPicWidth;
199 * pic.iStride[1] = pic.iStride[2] = pic.iPicWidth >> 1;
200 * pic.pData[0] = buf.data();
201 * pic.pData[1] = pic.pData[0] + width * height;
202 * pic.pData[2] = pic.pData[1] + (width * height >> 2);
203 * for(int32_t num = 0;num<total_num;num++) {
204 * //prepare input data
205 * rv = encoder_->EncodeFrame (&pic, &info);
206 * assert (rv == cmResultSuccess);
207 * if (info.eFrameType != videoFrameTypeSKIP) {
208 * //output bitstream handling
209 * }
210 * }
211 * @endcode
212 *
213 * Step5:teardown encoder
214 * @code
215 * if (encoder_) {
216 * encoder_->Uninitialize();
217 * WelsDestroySVCEncoder (encoder_);
218 * }
219 * @endcode
220 *
221 */
222
223/**
224 * @page EncoderUsageExample2
225 *
226 * @brief
227 * * An example for using the encoder with extension parameter.
228 * * The same operation on Step 1,3,4,5 with Example-1
229 *
230 * Step 2:initialize with extension parameter
231 * @code
232 * SEncParamExt param;
233 * encoder_->GetDefaultParams (&param);
234 * param.iUsageType = usageType;
235 * param.fMaxFrameRate = frameRate;
236 * param.iPicWidth = width;
237 * param.iPicHeight = height;
238 * param.iTargetBitrate = 5000000;
239 * param.bEnableDenoise = denoise;
240 * param.iSpatialLayerNum = layers;
241 * //SM_DYN_SLICE don't support multi-thread now
242 * if (sliceMode != SM_SINGLE_SLICE && sliceMode != SM_DYN_SLICE)
243 * param.iMultipleThreadIdc = 2;
244 *
245 * for (int32_t i = 0; i < param.iSpatialLayerNum; i++) {
246 * param.sSpatialLayers[i].iVideoWidth = width >> (param.iSpatialLayerNum - 1 - i);
247 * param.sSpatialLayers[i].iVideoHeight = height >> (param.iSpatialLayerNum - 1 - i);
248 * param.sSpatialLayers[i].fFrameRate = frameRate;
249 * param.sSpatialLayers[i].iSpatialBitrate = param.iTargetBitrate;
250 *
251 * param.sSpatialLayers[i].sSliceCfg.uiSliceMode = sliceMode;
252 * if (sliceMode == SM_DYN_SLICE) {
253 * param.sSpatialLayers[i].sSliceCfg.sSliceArgument.uiSliceSizeConstraint = 600;
254 * param.uiMaxNalSize = 1500;
255 * }
256 * }
257 * param.iTargetBitrate *= param.iSpatialLayerNum;
258 * encoder_->InitializeExt (&param);
259 * int32_t videoFormat = videoFormatI420;
260 * encoder_->SetOption (ENCODER_OPTION_DATAFORMAT, &videoFormat);
261 *
262 * @endcode
263 */
264
265#ifdef __cplusplus
266/**
267* @brief Endocder definition
268*/
269class ISVCEncoder {
270public:
271 /**
272 * @brief Initialize the encoder
273 * @param pParam basic encoder parameter
274 * @return CM_RETURN: 0 - success; otherwise - failed;
275 */
276 virtual int32_t EXTAPI Initialize (const SEncParamBase *pParam) = 0;
277
278 /**
279 * @brief Initilaize encoder by using extension parameters.
280 * @param pParam extension parameter for encoder
281 * @return CM_RETURN: 0 - success; otherwise - failed;
282 */
283 virtual int32_t EXTAPI InitializeExt (const SEncParamExt *pParam) = 0;
284
285 /**
286 * @brief Get the default extension parameters.
287 * If you want to change some parameters of encoder, firstly you need to get the default encoding parameters,
288 * after that you can change part of parameters you want to.
289 * @param pParam extension parameter for encoder
290 * @return CM_RETURN: 0 - success; otherwise - failed;
291 * */
292 virtual int32_t EXTAPI GetDefaultParams (SEncParamExt *pParam) = 0;
293 /// uninitialize the encoder
294 virtual int32_t EXTAPI Uninitialize() = 0;
295
296 /**
297 * @brief Encode one frame
298 * @param kpSrcPic the pointer to the source luminance plane
299 * chrominance data:
300 * CbData = kpSrc + m_iMaxPicWidth * m_iMaxPicHeight;
301 * CrData = CbData + (m_iMaxPicWidth * m_iMaxPicHeight)/4;
302 * the application calling this interface needs to ensure the data validation between the location
303 * @param pBsInfo output bit stream
304 * @return 0 - success; otherwise -failed;
305 */
306 virtual int32_t EXTAPI EncodeFrame (const SSourcePicture *kpSrcPic, SFrameBSInfo *pBsInfo) = 0;
307
308 /**
309 * @brief Encode the parameters from output bit stream
310 * @param pBsInfo output bit stream
311 * @return 0 - success; otherwise - failed;
312 */
313 virtual int32_t EXTAPI EncodeParameterSets (SFrameBSInfo *pBsInfo) = 0;
314
315 /**
316 * @brief Force encoder to encoder frame as IDR if bIDR set as true
317 * @param bIDR true: force encoder to encode frame as IDR frame;false, return 1 and nothing to do
318 * @return 0 - success; otherwise - failed;
319 */
320 virtual int32_t EXTAPI ForceIntraFrame (bool bIDR, int32_t iLayerId = -1) = 0;
321
322 /**
323 * @brief Set option for encoder, detail option type, please refer to enumurate ENCODER_OPTION.
324 * @param pOption option for encoder such as InDataFormat, IDRInterval, SVC Encode Param, Frame Rate, Bitrate,...
325 * @return CM_RETURN: 0 - success; otherwise - failed;
326 */
327 virtual int32_t EXTAPI SetOption (ENCODER_OPTION eOptionId, void *pOption) = 0;
328
329 /**
330 * @brief Get option for encoder, detail option type, please refer to enumurate ENCODER_OPTION.
331 * @param pOption option for encoder such as InDataFormat, IDRInterval, SVC Encode Param, Frame Rate, Bitrate,...
332 * @return CM_RETURN: 0 - success; otherwise - failed;
333 */
334 virtual int32_t EXTAPI GetOption (ENCODER_OPTION eOptionId, void *pOption) = 0;
335 virtual ~ISVCEncoder() {}
336};
337
338
339
340/**
341* @brief Decoder definition
342*/
343class ISVCDecoder {
344public:
345
346 /**
347 * @brief Initilaize decoder
348 * @param pParam parameter for decoder
349 * @return 0 - success; otherwise - failed;
350 */
351 virtual long EXTAPI Initialize (const SDecodingParam *pParam) = 0;
352
353 /// Uninitialize the decoder
354 virtual long EXTAPI Uninitialize() = 0;
355
356 /**
357 * @brief Decode one frame
358 * @param pSrc the h264 stream to be decoded
359 * @param iSrcLen the length of h264 stream
360 * @param ppDst buffer pointer of decoded data (YUV)
361 * @param pStride output stride
362 * @param iWidth output width
363 * @param iHeight output height
364 * @return 0 - success; otherwise -failed;
365 */
366 virtual DECODING_STATE EXTAPI DecodeFrame (const unsigned char *pSrc,
367 const int32_t iSrcLen,
368 unsigned char **ppDst,
369 int32_t *pStride,
370 int32_t &iWidth,
371 int32_t &iHeight) = 0;
372
373 /**
374 * @brief For slice level DecodeFrameNoDelay() (4 parameters input),
375 * whatever the function return value is, the output data
376 * of I420 format will only be available when pDstInfo->iBufferStatus == 1,.
377 * This function will parse and reconstruct the input frame immediately if it is complete
378 * It is recommended as the main decoding function for H.264/AVC format input
379 * @param pSrc the h264 stream to be decoded
380 * @param iSrcLen the length of h264 stream
381 * @param ppDst buffer pointer of decoded data (YUV)
382 * @param pDstInfo information provided to API(width, height, etc.)
383 * @return 0 - success; otherwise -failed;
384 */
385 virtual DECODING_STATE EXTAPI DecodeFrameNoDelay (const unsigned char *pSrc,
386 const int32_t iSrcLen,
387 unsigned char **ppDst,
388 SBufferInfo *pDstInfo) = 0;
389
390 /**
391 * @brief For slice level DecodeFrame2() (4 parameters input),
392 * whatever the function return value is, the output data
393 * of I420 format will only be available when pDstInfo->iBufferStatus == 1,.
394 * (e.g., in multi-slice cases, only when the whole picture
395 * is completely reconstructed, this variable would be set equal to 1.)
396 * @param pSrc the h264 stream to be decoded
397 * @param iSrcLen the length of h264 stream
398 * @param ppDst buffer pointer of decoded data (YUV)
399 * @param pDstInfo information provided to API(width, height, etc.)
400 * @return 0 - success; otherwise -failed;
401 */
402 virtual DECODING_STATE EXTAPI DecodeFrame2 (const unsigned char *pSrc,
403 const int32_t iSrcLen,
404 unsigned char **ppDst,
405 SBufferInfo *pDstInfo) = 0;
406
407
408 /**
409 * @brief This function gets a decoded ready frame remaining in buffers after the last frame has been decoded.
410 * Use GetOption with option DECODER_OPTION_NUM_OF_FRAMES_REMAINING_IN_BUFFER to get the number of frames remaining in buffers.
411 * Note that it is only applicable for profile_idc != 66
412 * @param ppDst buffer pointer of decoded data (YUV)
413 * @param pDstInfo information provided to API(width, height, etc.)
414 * @return 0 - success; otherwise -failed;
415 */
416 virtual DECODING_STATE EXTAPI FlushFrame (unsigned char **ppDst,
417 SBufferInfo *pDstInfo) = 0;
418
419 /**
420 * @brief This function parse input bitstream only, and rewrite possible SVC syntax to AVC syntax
421 * @param pSrc the h264 stream to be decoded
422 * @param iSrcLen the length of h264 stream
423 * @param pDstInfo bit stream info
424 * @return 0 - success; otherwise -failed;
425 */
426 virtual DECODING_STATE EXTAPI DecodeParser (const unsigned char *pSrc,
427 const int32_t iSrcLen,
428 SParserBsInfo *pDstInfo) = 0;
429
430 /**
431 * @brief This API does not work for now!! This is for future use to support non-I420 color format output.
432 * @param pSrc the h264 stream to be decoded
433 * @param iSrcLen the length of h264 stream
434 * @param pDst buffer pointer of decoded data (YUV)
435 * @param iDstStride output stride
436 * @param iDstLen bit stream info
437 * @param iWidth output width
438 * @param iHeight output height
439 * @param iColorFormat output color format
440 * @return to do ...
441 */
442 virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char *pSrc,
443 const int32_t iSrcLen,
444 unsigned char *pDst,
445 int32_t iDstStride,
446 int32_t &iDstLen,
447 int32_t &iWidth,
448 int32_t &iHeight,
449 int32_t &iColorFormat) = 0;
450
451 /**
452 * @brief Set option for decoder, detail option type, please refer to enumurate DECODER_OPTION.
453 * @param pOption option for decoder such as OutDataFormat, Eos Flag, EC method, ...
454 * @return CM_RETURN: 0 - success; otherwise - failed;
455 */
456 virtual long EXTAPI SetOption (DECODER_OPTION eOptionId, void *pOption) = 0;
457
458 /**
459 * @brief Get option for decoder, detail option type, please refer to enumurate DECODER_OPTION.
460 * @param pOption option for decoder such as OutDataFormat, Eos Flag, EC method, ...
461 * @return CM_RETURN: 0 - success; otherwise - failed;
462 */
463 virtual long EXTAPI GetOption (DECODER_OPTION eOptionId, void *pOption) = 0;
464 virtual ~ISVCDecoder() {}
465};
466
467
468extern "C"
469{
470#else
471
472typedef struct ISVCEncoderVtbl ISVCEncoderVtbl;
473typedef const ISVCEncoderVtbl *ISVCEncoder;
474struct ISVCEncoderVtbl {
475
476int32_t (*Initialize) (ISVCEncoder *, const SEncParamBase *pParam);
477int32_t (*InitializeExt) (ISVCEncoder *, const SEncParamExt *pParam);
478
479int32_t (*GetDefaultParams) (ISVCEncoder *, SEncParamExt *pParam);
480
481int32_t (*Uninitialize) (ISVCEncoder *);
482
483int32_t (*EncodeFrame) (ISVCEncoder *, const SSourcePicture *kpSrcPic, SFrameBSInfo *pBsInfo);
484int32_t (*EncodeParameterSets) (ISVCEncoder *, SFrameBSInfo *pBsInfo);
485
486int32_t (*ForceIntraFrame) (ISVCEncoder *, bool bIDR);
487
488int32_t (*SetOption) (ISVCEncoder *, ENCODER_OPTION eOptionId, void *pOption);
489int32_t (*GetOption) (ISVCEncoder *, ENCODER_OPTION eOptionId, void *pOption);
490};
491
492typedef struct ISVCDecoderVtbl ISVCDecoderVtbl;
493typedef const ISVCDecoderVtbl *ISVCDecoder;
494struct ISVCDecoderVtbl {
495long (*Initialize) (ISVCDecoder *, const SDecodingParam *pParam);
496long (*Uninitialize) (ISVCDecoder *);
497
498DECODING_STATE (*DecodeFrame) (ISVCDecoder *, const unsigned char *pSrc,
499 const int32_t iSrcLen,
500 unsigned char **ppDst,
501 int32_t *pStride,
502 int32_t *iWidth,
503 int32_t *iHeight);
504
505DECODING_STATE (*DecodeFrameNoDelay) (ISVCDecoder *, const unsigned char *pSrc,
506 const int32_t iSrcLen,
507 unsigned char **ppDst,
508 SBufferInfo *pDstInfo);
509
510DECODING_STATE (*DecodeFrame2) (ISVCDecoder *, const unsigned char *pSrc,
511 const int32_t iSrcLen,
512 unsigned char **ppDst,
513 SBufferInfo *pDstInfo);
514
515DECODING_STATE (*FlushFrame) (ISVCDecoder *, unsigned char **ppDst,
516 SBufferInfo *pDstInfo);
517
518DECODING_STATE (*DecodeParser) (ISVCDecoder *, const unsigned char *pSrc,
519 const int32_t iSrcLen,
520 SParserBsInfo *pDstInfo);
521
522DECODING_STATE (*DecodeFrameEx) (ISVCDecoder *, const unsigned char *pSrc,
523 const int32_t iSrcLen,
524 unsigned char *pDst,
525 int32_t iDstStride,
526 int32_t *iDstLen,
527 int32_t *iWidth,
528 int32_t *iHeight,
529 int32_t *iColorFormat);
530
531long (*SetOption) (ISVCDecoder *, DECODER_OPTION eOptionId, void *pOption);
532long (*GetOption) (ISVCDecoder *, DECODER_OPTION eOptionId, void *pOption);
533};
534#endif
535
536typedef void (*WelsTraceCallback) (void *ctx, int32_t level, const char *string);
537
538/** @brief Create encoder
539 * @param ppEncoder encoder
540 * @return 0 - success; otherwise - failed;
541*/
542int32_t WelsCreateSVCEncoder (ISVCEncoder **ppEncoder);
543
544
545/** @brief Destroy encoder
546* @param pEncoder encoder
547 * @return void
548*/
549void WelsDestroySVCEncoder (ISVCEncoder *pEncoder);
550
551
552/** @brief Get the capability of decoder
553 * @param pDecCapability decoder capability
554 * @return 0 - success; otherwise - failed;
555*/
556int32_t WelsGetDecoderCapability (SDecoderCapability *pDecCapability);
557
558
559/** @brief Create decoder
560 * @param ppDecoder decoder
561 * @return 0 - success; otherwise - failed;
562*/
563long WelsCreateDecoder (ISVCDecoder **ppDecoder);
564
565
566/** @brief Destroy decoder
567 * @param pDecoder decoder
568 * @return void
569*/
570void WelsDestroyDecoder (ISVCDecoder *pDecoder);
571
572/** @brief Get codec version
573 * Note, old versions of Mingw (GCC < 4.7) are buggy and use an
574 * incorrect/different ABI for calling this function, making it
575 * incompatible with MSVC builds.
576 * @return The linked codec version
577*/
578OpenH264Version WelsGetCodecVersion (void);
579
580/** @brief Get codec version
581 * @param pVersion struct to fill in with the version
582*/
583void WelsGetCodecVersionEx (OpenH264Version *pVersion);
584
585const char *esp_openh264_get_version(void);
586
587#ifdef __cplusplus
588}
589#endif
590
591#endif//WELS_VIDEO_CODEC_SVC_API_H__
int32_t WelsCreateSVCEncoder(ISVCEncoder **ppEncoder)
Create encoder.
void(* WelsTraceCallback)(void *ctx, int32_t level, const char *string)
Definition: codec_api.h:536
long WelsCreateDecoder(ISVCDecoder **ppDecoder)
Create decoder.
const char * esp_openh264_get_version(void)
int32_t WelsGetDecoderCapability(SDecoderCapability *pDecCapability)
Get the capability of decoder.
void WelsDestroySVCEncoder(ISVCEncoder *pEncoder)
Destroy encoder.
OpenH264Version WelsGetCodecVersion(void)
Get codec version Note, old versions of Mingw (GCC < 4.7) are buggy and use an incorrect/different AB...
void WelsGetCodecVersionEx(OpenH264Version *pVersion)
Get codec version.
#define EXTAPI
Definition: codec_api.h:52
void WelsDestroyDecoder(ISVCDecoder *pDecoder)
Destroy decoder.