libxcoder  3.5.1
ni_device_api_priv_logan.c File Reference

Private functions used by main ni_device_api file. More...

#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "ni_nvme_logan.h"
#include "ni_device_api_logan.h"
#include "ni_device_api_priv_logan.h"
#include "ni_rsrc_api_logan.h"
#include "ni_util_logan.h"
#include "ni_av_codec_logan.h"

Go to the source code of this file.

Macros

#define NI_LOGAN_XCODER_FAILURES_MAX   25
 
#define CHECK_VPU_RECOVERY(ret)
 
#define DUMP
 

Typedefs

typedef enum _ni_logan_t35_sei_mesg_type ni_logan_t35_sei_mesg_type_t
 

Enumerations

enum  _ni_logan_t35_sei_mesg_type { NI_LOGAN_T35_SEI_CLOSED_CAPTION = 0 , NI_LOGAN_T35_SEI_HDR10_PLUS = 1 }
 

Functions

ni_logan_retcode_t ni_logan_decoder_session_open (ni_logan_session_context_t *p_ctx)
 Open a xcoder decoder instance. More...
 
ni_logan_retcode_t ni_logan_send_session_keep_alive (uint32_t session_id, ni_device_handle_t device_handle, ni_event_handle_t event_handle, void *p_data)
 send a keep alive message to firmware More...
 
ni_logan_retcode_t ni_logan_decoder_session_flush (ni_logan_session_context_t *p_ctx)
 Flush decoder output. More...
 
ni_logan_retcode_t ni_logan_decoder_session_flush_buffers (ni_logan_session_context_t *p_ctx)
 Flush decoder output. More...
 
ni_logan_retcode_t ni_logan_decoder_session_close (ni_logan_session_context_t *p_ctx, int eos_recieved)
 Close a xcoder decoder instance. More...
 
int ni_logan_decoder_session_write (ni_logan_session_context_t *p_ctx, ni_logan_packet_t *p_packet)
 Send a video p_packet to decoder. More...
 
int ni_logan_decoder_session_read (ni_logan_session_context_t *p_ctx, ni_logan_frame_t *p_frame)
 Retrieve a YUV p_frame from decoder. More...
 
ni_logan_retcode_t ni_logan_decoder_session_query (ni_logan_session_context_t *p_ctx)
 Query current decoder status. More...
 
ni_logan_retcode_t ni_logan_encoder_session_open (ni_logan_session_context_t *p_ctx)
 Open a xcoder encoder instance. More...
 
ni_logan_retcode_t ni_logan_encoder_session_flush (ni_logan_session_context_t *p_ctx)
 Flush encoder output. More...
 
ni_logan_retcode_t ni_logan_encoder_session_close (ni_logan_session_context_t *p_ctx, int eos_recieved)
 Close a xcoder encoder instance. More...
 
int ni_logan_encoder_session_write (ni_logan_session_context_t *p_ctx, ni_logan_frame_t *p_frame)
 Send a YUV p_frame to encoder. More...
 
int ni_logan_encoder_session_read (ni_logan_session_context_t *p_ctx, ni_logan_packet_t *p_packet)
 Retrieve an encoded packet from encoder. More...
 
int ni_logan_encoder_session_query (ni_logan_session_context_t *p_ctx)
 Query current encoder status. More...
 
int ni_logan_query_general_status (ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type, ni_logan_instance_mgr_general_status_t *p_gen_status)
 Query a particular xcoder instance to get GeneralStatus data. More...
 
ni_logan_retcode_t ni_logan_query_stream_info (ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type, ni_logan_instance_mgr_stream_info_t *p_stream_info, bool is_hw)
 Query a particular xcoder instance to get Stream Info data. More...
 
ni_logan_retcode_t ni_logan_query_status_info (ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type, ni_logan_instance_status_info_t *p_status_info, int rc, int opcode)
 Query a particular xcoder instance to get status Info data. More...
 
