⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hw_at2041_api.h

📁 1、基于韩国at2041芯片开发的Linux环境的DVR代码。 2、以原来代码进行了修改。 3、主要修改网络通讯出现异常问题处理 4、硬盘覆盖录像不起作用
💻 H
字号:
/* set tabstop=4 *//******************************************************************************** *                                                                              * * Copyright(C) 2002  Penta-Micro                                               * *                                                                              * * ALL RIGHT RESERVED                                                           * *                                                                              * * This software is the property of Penta-Micro and is furnished under          * * license by Penta-Micro. This software may be used only in accordance         *	 * with the terms of said license. This copyright notice may not be             * * removed, modified or obliterated without the prior written permission        * * of Penta-Micro.                                                              * *                                                                              * * This software may not be copyed, transmitted, provided to or otherwise       * * made available to any other person, company, corporation	or other entity     * * except as specified in the terms of said license.                            * *                                                                              * * No right, title, ownership or other interest in the software is hereby       * * granted or transferred.                                                      * *                                                                              * * The information contained herein is subject to change without notice and     * * should not be construed as a commitment by Penta-Micro.                      * *                                                                              * ********************************************************************************   MODULE NAME:  AT2041_API.H   DESCRIPTION:    This Module contains definition for AT2041 API function.   ...............................................................................*/    #ifndef __AT2041_API_H#define __AT2041_API_H/** ************************************************************************* **  ** includes ** ************************************************************************* **/#include "typedef.h" /** ************************************************************************* **  ** defines ** ************************************************************************* **/#define AT4012_I2C_WRITE_ADDR          0xc6 >> 1 #define AT4012_I2C_READ_ADDR           0xc7 >> 1 #define	READ_Tx_FIFO						  0x1#define	WRITE_Rx_FIFO						  0x2#define	WRITE_COMMAND_REG				  0x3#define	WRITE_CONTROL_REG				  0x4#define	READ_STATUS_REG					  0x5#define	AT2041_INIT							  0x6#define	AT2041_ENC_RESET_BUFFER		  0x7#define	AT2041_DEC_RESET_BUFFER		  0x8#define	END_OF_WRITE_Rx_FIFO				  0x9#define	WRITE_DEMUX_FIFO					  0xa// swpark#define	AT2041_INT_ENABLE					0xb#define	AT2041_INT_DISABLE					0xc/** ************************************************************************* **  ** typedefs ** ************************************************************************* **/  /** ************************************************************************* **  ** function prototypes ** ************************************************************************* **/RETURN at2041_open(void);void at2041_close(void);RETURN  at2041_load_image(void);void write_command_register(UNS16 data);void write_demux_fifo(UNS16 data);void ack_for_tx(void);void set_operation_mode(UNS16 mode);void set_sdram_size(UNS16 size);void set_maximum_video_size(UNS16 hsize, UNS16 vsize);void set_channel_size(UNS16 ch_size);void set_maximum_gopm(UNS16 gopm_size);void set_gio_mode(UNS16 mode);void set_encoder_buffer_size(UNS16 system_stream_buf_size, UNS16 video_es_buf_size, 	UNS16 audio_es_buf_size, UNS16 audio_data_input_buf_size);void set_decoder_buffer_size(UNS16 input_stream_buf0_size, UNS16 input_stream_buf1_size, 	UNS16 input_stream_buf2_size, UNS16 input_stream_buf3_size, 	UNS16 audio_data_output_buf_size);void sdram_allocation(void);void encoder_start(void);void encoder_stop(void);void video_encoder_buffer_reset(void);void output_stream_format(UNS16 form);void set_max_output_data_size(UNS16 size);void set_data_ready_ack_mode(UNS16 data);void set_input_video_parameter(UNS16 hsize, UNS16 vsize, UNS16 rate, UNS16 field);void set_input_video_clock_inversion(UNS16 mode);void set_input_video_sync_mode(UNS16 sync);void enc_vertical_offset_mode(UNS16 mode);void enc_vertical_offset(UNS16 voff_e, UNS16 voff_o);void set_field_sync_mode(UNS16 mode);void set_first_field_decision_parameter(UNS16 value);void set_video_input_sync_polarity(UNS16 hvalid_polarity, UNS16 hsync_polarity, 	UNS16 vvalid_polarity, UNS16 vsync_polarity, UNS16 fsync_first_field);void input_video_data_saturation_value(UNS16 min_luma, UNS16 max_luma, UNS16 min_chroma, 	UNS16 max_chroma);void set_preprocess(UNS16 lpf, UNS16 medf);void set_input_video_shift_right_size(UNS16 size);void set_channel_id_interface_mode(UNS16 mode);void watermark_enable(UNS16 ena);void watermark_strength(UNS16 level);// pentamicro 2006.01.11void watermark_key(UNS16 key);void watermark_key_update(void);// 2005.10.17 pentamicrovoid reference_picture_select(UNS16 mode);void set_time_code(UNS16 hour, UNS16 minute, UNS16 second);void enc_restart(UNS16 ch_id, UNS16 restart);void encode_standard(UNS16 ch_id, UNS16 std);void rate_control_mode(UNS16 ch_id, UNS16 mode);void set_qscale_code(UNS16 ch_id, UNS16 qscale_code);void rate_control_parm_CBR(UNS16 ch_id, UNS16 bit_rate);void gop_structure(UNS16 ch_id, UNS16 closed_gop, UNS16 gop_nm, UNS16 gop_m);void force_I(UNS16 ch_id);void mpeg4_resync_mode(UNS16 ch_id, UNS16 mode);void mpeg4_resync_interval(UNS16 ch_id, UNS16 interval);void mpeg_encode_parmeter(UNS16 ch_id, UNS16 intra_dc_prec, UNS16 qscale_type, 	UNS16 intra_vlc_format, UNS16 alternate_scan, UNS16 vop_round_type, 	UNS16 intra_dc_vlc_thr, UNS16 quant_type, UNS16 direct_mode, UNS16 mode_4mv, UNS16 ac_pred);void physical_chid_assign(UNS16 ch_id);void loss_video_channel_recoding_mode(UNS16 ch_id, UNS16 mode);void input_video_scale_mode(UNS16 ch_id, UNS16 hscale_mode, UNS16 vscale_mode);void encode_region_info(UNS16 ch_id, UNS16 h_offset, UNS16 v_offset, UNS16 h_mbsize, 	UNS16 v_mbsize);void recoding_frame_rate_control(UNS16 ch_id, UNS16 input_frame_number, UNS16 rec_frame_number);void motionless_record_mode(UNS16 ch_id, UNS16 mode);void motion_detection_parameter(UNS16 ch_id, UNS16 sensitivity, UNS16 pel_diff_threshold, 	UNS16 diff_pel_count_threshold, UNS16 motion_mb_count_threshold, 	UNS16 motionless_frame_count_threshold);void audio_encode_standard(UNS16 standard);#if 0//not usevoid audio_input_channel_number(UNS16 number);#endifvoid audio_input_format(UNS16 format, UNS16 bits, UNS16 delay_mode);void enc_audio_clock_inversion(UNS16 type);void enc_audio_interface_mode(UNS16 mode);void enc_audio_frame_sync_width(UNS16 width);void audio_restart(UNS16 ch_id);void audio_pause(UNS16 ch_id);void audio_physical_chid_assign(UNS16 ch_id, UNS16 cid);void video_decoder_start(void);void video_decoder_stop(void);void dec_resume(void);void video_decoder_buffer_reset(void);//void dec_pause(void);void input_stream_format(UNS16 format);void sync_lock_count_number(UNS16 number);void decode_mode(UNS16 mode);void output_video_format(UNS16 format);void output_video_clock_inversion(UNS16 mode);void video_interface_mode(UNS16 mode);void dec_vertical_offset_mode(UNS16 ef_voffset, UNS16 of_voffset);void dec_field_sync_mode(UNS16 mode);void first_field_decision_parameter(UNS16 value);void horizontal_sync_control(UNS16 hsync_start_position, UNS16 hsync_end_position, UNS16 hsync_to_hvalid_end_cycle);void vertical_sync_control(UNS16 start_line_number_ff, UNS16 end_line_number_ff, 	UNS16 transition_position_ff, UNS16 start_line_number_sf, UNS16 end_line_number_sf, 	UNS16 transition_position_sf);void field_sync_control(UNS16 start_line_number_ff, UNS16 start_line_number_sf, 	UNS16 transition_position);void video_output_sync_polarity(UNS16 hvalid, UNS16 hsync, UNS16 vvalid, UNS16 vsync, UNS16 fsync);void output_video_data_saturation_value(UNS16 min_luma, UNS16 max_luma, UNS16 min_chroma, 	UNS16 max_chroma);void zoom_in(UNS16 horizontal_direction, UNS16 vertical_direction);void partial_display_zoom_offset(UNS16 hoffset, UNS16 voffset);void deinterlace_mode(UNS16 mode);void field_repeat_output_mode(UNS16 mode);void vbi_encod_mode(UNS16 mode);void colorbar_mode(UNS16 mode);void borderline_mode(UNS16 mode);void borderline_color(UNS16 Y, UNS16 Cb, UNS16 Cr);void background_color_display_mode(UNS16 mode);void background_color(UNS16 Y, UNS16 Cb, UNS16 Cr);void foreground_video_window(UNS16 h_start_position, UNS16 v_start_position, 	UNS16 h_end_position, UNS16 v_end_position);void background_image_download_start(void);void background_image_download_finish(void);void background_image_cpature(void);void background_image_display_mode(UNS16 mode);void monitor_channel_id(UNS16 ch_id);// 2005.10.21 pentamicrovoid background_color_mode1(UNS16 Y, UNS16 Cb, UNS16 Cr);void apply_next_param(UNS16 ch_id);void step_mode(UNS16 mode);void decode_standard(UNS16 ch_id, UNS16 standard);void set_vid_stream_id(UNS16 ch_id, UNS16 ID);void freeze(UNS16 ch_id, UNS16 mode);void display(UNS16 ch_id, UNS16 mode);void display_priority(UNS16 ch_id, UNS16 mode);void scale_down_mode(UNS16 ch_id, UNS16 hscale, UNS16 vscale);void display_offset(UNS16 ch_id, UNS16 hoffset, UNS16 voffset);void next_display_offset(UNS16 ch_id, UNS16 hoffset, UNS16 voffset);void display_mode(UNS16 ch_id, UNS16 hscale, UNS16 vscale);void eq_mode(UNS16 ch_id, UNS16 mode);void set_eq_parameter(UNS16 ch_id, UNS16 eq_strength, UNS16 iir_strength);void enhancement_mode(UNS16 ch_id, UNS16 mode);void brightness(UNS16 ch_id, UNS16 value);void audio_decode_standard(UNS16 standard);void set_aud_stream_id(UNS16 ID);void audio_output_format(UNS16 format, UNS16 bits, UNS16 delay_mode);void dec_audio_clock_inversion(UNS16 type);void dec_audio_interface_mode(UNS16 mode);void dec_audio_frame_sync_width(UNS16 width);void audio_decode_channel_id(UNS16 ID);void osd_on_off(UNS16 ch_id, UNS16 mode);void set_osd_font_palette(UNS16 palette_index, UNS16 y, UNS16 cb, UNS16 cr, UNS16 transparency, UNS16 blink);void display_font(UNS16 vert_offset, UNS16 horz_offset, UNS16 bg_palette_index, UNS16 fg_palette_index, UNS16 string_size, UNS8 * string_data);void fill_screen_font(UNS16 palette_index);void fill_line_font(UNS16 line_number, UNS16 palette_index);void encoding_stream_read(UNS16 *pdata);void decoding_stream_write(UNS16 *pdata, UNS32 picture_size);void read_at2041_register(UNS8 global_id, UNS8 channel_id, UNS8 parameter_id);#if 0//org codeUNS16 read_state(UNS16 rx_id);#endifvoid write_parm(UNS16 rx_id, UNS16 rx_data);UNS16 read_status(void);#endif /* __AT2021_API_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -