codec/codec_h_ctrl.c File Reference
functions of codec device handler operation More...
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <codec_error.h>
#include <codec.h>
#include "codec_h_ctrl.h"
Go to the source code of this file.
Functions | |
CODEC_HANDLE | codec_h_open (const char *port_addr, int flags) |
codec_h_open Open codec devices by file name | |
CODEC_HANDLE | codec_h_open_rd (const char *port_addr) |
codec_h_open_rd Open codec devices by file name in read_only mode | |
int | codec_h_close (CODEC_HANDLE h) |
codec_h_close Close codec devices | |
int | codec_h_control (CODEC_HANDLE h, int cmd, unsigned long paramter) |
codec_h_control IOCTL commands for codec devices | |
int | codec_h_read (CODEC_HANDLE handle, void *buffer, int size) |
codec_h_read Read data from codec devices | |
int | codec_h_write (CODEC_HANDLE handle, void *buffer, int size) |
codec_h_write Write data to codec devices |
Detailed Description
functions of codec device handler operation
- Author:
- Zhou Zhi <[email protected]>
- Version:
- 2.0.0
- Date:
- 2011-02-24
Definition in file codec_h_ctrl.c.
Function Documentation
int codec_h_close | ( | CODEC_HANDLE | h | ) |
codec_h_close Close codec devices
- Parameters:
-
[in] h Handler of codec device
- Returns:
- 0 for success
Definition at line 74 of file codec_h_ctrl.c.
Referenced by codec_close(), codec_close_cntl(), codec_close_sub(), and codec_close_sub_fd().
int codec_h_control | ( | CODEC_HANDLE | h, | |
int | cmd, | |||
unsigned long | paramter | |||
) |
codec_h_control IOCTL commands for codec devices
- Parameters:
-
[in] h Codec device handler [in] cmd IOCTL commands [in] paramter IOCTL commands parameter
- Returns:
- 0 for success, non-0 for fail
Definition at line 93 of file codec_h_ctrl.c.
Referenced by codec_checkin_pts(), codec_get_abuf_state(), codec_get_adec_state(), codec_get_cntl_state(), codec_get_sub_size(), codec_get_sub_size_fd(), codec_get_vbuf_state(), codec_get_vdec_state(), codec_init(), codec_reset_audio(), codec_reset_subtile(), codec_set_audio_pid(), codec_set_cntl_avthresh(), codec_set_cntl_mode(), codec_set_cntl_syncthresh(), codec_set_dec_reset(), and codec_set_sub_id().
CODEC_HANDLE codec_h_open | ( | const char * | port_addr, | |
int | flags | |||
) |
codec_h_open Open codec devices by file name
- Parameters:
-
[in] port_addr File name of codec device [in] flags Open flags
- Returns:
- The handler of codec device
Definition at line 34 of file codec_h_ctrl.c.
Referenced by codec_init_cntl(), and codec_init_sub().
CODEC_HANDLE codec_h_open_rd | ( | const char * | port_addr | ) |
codec_h_open_rd Open codec devices by file name in read_only mode
- Parameters:
-
[in] port_addr File name of codec device
- Returns:
- THe handler of codec device
Definition at line 54 of file codec_h_ctrl.c.
Referenced by codec_open_sub_read().
int codec_h_read | ( | CODEC_HANDLE | handle, | |
void * | buffer, | |||
int | size | |||
) |
codec_h_read Read data from codec devices
- Parameters:
-
[in] handle Codec device handler [out] buffer Buffer for the data read from codec device [in] size Size of the data to be read
- Returns:
- read length or fail if < 0
Definition at line 119 of file codec_h_ctrl.c.
Referenced by codec_read(), codec_read_sub_data(), and codec_read_sub_data_fd().
int codec_h_write | ( | CODEC_HANDLE | handle, | |
void * | buffer, | |||
int | size | |||
) |
codec_h_write Write data to codec devices
- Parameters:
-
[in] handle Codec device handler [out] buffer Buffer for the data to be written to codec device [in] size Size of the data to be written
- Returns:
- write length or fail if < 0
Definition at line 137 of file codec_h_ctrl.c.
Referenced by codec_write(), and codec_write_sub_data().
Generated on Fri Feb 25 15:30:30 2011 for Amcodec by 1.6.1