ni_logan_retcode_t ni_logan_query_instance_buf_info (ni_logan_session_context_t *p_ctx, ni_logan_instance_buf_info_rw_type_t rw_type, ni_logan_device_type_t device_type, ni_logan_instance_buf_info_t *p_inst_buf_info, bool is_hw)
 Query a particular xcoder instance to get buffer/data Info data. More...
 
ni_logan_retcode_t ni_logan_config_instance_rw (ni_logan_session_context_t *p_ctx, ni_logan_inst_config_rw_type_t rw_type, uint8_t enable, uint8_t hw_action, uint16_t frame_id)
 Configure the read/write pipe for a session Use HW frame index to read/write the YUV from/to HW. More...
 
ni_logan_retcode_t ni_logan_config_instance_sos (ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type)
 Send a p_config command for Start Of Stream. More...
 
ni_logan_retcode_t ni_logan_config_instance_eos (ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type)
 Send a p_config command for End Of Stream. More...
 
ni_logan_retcode_t ni_logan_config_instance_flush (ni_logan_session_context_t *p_ctx, ni_logan_device_type_t device_type)
 Send a p_config command for Flush Of Stream. More...
 
ni_logan_retcode_t ni_logan_config_instance_set_encoder_params (ni_logan_session_context_t *p_ctx)
 Send a p_config command to configure encoding parameters. More...
 
int ni_logan_create_frame (ni_logan_frame_t *p_frame, uint32_t read_length, uint64_t *p_frame_offset, bool is_hw_frame)
 Get info from received p_frame. More...
 
void ni_logan_populate_device_capability_struct (ni_logan_device_capability_t *p_cap, void *p_data)
 Get info from received xcoder capability. More...
 
void ni_logan_set_custom_template (ni_logan_session_context_t *p_ctx, ni_logan_encoder_config_t *p_cfg, ni_logan_encoder_params_t *p_src)
 Setup all xcoder configurations with custom parameters (Rev. B) More...
 
void ni_logan_set_default_template (ni_logan_session_context_t *p_ctx, ni_logan_encoder_config_t *p_config)
 Setup and initialize all xcoder configuration to default (Rev. B) More...
 
ni_logan_retcode_t ni_logan_validate_custom_template (ni_logan_session_context_t *p_ctx, ni_logan_encoder_config_t *p_cfg, ni_logan_encoder_params_t *p_src, char *p_param_err, uint32_t max_err_len)
 Perform validation on custom parameters (Rev. B) More...
 
ni_logan_retcode_t ni_logan_check_common_params (ni_logan_t408_config_t *p_param, ni_logan_encoder_params_t *p_src, char *p_param_err, uint32_t max_err_len)
 check the range of common parameters More...
 
ni_logan_retcode_t ni_logan_check_ratecontrol_params (ni_logan_encoder_config_t *p_cfg, char *p_param_err, uint32_t max_err_len)
 check the range of rate control parameters More...
 
void ni_logan_params_print (void *const p_codec_params, ni_logan_device_type_t device_type)
 Print xcoder user configurations. More...
 
void * ni_logan_session_keep_alive_thread (void *arguments)
 decoder keep alive thread function triggers every 1 second More...
 
ni_logan_retcode_t ni_logan_uploader_session_open (ni_logan_session_context_t *p_ctx)
 Open a xcoder uploader instance. More...
 
ni_logan_retcode_t ni_logan_decoder_session_copy_internal (ni_logan_session_context_t *src_p_ctx, ni_logan_session_context_t *dst_p_ctx)
 Copy a xcoder decoder card info and create worker thread. More...
 
int ni_logan_hwupload_session_write (ni_logan_session_context_t *p_ctx, ni_logan_frame_t *p_frame)
 Send a YUV to hardware, hardware will store it. More...
 
int ni_logan_hwupload_session_read_hwdesc (ni_logan_session_context_t *p_ctx, ni_logan_hwframe_surface_t *hwdesc, unsigned int *hwaddress)
 Retrieve a HW descriptor of uploaded frame The HW descriptor will contain the YUV frame index, which stored in HW through ni_logan_hwupload_session_write(). More...
 
