📄 zpav8tools1.h
字号:
/*
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2006-2008 Beijing, pengzhen (pengzhenxp@yahoo.com.cn) //
// //
///////////////////////////////////////////////////////////////////////////////
*/
#ifndef __ZPAV8_TOOLS1_H__
#define __ZPAV8_TOOLS1_H__
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WIN32
#define zpav_tools1_api
#endif /* !WIN32 */
#ifdef WIN32
#ifdef zpav_tools_exports
#define zpav_tools1_api __declspec(dllexport)
#else
#define zpav_tools1_api __declspec(dllimport)
#endif
#endif /* WIN32 */
/**
* Yuv422 Queue
*/
typedef struct _Yuv422_Queue /* FIFO-Queue data Buffer */
{
struct _Yuv422_Queue * restrict m_pNext ;
void * restrict m_pBuf0 ;
void * restrict m_pBuf1 ;
#if defined(__TCS__) && (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
void* restrict m_pPhys_Buf0 ;
void* restrict m_pPhys_Buf1 ;
#endif /* PNX1500/PNX1700 */
} Yuv422_Queue;
/**
* Yuv420 Queue
*/
typedef struct _Yuv420_Queue /* FIFO-Queue data Buffer */
{
struct _Yuv420_Queue * restrict m_pNext ;
void * restrict m_pBuf_y ;
void * restrict m_pBuf_u ;
void * restrict m_pBuf_v ;
#if defined(__TCS__) && (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
void* restrict m_pPhys_Buf_y ;
void* restrict m_pPhys_Buf_u ;
void* restrict m_pPhys_Buf_v ;
#endif /* PNX1500/PNX1700 */
} Yuv420_Queue;
/**
* Audio Queue
*/
typedef struct _Audio_Queue /* FIFO-Queue data Buffer */
{
struct _Audio_Queue * restrict m_pNext ;
void* restrict m_pBuf ;
#if defined(__TCS__) && (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
void* restrict m_pPhys_Buf ;
#endif /* PNX1500/PNX1700 */
} Audio_Queue;
/**
* streams queue
*/
typedef struct _Streams_Queue /* FIFO-Queue data Buffer */
{
struct _Streams_Queue * restrict m_pNext ;
char * restrict m_pBuf ;
unsigned int m_iSize, m_iKey ;
} Streams_Queue;
/**
* network
*/
typedef struct _dnp_ctx
{
/* set by system */
void* m_handle ;
void* m_video_semaphore ; /* the semaphore of the video */ /* RX */
void* m_audio_semaphore ; /* the semaphore of the audio */ /* RX */
/* set by user */
unsigned char* video ; /* the buffer of the video */
unsigned int video_length ; /* the length of the video */
unsigned int video_key ; /* the key of the video */
unsigned int* video_count ;
unsigned char* audio ; /* the buffer of the audio */
unsigned int audio_length ; /* the length of the audio */
//unsigned int audio_key ; /* the key of the audio */
unsigned int* audio_count ;
char ip[16] ; /* address */
int port ; /* port */
int protocol ; /* 0: TCP 1 : UDP */
int receive ; /* 0: TX 1 : RX */
} dnp_ctx;
/*
* functions
*/
/**
* Yuv422 Queue
*/
#if defined(__TCS__) && (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
zpav_tools1_api Yuv422_Queue* Alloc_Yuv422_Queue( int, int, int, int ) ;
#else
zpav_tools1_api Yuv422_Queue* Alloc_Yuv422_Queue( int, int, int ) ;
#endif /* PNX1500/PNX1700 */
zpav_tools1_api void Free_Yuv422_Queue( void* ) ;
Yuv422_Queue* Get_Yuv422_Queue( void*, int ) ;
/**
* Yuv420 Queue
*/
#if defined(__TCS__) && (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
zpav_tools1_api Yuv420_Queue* Alloc_Yuv420_Queue( int, int, int, int ) ;
#else
zpav_tools1_api Yuv420_Queue* Alloc_Yuv420_Queue( int, int, int ) ;
#endif /* PNX1500/PNX1700 */
zpav_tools1_api void Free_Yuv420_Queue( void* ) ;
Yuv420_Queue* Get_Yuv420_Queue( void*, int ) ;
/**
* Audio Queue
*/
#if defined(__TCS__) && (TMFL_PNX_ID != 1300) /* PNX1500/PNX1700 */
zpav_tools1_api Audio_Queue* Alloc_Audio_Queue( int, int, int ) ;
#else
zpav_tools1_api Audio_Queue* Alloc_Audio_Queue( int, int ) ;
#endif /* PNX1500/PNX1700 */
zpav_tools1_api void Free_Audio_Queue( void* ) ;
Audio_Queue* Get_Audio_Queue( void*, int ) ;
/**
* streams queue
*/
zpav_tools1_api Streams_Queue* Alloc_Streams_Queue( int, int ) ;
zpav_tools1_api void Free_Streams_Queue( void* ) ;
/**
* network
*/
zpav_tools1_api int dnp_open( dnp_ctx* ) ;
zpav_tools1_api int dnp_close( dnp_ctx* ) ;
zpav_tools1_api int dnp_socket( dnp_ctx* ) ; /* socket */
zpav_tools1_api int dnp_tx_start( dnp_ctx* ) ; /* TX */
zpav_tools1_api int dnp_tx_stop( dnp_ctx* ) ;
zpav_tools1_api int dnp_rx_start( dnp_ctx* ) ; /* RX */
zpav_tools1_api int dnp_rx_stop( dnp_ctx* ) ;
#ifdef __cplusplus
}
#endif
#endif /*__ZPAV8_TOOLS1_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -