libxcoder  3.5.1
ni_dec_api_logan.h File Reference
#include <errno.h>
#include <stddef.h>
#include "ni_defs_logan.h"
#include "ni_rsrc_api_logan.h"
#include "ni_util_logan.h"
#include "ni_device_api_logan.h"
#include "ni_av_codec_logan.h"

Go to the source code of this file.

Data Structures

struct  _ni_logan_dec_context_t
 

Macros

#define NI_LOGAN_NAL_VPS_BIT   (0x01)
 
#define NI_LOGAN_NAL_SPS_BIT   (0x01<<1)
 
#define NI_LOGAN_NAL_PPS_BIT   (0x01<<2)
 
#define NI_LOGAN_GENERATE_ALL_NAL_HEADER_BIT   (0x01<<3)
 

Typedefs

typedef struct _ni_logan_dec_context_t ni_logan_dec_context_t
 

Enumerations

enum  { NI_LOGAN_DECODE_FLUSH_STATUS_OFF = 0 , NI_LOGAN_DECODE_FLUSH_STATUS_START = 1 , NI_LOGAN_DECODE_FLUSH_STATUS_FLUSHING = 2 }
 

Functions

LIB_API int ni_logan_dec_init (ni_logan_dec_context_t *ni_dec_ctx)
 Initialize decode parameters and open decoder device including ni_logan_dec_context_t, ni_logan_session_context_t, ni_logan_decoder_params_t. More...
 
LIB_API int ni_logan_setup_decoder (ni_logan_dec_context_t *ni_dec_ctx)
 Initialize init device session_context and init default params including ni_logan_dec_context_t, ni_logan_session_context_t, ni_logan_decoder_params_t. More...
 
LIB_API int ni_logan_dec_send (ni_logan_dec_context_t *ni_dec_ctx, uint8_t *pkt_data, int pkt_size, int pkt_flags, long long pkt_pts, long long pkt_dts, int avctx_width, int avctx_height, uint8_t *extradata, int extradata_size)
 Parse the packet and send the packet to decode device. More...
 
LIB_API int ni_logan_dec_is_flushing (ni_logan_dec_context_t *ni_dec_ctx)
 Decode is flushing or not, including ni_logan_dec_context_t,. More...
 
LIB_API int ni_logan_dec_receive (ni_logan_dec_context_t *ni_dec_ctx, ni_logan_session_data_io_t *p_session_data, int avctx_width, int avctx_height)
 Receive decoded data from decoder, including ni_logan_dec_context_t,. More...
 
LIB_API void ni_logan_dec_close (ni_logan_dec_context_t *ni_dec_ctx)
 Decode close, including ni_logan_dec_context_t,. More...
 
LIB_API void ni_logan_buf_pool_free (void *opaque, uint8_t *data)
 decoder frame buffer pool free, including void* More...
 
LIB_API void ni_logan_decode_flush_buffers (ni_logan_dec_context_t *ni_dec_ctx)
 decoder flush buffers More...
 

Macro Definition Documentation

◆ NI_LOGAN_GENERATE_ALL_NAL_HEADER_BIT

#define NI_LOGAN_GENERATE_ALL_NAL_HEADER_BIT   (0x01<<3)

Definition at line 17 of file ni_dec_api_logan.h.

◆ NI_LOGAN_NAL_PPS_BIT

#define NI_LOGAN_NAL_PPS_BIT   (0x01<<2)

Definition at line 16 of file ni_dec_api_logan.h.

◆ NI_LOGAN_NAL_SPS_BIT

#define NI_LOGAN_NAL_SPS_BIT   (0x01<<1)

Definition at line 15 of file ni_dec_api_logan.h.

◆ NI_LOGAN_NAL_VPS_BIT

#define NI_LOGAN_NAL_VPS_BIT   (0x01)

Definition at line 14 of file ni_dec_api_logan.h.

Typedef Documentation

◆ ni_logan_dec_context_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NI_LOGAN_DECODE_FLUSH_STATUS_OFF 
NI_LOGAN_DECODE_FLUSH_STATUS_START 
NI_LOGAN_DECODE_FLUSH_STATUS_FLUSHING 

Definition at line 19 of file ni_dec_api_logan.h.

Function Documentation

◆ ni_logan_buf_pool_free()