ni_logan_retcode_t ni_logan_clear_instance_buf (ni_logan_hwframe_surface_t *surface, ni_device_handle_t device_handle, ni_event_handle_t event_handle)
 clear a particular xcoder instance buffer/data The device handle is got from decoder or uploader, Sent clear HW frame buffer command here to recycle it. More...
 
void ni_logan_populate_serial_number (ni_logan_serial_num_t *p_serial_num, void *p_data)
 Get Card Serial Number from received Nvme Indentify info. More...
 
ni_logan_retcode_t ni_logan_decoder_session_read_desc (ni_logan_session_context_t *p_ctx, ni_logan_frame_t *p_frame)
 Retrieve a hw desc p_frame from decoder When yuvbypass enabled, this is used for decoder to read hardware frame index, extra data and meta data. More...
 
int ni_logan_hwdownload_session_read (ni_logan_session_context_t *p_ctx, ni_logan_frame_t *p_frame, ni_logan_hwframe_surface_t *hwdesc)
 Retrieve a YUV through HW descriptor from decoder. More...
 
ni_logan_retcode_t ni_logan_uplosader_session_close (ni_logan_session_context_t *p_ctx)
 Close an xcoder upload instance. More...
 
ni_logan_retcode_t ni_logan_hwupload_init_framepool (ni_logan_session_context_t *p_ctx, uint32_t pool_size, uint32_t p2p_pool)
 Setup framepool for hwupload. Uses decoder framepool. More...
 
void ni_logan_change_priority (void)
 Set up schedule priority. First try to run with RR mode. If fails, try to set nice value. If fails either, ignore it and run with default priority. More...
 
ni_logan_retcode_t ni_get_memory_offset (ni_logan_session_context_t *p_ctx, const ni_logan_hwframe_surface_t *hwdesc, unsigned int *p_offset, unsigned int hwaddress)
 Get an address offset from a hw descriptor. More...
 

Detailed Description

Private functions used by main ni_device_api file.


Definition in file ni_device_api_priv_logan.c.

Macro Definition Documentation

◆ CHECK_VPU_RECOVERY

#define CHECK_VPU_RECOVERY (   ret)
Value:
{ \
ni_log(NI_LOG_TRACE, "Error, vpu reset.\n"); \
LRETURN; \
} \
}
@ NI_LOGAN_RETCODE_ERROR_VPU_RECOVERY
@ NI_LOGAN_RETCODE_NVME_SC_VPU_RECOVERY
@ NI_LOG_TRACE
Definition: ni_log_logan.h:67

Definition at line 253 of file ni_device_api_priv_logan.c.

◆ DUMP

#define DUMP

◆ NI_LOGAN_XCODER_FAILURES_MAX

#define NI_LOGAN_XCODER_FAILURES_MAX   25

Definition at line 152 of file ni_device_api_priv_logan.c.

Typedef Documentation

◆ ni_logan_t35_sei_mesg_type_t

Enumeration Type Documentation

◆ _ni_logan_t35_sei_mesg_type

Enumerator
NI_LOGAN_T35_SEI_CLOSED_CAPTION 
NI_LOGAN_T35_SEI_HDR10_PLUS 

Definition at line 72 of file ni_device_api_priv_logan.c.

Function Documentation

◆ ni_get_memory_offset()

ni_logan_retcode_t ni_get_memory_offset ( ni_logan_session_context_t p_ctx,
const ni_logan_hwframe_surface_t hwdesc,
unsigned int *  p_offset,
unsigned int  hwaddress 
)

Get an address offset from a hw descriptor.


Parameters
[in]p_ctxni_session_context_t to be referenced
[in]hwdescPointer to caller allocated niFrameSurface1_t
[in]hwaddressDDR address in FW
[out]p_offsetValue of offset
Returns
On success NI_RETCODE_SUCCESS On failure NI_RETCODE_INVALID_PARAM

Definition at line 8149 of file ni_device_api_priv_logan.c.

◆ ni_logan_change_priority()

void ni_logan_change_priority ( void  )

Set up schedule priority. First try to run with RR mode. If fails, try to set nice value. If fails either, ignore it and run with default priority.


Parameters

Definition at line 8105 of file ni_device_api_priv_logan.c.

◆ ni_logan_check_common_params()

ni_logan_retcode_t ni_logan_check_common_params ( ni_logan_t408_config_t p_param,
ni_logan_encoder_params_t p_src,
char *  param_err,
uint32_t  max_err_len 
)

check the range of common parameters


Parameters

Definition at line 6231 of file ni_device_api_priv_logan.c.

◆ ni_logan_check_ratecontrol_params()

ni_logan_retcode_t ni_logan_check_ratecontrol_params ( ni_logan_encoder_config_t p_cfg,
char *  param_err,
uint32_t  max_err_len 
)

check the range of rate control parameters


Parameters

Definition at line 6486 of file ni_device_api_priv_logan.c.

◆ ni_logan_clear_instance_buf()

ni_logan_retcode_t ni_logan_clear_instance_buf ( ni_logan_hwframe_surface_t surface,
ni_device_handle_t  device_handle,
ni_event_handle_t  event_handle 
)

clear a particular xcoder instance buffer/data The device handle is got from decoder or uploader, Sent clear HW frame buffer command here to recycle it.

clear a particular xcoder instance buffer/data


Parameters
ni_logan_hwframe_surface_t*hwdesc - xcoder hardware descriptor
ni_device_handle_tdevice_handle - device handle
ni_event_handle_tevent_handle - event handle
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_MEM_ALOC or NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 7325 of file ni_device_api_priv_logan.c.

◆ ni_logan_config_instance_eos()

ni_logan_retcode_t ni_logan_config_instance_eos ( ni_logan_session_context_t p_ctx,
ni_logan_device_type_t  device_type 
)

Send a p_config command for End Of Stream.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 4027 of file ni_device_api_priv_logan.c.

◆ ni_logan_config_instance_flush()

ni_logan_retcode_t ni_logan_config_instance_flush ( ni_logan_session_context_t p_ctx,
ni_logan_device_type_t  device_type 
)

Send a p_config command for Flush Of Stream.

Send a p_config command Flush Of Stream.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 4082 of file ni_device_api_priv_logan.c.

◆ ni_logan_config_instance_rw()

ni_logan_retcode_t ni_logan_config_instance_rw ( ni_logan_session_context_t p_ctx,
ni_logan_inst_config_rw_type_t  rw_type,
uint8_t  enable,
uint8_t  hw_action,
uint16_t  frame_id 
)

Configure the read/write pipe for a session Use HW frame index to read/write the YUV from/to HW.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_session_config_rw_trw_type
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
uint8_tenable
uint8_thw_action
uint16_tframe_id
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_MEM_ALOC or NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 3878 of file ni_device_api_priv_logan.c.

◆ ni_logan_config_instance_set_encoder_params()

ni_logan_retcode_t ni_logan_config_instance_set_encoder_params ( ni_logan_session_context_t p_ctx)

Send a p_config command to configure encoding parameters.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 4134 of file ni_device_api_priv_logan.c.

◆ ni_logan_config_instance_sos()

ni_logan_retcode_t ni_logan_config_instance_sos ( ni_logan_session_context_t p_ctx,
ni_logan_device_type_t  device_type 
)

Send a p_config command for Start Of Stream.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_device_type_tdevice_type - xcoder type Encoder, Decoder or Uploader
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION. NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 3971 of file ni_device_api_priv_logan.c.

◆ ni_logan_create_frame()

int ni_logan_create_frame ( ni_logan_frame_t p_frame,
uint32_t  read_length,
uint64_t *  p_frame_offset,
bool  is_hw_frame 
)

Get info from received p_frame.


Parameters

Definition at line 4382 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_close()

ni_logan_retcode_t ni_logan_decoder_session_close ( ni_logan_session_context_t p_ctx,
int  eos_recieved 
)

Close a xcoder decoder instance.


Parameters

Definition at line 1055 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_copy_internal()

ni_logan_retcode_t ni_logan_decoder_session_copy_internal ( ni_logan_session_context_t src_p_ctx,
ni_logan_session_context_t dst_p_ctx 
)

Copy a xcoder decoder card info and create worker thread.