LIB_API void ni_logan_buf_pool_free ( void *  opaque,
uint8_t *  data 
)

decoder frame buffer pool free, including void*


Parameters
[in]opaqueparameter to be got for processing or passed to free
[in]datadata array

Definition at line 32 of file ni_dec_api_logan.c.

◆ ni_logan_dec_close()

LIB_API void ni_logan_dec_close ( ni_logan_dec_context_t ni_dec_ctx)

Decode close, including ni_logan_dec_context_t,.


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t

Definition at line 76 of file ni_dec_api_logan.c.

◆ ni_logan_dec_init()

LIB_API int ni_logan_dec_init ( ni_logan_dec_context_t ni_dec_ctx)

Initialize decode parameters and open decoder device including ni_logan_dec_context_t, ni_logan_session_context_t, ni_logan_decoder_params_t.


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t
Returns
On success NI_LOGAN_RETCODE_SUCCESS On failure NI_LOGAN_RETCODE_FAILURE NI_LOGAN_RETCODE_INVALID_PARAM, NI_LOGAN_RETCODE_ERROR_MEM_ALOC, etc

Definition at line 239 of file ni_dec_api_logan.c.

◆ ni_logan_dec_is_flushing()

LIB_API int ni_logan_dec_is_flushing ( ni_logan_dec_context_t ni_dec_ctx)

Decode is flushing or not, including ni_logan_dec_context_t,.


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t
Returns
On 1 HW dosn't do decode flushing On 0 HW is doing decode flushing

Definition at line 1143 of file ni_dec_api_logan.c.

◆ ni_logan_dec_receive()

LIB_API int ni_logan_dec_receive ( ni_logan_dec_context_t ni_dec_ctx,
ni_logan_session_data_io_t p_session_data,
int  avctx_width,
int  avctx_height 
)

Receive decoded data from decoder, including ni_logan_dec_context_t,.


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t
[in/out]p_session_data Pointer to ni_logan_session_data_io_t
[in]avctx_widthavctx width
[in]avctx_heightavctx height
Returns
On success NI_LOGAN_RETCODE_SUCCESS On failure NI_LOGAN_RETCODE_FAILURE

Definition at line 1186 of file ni_dec_api_logan.c.

◆ ni_logan_dec_send()

LIB_API int ni_logan_dec_send ( ni_logan_dec_context_t ni_dec_ctx,
uint8_t *  pkt_data,
int  pkt_size,
int  pkt_flags,
long long  pkt_pts,
long long  pkt_dts,
int  avctx_width,
int  avctx_height,
uint8_t *  extradata,
int  extradata_size 
)

Parse the packet and send the packet to decode device.


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t
[in/out]flag flag=0 or 1 to do something.
[in]pkt_dataPointer to input packet data
[in]pkt_sizepacket size
[in]pkt_flagspacket flags
[in]pkt_ptspacket pts
[in]pkt_dtspacket dts
[in]avctx_widthavctx width
[in]avctx_heightavctx height
[in]extradataPointer to uint8_t
[in]extradata_sizeextradata size
Returns
On success NI_LOGAN_RETCODE_SUCCESS On failure NI_LOGAN_RETCODE_FAILURE NI_LOGAN_RETCODE_INVALID_PARAM, NI_LOGAN_RETCODE_ERROR_MEM_ALOC, etc

Definition at line 765 of file ni_dec_api_logan.c.

◆ ni_logan_decode_flush_buffers()

LIB_API void ni_logan_decode_flush_buffers ( ni_logan_dec_context_t ni_dec_ctx)

decoder flush buffers


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t

Definition at line 1297 of file ni_dec_api_logan.c.

◆ ni_logan_setup_decoder()

LIB_API int ni_logan_setup_decoder ( ni_logan_dec_context_t ni_dec_ctx)

Initialize init device session_context and init default params including ni_logan_dec_context_t, ni_logan_session_context_t, ni_logan_decoder_params_t.


Parameters
[in/out]ni_dec_ctx Pointer to ni_logan_dec_context_t
Returns
On success NI_LOGAN_RETCODE_SUCCESS On failure NI_LOGAN_RETCODE_FAILURE NI_LOGAN_RETCODE_INVALID_PARAM, NI_LOGAN_RETCODE_ERROR_MEM_ALOC, etc

Definition at line 123 of file ni_dec_api_logan.c.