Parameters
ni_logan_session_context_tp_ctx - source xcoder Context
ni_logan_session_context_tp_ctx - destination xcoder Context
Returns
NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_INVALID_PARAM on failure

Definition at line 7080 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_flush()

ni_logan_retcode_t ni_logan_decoder_session_flush ( ni_logan_session_context_t p_ctx)

Flush decoder output.


Parameters

Definition at line 964 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_flush_buffers()

ni_logan_retcode_t ni_logan_decoder_session_flush_buffers ( ni_logan_session_context_t p_ctx)

Flush decoder output.


Parameters
ni_logan_session_context_t*p_ctx - xcoder Context
Returns
NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_INVALID_PARAM or NI_LOGAN_RETCODE_ERROR_INVALID_SESSION on failure

Definition at line 1010 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_open()

ni_logan_retcode_t ni_logan_decoder_session_open ( ni_logan_session_context_t p_ctx)

Open a xcoder decoder instance.


Parameters

Definition at line 631 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_query()

ni_logan_retcode_t ni_logan_decoder_session_query ( ni_logan_session_context_t p_ctx)

Query current decoder status.


Parameters

Definition at line 2210 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_read()

int ni_logan_decoder_session_read ( ni_logan_session_context_t p_ctx,
ni_logan_frame_t p_frame 
)

Retrieve a YUV p_frame from decoder.


Parameters

Definition at line 1537 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_read_desc()

ni_logan_retcode_t ni_logan_decoder_session_read_desc ( ni_logan_session_context_t p_ctx,
ni_logan_frame_t p_frame 
)

Retrieve a hw desc p_frame from decoder When yuvbypass enabled, this is used for decoder to read hardware frame index, extra data and meta data.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_frame_t*p_frame - xcoder frame
Returns
rx_size on success, negative value like NI_LOGAN_RETCODE_FAILURE in ni_logan_retcode_t on failure

Definition at line 7423 of file ni_device_api_priv_logan.c.

◆ ni_logan_decoder_session_write()

int ni_logan_decoder_session_write ( ni_logan_session_context_t p_ctx,
ni_logan_packet_t p_packet 
)

Send a video p_packet to decoder.


Parameters

Definition at line 1216 of file ni_device_api_priv_logan.c.

◆ ni_logan_encoder_session_close()

ni_logan_retcode_t ni_logan_encoder_session_close ( ni_logan_session_context_t p_ctx,
int  eos_recieved 
)

Close a xcoder encoder instance.


Parameters

Definition at line 2607 of file ni_device_api_priv_logan.c.

◆ ni_logan_encoder_session_flush()

ni_logan_retcode_t ni_logan_encoder_session_flush ( ni_logan_session_context_t p_ctx)

Flush encoder output.


Parameters

Definition at line 2559 of file ni_device_api_priv_logan.c.

◆ ni_logan_encoder_session_open()

ni_logan_retcode_t ni_logan_encoder_session_open ( ni_logan_session_context_t p_ctx)

Open a xcoder encoder instance.


Parameters

Definition at line 2250 of file ni_device_api_priv_logan.c.

◆ ni_logan_encoder_session_query()

int ni_logan_encoder_session_query ( ni_logan_session_context_t p_ctx)

Query current encoder status.


Parameters

Definition at line 3406 of file ni_device_api_priv_logan.c.

◆ ni_logan_encoder_session_read()

int ni_logan_encoder_session_read ( ni_logan_session_context_t p_ctx,
ni_logan_packet_t p_packet 
)

Retrieve an encoded packet from encoder.


Parameters

Definition at line 3110 of file ni_device_api_priv_logan.c.

◆ ni_logan_encoder_session_write()

int ni_logan_encoder_session_write ( ni_logan_session_context_t p_ctx,
ni_logan_frame_t p_frame 
)

Send a YUV p_frame to encoder.


Parameters

************ Sequence Change related stuff

************ Sequence Change related stuff end

Definition at line 2758 of file ni_device_api_priv_logan.c.

◆ ni_logan_hwdownload_session_read()

int ni_logan_hwdownload_session_read ( ni_logan_session_context_t p_ctx,
ni_logan_frame_t p_frame,
ni_logan_hwframe_surface_t hwdesc 
)

Retrieve a YUV through HW descriptor from decoder.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_frame_t*p_frame - xcoder frame
ni_logan_hwframe_surface_t*hwdesc - xcoder hardware descriptor
Returns
rx_size on success, negative value like NI_LOGAN_RETCODE_FAILURE in ni_logan_retcode_t on failure

Definition at line 7873 of file ni_device_api_priv_logan.c.

◆ ni_logan_hwupload_init_framepool()

ni_logan_retcode_t ni_logan_hwupload_init_framepool ( ni_logan_session_context_t p_ctx,
uint32_t  pool_size,
uint32_t  p2p_pool 
)

Setup framepool for hwupload. Uses decoder framepool.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
uint32_tpool_size - buffer pool in HW
Returns
NI_LOGAN_RETCODE_SUCCESS on success, negative value like NI_LOGAN_RETCODE_FAILURE in ni_logan_retcode_t on failure

Definition at line 8033 of file ni_device_api_priv_logan.c.

◆ ni_logan_hwupload_session_read_hwdesc()

int ni_logan_hwupload_session_read_hwdesc ( ni_logan_session_context_t p_ctx,
ni_logan_hwframe_surface_t hwdesc,
unsigned int *  hwaddress 
)

Retrieve a HW descriptor of uploaded frame The HW descriptor will contain the YUV frame index, which stored in HW through ni_logan_hwupload_session_write().


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_hwframe_surface_t*hwdesc - xcoder hardware descriptor
Returns
NI_LOGAN_RETCODE_SUCCESS on success, negative value like NI_LOGAN_RETCODE_FAILURE in ni_logan_retcode_t on failure

Definition at line 7250 of file ni_device_api_priv_logan.c.

◆ ni_logan_hwupload_session_write()

int ni_logan_hwupload_session_write ( ni_logan_session_context_t p_ctx,
ni_logan_frame_t p_frame 
)

Send a YUV to hardware, hardware will store it.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_frame_t*p_frame - xcoder frame
Returns
NI_LOGAN_RETCODE_SUCCESS on success, negative value like NI_LOGAN_RETCODE_FAILURE in ni_logan_retcode_t on failure

Definition at line 7107 of file ni_device_api_priv_logan.c.

◆ ni_logan_params_print()

void ni_logan_params_print ( void *const  p_codec_params,
ni_logan_device_type_t  device_type 
)

Print xcoder user configurations.


Parameters

Definition at line 6534 of file ni_device_api_priv_logan.c.

◆ ni_logan_populate_device_capability_struct()

void ni_logan_populate_device_capability_struct ( ni_logan_device_capability_t p_cap,
void *  p_data 
)

Get info from received xcoder capability.


Parameters

Definition at line 4617 of file ni_device_api_priv_logan.c.

◆ ni_logan_populate_serial_number()

void ni_logan_populate_serial_number ( ni_logan_serial_num_t p_serial_num,
void *  p_data 
)

Get Card Serial Number from received Nvme Indentify info.


Parameters

Definition at line 7386 of file ni_device_api_priv_logan.c.

◆ ni_logan_query_general_status()

int ni_logan_query_general_status ( ni_logan_session_context_t p_ctx,
ni_logan_device_type_t  device_type,
ni_logan_instance_mgr_general_status_t p_gen_status 
)

Query a particular xcoder instance to get GeneralStatus data.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_logan_instance_mgr_general_status_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_MEM_ALOC or NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 3454 of file ni_device_api_priv_logan.c.

◆ ni_logan_query_instance_buf_info()

ni_logan_retcode_t ni_logan_query_instance_buf_info ( ni_logan_session_context_t p_ctx,
ni_logan_instance_buf_info_rw_type_t  rw_type,
ni_logan_device_type_t  device_type,
ni_logan_instance_buf_info_t p_inst_buf_info,
bool  is_hw 
)

Query a particular xcoder instance to get buffer/data Info data.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_instance_buf_info_rw_type_trw_type
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_logan_instance_buf_info_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_MEM_ALOC or NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 3773 of file ni_device_api_priv_logan.c.

◆ ni_logan_query_status_info()

ni_logan_retcode_t ni_logan_query_status_info ( ni_logan_session_context_t p_ctx,
ni_logan_device_type_t  device_type,
ni_logan_instance_status_info_t p_status_info,
int  rc,
int  opcode 
)

Query a particular xcoder instance to get status Info data.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_logan_instance_status_info_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_MEM_ALOC or NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 3609 of file ni_device_api_priv_logan.c.

◆ ni_logan_query_stream_info()

ni_logan_retcode_t ni_logan_query_stream_info ( ni_logan_session_context_t p_ctx,
ni_logan_device_type_t  device_type,
ni_logan_instance_mgr_stream_info_t p_stream_info,
bool  is_hw 
)

Query a particular xcoder instance to get Stream Info data.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
ni_logan_device_type_tdevice_type - xcoder type Encoder or Decoder
ni_logan_instance_mgr_stream_info_t*out - Struct preallocated from the caller where the resulting data will be placed
Returns
- NI_LOGAN_RETCODE_SUCCESS on success, NI_LOGAN_RETCODE_ERROR_INVALID_SESSION, NI_LOGAN_RETCODE_ERROR_MEM_ALOC or NI_LOGAN_RETCODE_ERROR_NVME_CMD_FAILED on failure

Definition at line 3526 of file ni_device_api_priv_logan.c.

◆ ni_logan_send_session_keep_alive()

ni_logan_retcode_t ni_logan_send_session_keep_alive ( uint32_t  session_id,
ni_device_handle_t  device_handle,
ni_event_handle_t  event_handle,
void *  p_data 
)

send a keep alive message to firmware


Parameters

Definition at line 912 of file ni_device_api_priv_logan.c.

◆ ni_logan_session_keep_alive_thread()

void* ni_logan_session_keep_alive_thread ( void *  arguments)

decoder keep alive thread function triggers every 1 second


Parameters
voidthread args
Returns
void

Definition at line 6664 of file ni_device_api_priv_logan.c.

◆ ni_logan_set_custom_template()

void ni_logan_set_custom_template ( ni_logan_session_context_t p_ctx,
ni_logan_encoder_config_t p_cfg,
ni_logan_encoder_params_t p_src 
)

Setup all xcoder configurations with custom parameters (Rev. B)


Parameters

Definition at line 4785 of file ni_device_api_priv_logan.c.

◆ ni_logan_set_default_template()

void ni_logan_set_default_template ( ni_logan_session_context_t p_ctx,
ni_logan_encoder_config_t p_config 
)

Setup and initialize all xcoder configuration to default (Rev. B)


Parameters

Definition at line 5436 of file ni_device_api_priv_logan.c.

◆ ni_logan_uploader_session_open()

ni_logan_retcode_t ni_logan_uploader_session_open ( ni_logan_session_context_t p_ctx)

Open a xcoder uploader instance.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
Returns
NI_LOGAN_RETCODE_SUCCESS on success, negative value like NI_LOGAN_RETCODE_FAILURE in ni_logan_retcode_t on failure

Definition at line 6780 of file ni_device_api_priv_logan.c.

◆ ni_logan_uplosader_session_close()

ni_logan_retcode_t ni_logan_uplosader_session_close ( ni_logan_session_context_t p_ctx)

Close an xcoder upload instance.


Parameters
ni_logan_session_context_tp_ctx - xcoder Context
Returns

Definition at line 8019 of file ni_device_api_priv_logan.c.

◆ ni_logan_validate_custom_template()

ni_logan_retcode_t ni_logan_validate_custom_template ( ni_logan_session_context_t p_ctx,
ni_logan_encoder_config_t p_cfg,
ni_logan_encoder_params_t p_src,
char *  p_param_err,
uint32_t  max_err_len 
)

Perform validation on custom parameters (Rev. B)


Parameters

Definition at line 5689 of file ni_device_api_priv_logan.c.