Basic Types and Utilities

차례

Synopsis
Description
Details

Basic Types and Utilities - various helper functions

Synopsis

#define TRUE
#define FALSE
#define EDNET_INT_TO_POINTER
#define EDNET_POINTER_TO_INT
#define EDNET_UINT_TO_POINTER
#define EDNET_POINTER_TO_UINT
#define EDNET_CHANNEL_MAX
#define EDNET_CHANNEL_AUDIO
#define E_CHANNEL_VIDEO_MAP_LEN
#define EDNET_PROPERTY_NAME_MAX

typedef EDNetFunc;
enum    EDNetLinkState;
enum    EDNetLinkHookType;
enum    EDNetConnectReplyError;
enum    EDNetRoleSystem;
enum    EDNetPropertyID;
enum    EDNetPropertyState;
enum    EDNetPropertyValue;
struct  EDNetPropertySet;
struct  EDNetSession;
enum    EDNetDeviceID;
enum    EDNetDevicePTZCommand;
enum    EDNetDeviceInfoCommand;
enum    EDNetPhoneCommand;
enum    EDNetDirType;
enum    EDNetMpegFileOpenError;
enum    EDNetMpegFileReadFormat;
enum    EDNetMpegFileReadFlag;
enum    EDNetMpegFileReadType;
enum    EDNetMpegFileSeekFlag;
enum    EDNetMpegFileSeekError;
enum    EDNetMpegFileCloseError;

int         ednet_init                (void);
void        ednet_exit                (void);
void        ednet_set_deinterlace     (int             deinterlace);
const char *ednet_get_link_state_name (EDNetLinkState  state);
const char *ednet_get_property_name   (EDNetPropertyID prop_id);
int         ednetx_init               (void);
void        ednetx_exit               (void);
int         ednet_test_bit            (const void     *addr,
                                       int             bit_nr);
void        ednet_set_bit             (void           *addr,
                                       int             bit_nr);
void        ednet_clear_bit           (void           *addr,
                                       int             bit_nr);

Description

These API provides basic types, constants, library initialization and miscellaneous helper functions.

Details

TRUE

#define TRUE                    (1)

FALSE

#define FALSE                   (0)

EDNET_INT_TO_POINTER

#define EDNET_INT_TO_POINTER (i)  ((void *) (long) (i))

EDNET_POINTER_TO_INT

#define EDNET_POINTER_TO_INT (p)  ((int) (long) (p))

EDNET_UINT_TO_POINTER

#define EDNET_UINT_TO_POINTER (i)   ((void *) (unsigned long) (i))

EDNET_POINTER_TO_UINT

#define EDNET_POINTER_TO_UINT (p)   ((unsigned int) (long) (p))

EDNET_CHANNEL_MAX

#define EDNET_CHANNEL_MAX       256

The number of video and audio channels used in EDNet library. Channel numbers are always between 0 and EDNET_CHANNEL_MAX - 1. Video channels are started from 0 to EDNET_CHANNEL_AUDIO - 1, audio channels are started from EDNET_CHANNEL_AUDIO to EDNET_CHANNEL_MAX - 1.

EDNET_CHANNEL_AUDIO

#define EDNET_CHANNEL_AUDIO     128

The base number of audio channels. So audio channels' number is always EDNET_CHANNEL_AUDIO + n, where n is between 0 and 127.

E_CHANNEL_VIDEO_MAP_LEN

#define E_CHANNEL_VIDEO_MAP_LEN (( - ) / 8)

EDNET_PROPERTY_NAME_MAX

#define EDNET_PROPERTY_NAME_MAX 64

EDNetFunc

typedef int (*EDNetFunc) (void *object, void *param, void *data);

Specifies the type of function which is called wihin EDNetClient hooks. The first parameter 'object' is caller client instance, the second parameter 'param' is hook information described in EDNetLinkHookType, and the last parameter 'data' is user-specific data, which has beed specified as the last parameter 'data' in ednet_client_add_hook() and ednet_client_remove_hook().

EDNetLinkState

typedef enum
{
  EDNET_LINK_STATE_OFFLINE = 0,
  EDNET_LINK_STATE_RESOLVE,
  EDNET_LINK_STATE_CONNECT,
  EDNET_LINK_STATE_INIT,
  EDNET_LINK_STATE_LOGIN,
  EDNET_LINK_STATE_PREPARE,
  EDNET_LINK_STATE_ONLINE,
  EDNET_LINK_STATE_MAX
} EDNetLinkState;

A 'link' stands for a connection between a network client object and a network server(DVR/NT). The EDNetLinkState is enumerative type for link state.

The client's current link state can be got by ednet_client_get_state() or notified by EDNET_LINK_HOOK_STATE.

EDNET_LINK_STATE_OFFLINE :

offline or disconnected

EDNET_LINK_STATE_RESOLVE :

resolving host name to IP address

EDNET_LINK_STATE_CONNECT :

connecting to the host

EDNET_LINK_STATE_INIT :

initializing the connection

EDNET_LINK_STATE_LOGIN :

authenticating with user name and password

EDNET_LINK_STATE_PREPARE :

preparing to fetch basic information from the host

EDNET_LINK_STATE_ONLINE :

ready to streaming and control remote hosts

EDNET_LINK_STATE_MAX :

EDNetLinkHookType

typedef enum
{
  EDNET_LINK_HOOK_STATE = 0,
  EDNET_LINK_HOOK_EVENT,
  EDNET_LINK_HOOK_FRAME,
  EDNET_LINK_HOOK_IMAGE,
  EDNET_LINK_HOOK_MAX
} EDNetLinkHookType;

These hook types are used with ednet_client_add_hook(), ednet_client_remove_hook() to add or remove hook functions for applications to get notified when some information or status are changed from EDNetClient objects.

EDNET_LINK_HOOK_STATE :

notified when a link state is changed. You can get client's state with ednet_client_get_state().

EDNET_LINK_HOOK_EVENT :

notified with EDNetEvent to pass information to applications.

EDNET_LINK_HOOK_FRAME :

notified with EDNetFrame to pass video / audio frames to applications.

EDNET_LINK_HOOK_IMAGE :

notified with EDNetFrame to pass video yuv images to create still images.

EDNET_LINK_HOOK_MAX :

EDNetConnectReplyError

typedef enum
{
  EDNET_CONNECT_REPLY_OK                     = 0,
  EDNET_CONNECT_REPLY_ERROR_RESOLVE,
  EDNET_CONNECT_REPLY_ERROR_CONNECT,
  EDNET_CONNECT_REPLY_ERROR_LOGIN,
  EDNET_CONNECT_REPLY_ERROR_PERMISSION,
  EDNET_CONNECT_REPLY_ERROR_CONNECTION_LIMIT
} EDNetConnectReplyError;

Describes connection errors.

EDNET_CONNECT_REPLY_OK :

success

EDNET_CONNECT_REPLY_ERROR_RESOLVE :

failed to resolve IP

EDNET_CONNECT_REPLY_ERROR_CONNECT :

failed to connect

EDNET_CONNECT_REPLY_ERROR_LOGIN :

failed to login due to invalid user and password

EDNET_CONNECT_REPLY_ERROR_PERMISSION :

failed to login due to insufficient permission

EDNET_CONNECT_REPLY_ERROR_CONNECTION_LIMIT :

failed to login due to reach connection limitation

EDNetRoleSystem

typedef enum
{
  EDNET_ROLE_SYSTEM_CONFIG  = (1 << 0),
  EDNET_ROLE_SYSTEM_SEARCH  = (1 << 1),
  EDNET_ROLE_SYSTEM_DEVICE  = (1 << 2),
  EDNET_ROLE_SYSTEM_NETWORK = (1 << 3),
  EDNET_ROLE_SYSTEM_BACKUP  = (1 << 4)
} EDNetRoleSystem;

Describes system role information.

EDNET_ROLE_SYSTEM_CONFIG :

can configure the system

EDNET_ROLE_SYSTEM_SEARCH :

can search the recorded files

EDNET_ROLE_SYSTEM_DEVICE :

can control devices

EDNET_ROLE_SYSTEM_NETWORK :

can connect from network

EDNET_ROLE_SYSTEM_BACKUP :

can backup the recorded files

EDNetPropertyID

typedef enum
{
  EDNET_PROPERTY_NAME           = 0,
  EDNET_PROPERTY_WIDTH,
  EDNET_PROPERTY_HEIGHT,
  EDNET_PROPERTY_CAPTURE_RATE,
  EDNET_PROPERTY_AUDIO_CHANNELS,
  EDNET_PROPERTY_SAMPLE_RATE,
  EDNET_PROPERTY_CODEC,
  EDNET_PROPERTY_BITRATE,
  EDNET_PROPERTY_GOP_SIZE,
  EDNET_PROPERTY_FRAME_RATE,
  EDNET_PROPERTY_CONTRAST,
  EDNET_PROPERTY_BRIGHTNESS,
  EDNET_PROPERTY_COLORNESS,
  EDNET_PROPERTY_HUE,
  EDNET_PROPERTY_RECORD_RATE,
  EDNET_PROPERTY_STATE,
  EDNET_PROPERTY_LINKED_AUDIO,
  EDNET_PROPERTY_MAX
} EDNetPropertyID;

Channel property types.

EDNET_PROPERTY_NAME :

channel name

EDNET_PROPERTY_WIDTH :

video width

EDNET_PROPERTY_HEIGHT :

video height

EDNET_PROPERTY_CAPTURE_RATE :

capture rate

EDNET_PROPERTY_AUDIO_CHANNELS :

the number of audio channels (1:mono, 2:stereo)

EDNET_PROPERTY_SAMPLE_RATE :

audio sample rate

EDNET_PROPERTY_CODEC :

codec, see EDNetCodecID

EDNET_PROPERTY_BITRATE :

video bitrate

EDNET_PROPERTY_GOP_SIZE :

video gop size

EDNET_PROPERTY_FRAME_RATE :

video frame rate

EDNET_PROPERTY_CONTRAST :

video contrast

EDNET_PROPERTY_BRIGHTNESS :

video brightness

EDNET_PROPERTY_COLORNESS :

video colorness

EDNET_PROPERTY_HUE :

video hue

EDNET_PROPERTY_RECORD_RATE :

video recording rate

EDNET_PROPERTY_STATE :

state, see EDNetPropertyState

EDNET_PROPERTY_LINKED_AUDIO :

linked audio channel

EDNET_PROPERTY_MAX :

EDNetPropertyState

typedef enum
{
  EDNET_PROPERTY_STATE_SIGNAL    = (1 << 0),
  EDNET_PROPERTY_STATE_PTZ_AVAIL = (1 << 1),
  EDNET_PROPERTY_STATE_HR        = (1 << 2),
  EDNET_PROPERTY_STATE_HIDDEN    = (1 << 3),
  EDNET_PROPERTY_STATE_AUDIO     = (1 << 4)
} EDNetPropertyState;

The state of the channel.

EDNET_PROPERTY_STATE_SIGNAL :

has valid signal (0 means loss)

EDNET_PROPERTY_STATE_PTZ_AVAIL :

has PTZ device

EDNET_PROPERTY_STATE_HR :

reserved

EDNET_PROPERTY_STATE_HIDDEN :

is hidden

EDNET_PROPERTY_STATE_AUDIO :

has linked audio

EDNetPropertyValue

typedef enum
{
  EDNET_PROPERTY_VALUE_INTEGER = 0,
  EDNET_PROPERTY_VALUE_STRING
} EDNetPropertyValue;

The type of channel property values.

EDNET_PROPERTY_VALUE_INTEGER :

integer value

EDNET_PROPERTY_VALUE_STRING :

string value

EDNetPropertySet

typedef struct
{
  char name[64];
  int  value[EDNET_PROPERTY_MAX];
} EDNetPropertySet;

char name[64] :

int value[EDNET_PROPERTY_MAX] :

EDNetSession

typedef struct
{
  int  sid;
  char addr[32];
  int  port;
  int  uid;
} EDNetSession;

int sid :

Session ID

char addr[32] :

int port :

int uid :

User ID

EDNetDeviceID

typedef enum
{
  EDNET_DEVICE_GENERAL        = 0x00,
  EDNET_DEVICE_PTZ            = 0x01,
  EDNET_DEVICE_MOTION         = 0x02,
  EDNET_DEVICE_ALARM          = 0x03,
  EDNET_DEVICE_SENSOR         = 0x04,
  EDNET_DEVICE_DISK           = 0x05,
  EDNET_DEVICE_VIDEO_LOSS     = 0x06,
  EDNET_DEVICE_RAID           = 0x07,
  EDNET_DEVICE_VIDEO_RECOVERY = 0x08,
  EDNET_DEVICE_EXTERNAL       = 0x40,
  EDNET_DEVICE_ANALOG         = 0x41,
  EDNET_DEVICE_CUSTOM         = 0x80
} EDNetDeviceID;

Event devices

EDNET_DEVICE_GENERAL :

General event

EDNET_DEVICE_PTZ :

PTZ event

EDNET_DEVICE_MOTION :

Motion detection event

EDNET_DEVICE_ALARM :

Replay event

EDNET_DEVICE_SENSOR :

Sensor event

EDNET_DEVICE_DISK :

Disk event

EDNET_DEVICE_VIDEO_LOSS :

Video signal loss event

EDNET_DEVICE_RAID :

Raid device event

EDNET_DEVICE_VIDEO_RECOVERY :

Video signal recovery event

EDNET_DEVICE_EXTERNAL :

External event

EDNET_DEVICE_ANALOG :

Analog input event

EDNET_DEVICE_CUSTOM :

User defined event

EDNetDevicePTZCommand

typedef enum
{
  EDNET_DEVICE_PTZ_MOVE              = (0x0001 << 16),
  EDNET_DEVICE_PTZ_MOVE_LEFT_UP      = (0x0001 << 16) | 0x0000,
  EDNET_DEVICE_PTZ_MOVE_UP           = (0x0001 << 16) | 0x0001,
  EDNET_DEVICE_PTZ_MOVE_RIGHT_UP     = (0x0001 << 16) | 0x0002,
  EDNET_DEVICE_PTZ_MOVE_LEFT         = (0x0001 << 16) | 0x0003,
  EDNET_DEVICE_PTZ_MOVE_STOP         = (0x0001 << 16) | 0x0004,
  EDNET_DEVICE_PTZ_MOVE_RIGHT        = (0x0001 << 16) | 0x0005,
  EDNET_DEVICE_PTZ_MOVE_LEFT_DOWN    = (0x0001 << 16) | 0x0006,
  EDNET_DEVICE_PTZ_MOVE_DOWN         = (0x0001 << 16) | 0x0007,
  EDNET_DEVICE_PTZ_MOVE_RIGHT_DOWN   = (0x0001 << 16) | 0x0008,
  EDNET_DEVICE_PTZ_MOVE_ZOOM_IN      = (0x0001 << 16) | 0x0009,
  EDNET_DEVICE_PTZ_MOVE_ZOOM_OUT     = (0x0001 << 16) | 0x000a,
  EDNET_DEVICE_PTZ_MOVE_FOCUS_FAR    = (0x0001 << 16) | 0x000b,
  EDNET_DEVICE_PTZ_MOVE_FOCUS_NEAR   = (0x0001 << 16) | 0x000c,
  EDNET_DEVICE_PTZ_STATE             = (0x0002 << 16),
  EDNET_DEVICE_PTZ_STATE_AUTOPAN_ON  = (0x0002 << 16) | 0x0000,
  EDNET_DEVICE_PTZ_STATE_AUTOPAN_OFF = (0x0002 << 16) | 0x0001,
  EDNET_DEVICE_PTZ_STATE_LIGHT_ON    = (0x0002 << 16) | 0x0002,
  EDNET_DEVICE_PTZ_STATE_LIGHT_OFF   = (0x0002 << 16) | 0x0003,
  EDNET_DEVICE_PTZ_PRESET_SET        = (0x0101 << 16),
  EDNET_DEVICE_PTZ_PRESET_MOVE       = (0x0102 << 16),
  EDNET_DEVICE_PTZ_PRESET_RESET      = (0x0103 << 16)
} EDNetDevicePTZCommand;

Commands to control PTZ devices

EDNET_DEVICE_PTZ_MOVE :

Mode

EDNET_DEVICE_PTZ_MOVE_LEFT_UP :

Left up

EDNET_DEVICE_PTZ_MOVE_UP :

Up

EDNET_DEVICE_PTZ_MOVE_RIGHT_UP :

Right up

EDNET_DEVICE_PTZ_MOVE_LEFT :

Left

EDNET_DEVICE_PTZ_MOVE_STOP :

Stop

EDNET_DEVICE_PTZ_MOVE_RIGHT :

Right

EDNET_DEVICE_PTZ_MOVE_LEFT_DOWN :

Left down

EDNET_DEVICE_PTZ_MOVE_DOWN :

Down

EDNET_DEVICE_PTZ_MOVE_RIGHT_DOWN :

Right down

EDNET_DEVICE_PTZ_MOVE_ZOOM_IN :

Zoom in

EDNET_DEVICE_PTZ_MOVE_ZOOM_OUT :

Zoom out

EDNET_DEVICE_PTZ_MOVE_FOCUS_FAR :

Focus far

EDNET_DEVICE_PTZ_MOVE_FOCUS_NEAR :

Focus near

EDNET_DEVICE_PTZ_STATE :

State

EDNET_DEVICE_PTZ_STATE_AUTOPAN_ON :

Autopan on

EDNET_DEVICE_PTZ_STATE_AUTOPAN_OFF :

Autopan off

EDNET_DEVICE_PTZ_STATE_LIGHT_ON :

Light on

EDNET_DEVICE_PTZ_STATE_LIGHT_OFF :

Light off

EDNET_DEVICE_PTZ_PRESET_SET :

Preset set

EDNET_DEVICE_PTZ_PRESET_MOVE :

Preset go

EDNET_DEVICE_PTZ_PRESET_RESET :

Preset reset

EDNetDeviceInfoCommand

typedef enum
{
  EDNET_DEVICE_SUB_CMD_DEVICES = 0x0001,
  EDNET_DEVICE_SUB_CMD_INFO    = 0x0002,
  EDNET_DEVICE_SUB_CMD_PERIOD  = 0x0003,
  EDNET_DEVICE_SUB_CMD_VALUE   = 0x0004
} EDNetDeviceInfoCommand;

Sub-commands to control PTZ devices

EDNET_DEVICE_SUB_CMD_DEVICES :

Request / Response of total device number

EDNET_DEVICE_SUB_CMD_INFO :

Information

EDNET_DEVICE_SUB_CMD_PERIOD :

Set the period of sending device status

EDNET_DEVICE_SUB_CMD_VALUE :

Request current device status

EDNetPhoneCommand

typedef enum
{
  EDNET_PHONE_COMMAND_CALL       = 0x0001,
  EDNET_PHONE_COMMAND_BROADCAST  = 0x0002,
  EDNET_PHONE_COMMAND_ACCEPT     = 0x0003,
  EDNET_PHONE_COMMAND_IGNORE     = 0x0004,
  EDNET_PHONE_COMMAND_LISTEN     = 0x0005,
  EDNET_PHONE_COMMAND_NOT_LISTEN = 0x0006,
  EDNET_PHONE_COMMAND_SPEAK      = 0x0007,
  EDNET_PHONE_COMMAND_NOT_SPEAK  = 0x0008
} EDNetPhoneCommand;

Bidirectional audio communication commands.

EDNET_PHONE_COMMAND_CALL :

Request to connect

EDNET_PHONE_COMMAND_BROADCAST :

Broadcast audio

EDNET_PHONE_COMMAND_ACCEPT :

Accept

EDNET_PHONE_COMMAND_IGNORE :

Cancel connection

EDNET_PHONE_COMMAND_LISTEN :

Listen audio

EDNET_PHONE_COMMAND_NOT_LISTEN :

Not to listen audio

EDNET_PHONE_COMMAND_SPEAK :

Speak audio

EDNET_PHONE_COMMAND_NOT_SPEAK :

Not to speak audio

EDNetDirType

typedef enum
{
  EDNET_DIR_TYPE_FILE           = 0x0001,
  EDNET_DIR_TYPE_DIR            = 0x0002,
  EDNET_DIR_TYPE_ROOT_PATH      = 0x0004,
  EDNET_DIR_TYPE_MASK_FULL_PATH = 0x0100
} EDNetDirType;

Directory types

EDNET_DIR_TYPE_FILE :

File

EDNET_DIR_TYPE_DIR :

Directory

EDNET_DIR_TYPE_ROOT_PATH :

Root of record directory

EDNET_DIR_TYPE_MASK_FULL_PATH :

Absolute path

EDNetMpegFileOpenError

typedef enum
{
  EDNET_MPEG_FILE_OPEN_ERROR_MPEG_DRIVER = 0xff01,
  EDNET_MPEG_FILE_OPEN_ERROR_OPEN        = 0xff02,
  EDNET_MPEG_FILE_OPEN_ERROR_GET_INFO    = 0xff03,
  EDNET_MPEG_FILE_OPEN_ERROR_INVALID     = 0xff04
} EDNetMpegFileOpenError;

Describe error types for opening the recorded file

EDNET_MPEG_FILE_OPEN_ERROR_MPEG_DRIVER :

driver error

EDNET_MPEG_FILE_OPEN_ERROR_OPEN :

open error

EDNET_MPEG_FILE_OPEN_ERROR_GET_INFO :

failed to get information

EDNET_MPEG_FILE_OPEN_ERROR_INVALID :

invalid file name

EDNetMpegFileReadFormat

typedef enum
{
  EDNET_MPEG_FILE_READ_FORMAT_YV12         = 0x01,
  EDNET_MPEG_FILE_READ_FORMAT_UYVY         = 0x02,
  EDNET_MPEG_FILE_READ_FORMAT_RGB16        = 0x03,
  EDNET_MPEG_FILE_READ_FORMAT_RGB24        = 0x04,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_8K  = 0x10,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_16K = 0x20,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_32K = 0x30,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_44K = 0x40,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_48K = 0x50,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_11K = 0x60,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_8K   = 0x70,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_11K  = 0x71,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_16K  = 0x72,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_32K  = 0x73,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_44K  = 0x74,
  EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_48K  = 0x75
} EDNetMpegFileReadFormat;

Describes frame formats which are read from the remote server.

EDNET_MPEG_FILE_READ_FORMAT_YV12 :

YV12 video

EDNET_MPEG_FILE_READ_FORMAT_UYVY :

UYVY video

EDNET_MPEG_FILE_READ_FORMAT_RGB16 :

RGB16 video

EDNET_MPEG_FILE_READ_FORMAT_RGB24 :

RGB24 video

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_8K :

16bit 8000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_16K :

16bit 16000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_32K :

16bit 32000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_44K :

16bit 44000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_48K :

16bit 48000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_16_11K :

16bit 11000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_8K :

8bit 8000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_11K :

8bit 32000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_16K :

8bit 16000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_32K :

8bit 32000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_44K :

8bit 44000Hz audio

EDNET_MPEG_FILE_READ_FORMAT_AUDIO_8_48K :

8bit 48000Hz audio

EDNetMpegFileReadFlag

typedef enum
{
  EDNET_MPEG_FILE_READ_FLAG_KEY_FRAME         = 0x01,
  EDNET_MPEG_FILE_READ_FLAG_ERROR_INVALID     = 0xf1,
  EDNET_MPEG_FILE_READ_FLAG_ERROR_FILE_ID     = 0xf2,
  EDNET_MPEG_FILE_READ_FLAG_ERROR_FORMAT      = 0xf3,
  EDNET_MPEG_FILE_READ_FLAG_ERROR_READ        = 0xf4,
  EDNET_MPEG_FILE_READ_FLAG_ERROR_MPEG_DRIVER = 0xf5,
  EDNET_MPEG_FILE_READ_FLAG_ERROR_MASK        = 0xf0
} EDNetMpegFileReadFlag;

Describes frame status flags.

EDNET_MPEG_FILE_READ_FLAG_KEY_FRAME :

is a key frame

EDNET_MPEG_FILE_READ_FLAG_ERROR_INVALID :

failed to erad due to invalid parameters

EDNET_MPEG_FILE_READ_FLAG_ERROR_FILE_ID :

failed to read due to invalid file id

EDNET_MPEG_FILE_READ_FLAG_ERROR_FORMAT :

failed to read due to unsupported format

EDNET_MPEG_FILE_READ_FLAG_ERROR_READ :

failed to read due to system read call error

EDNET_MPEG_FILE_READ_FLAG_ERROR_MPEG_DRIVER :

failed to read due to driver error

EDNET_MPEG_FILE_READ_FLAG_ERROR_MASK :

error masking value

EDNetMpegFileReadType

typedef enum
{
  EDNET_MPEG_FILE_READ_TYPE_BOTH  = 0,
  EDNET_MPEG_FILE_READ_TYPE_VIDEO = 1
} EDNetMpegFileReadType;

Describes frame types which should be read.

EDNET_MPEG_FILE_READ_TYPE_BOTH :

read video and audio frames

EDNET_MPEG_FILE_READ_TYPE_VIDEO :

read only video frames

EDNetMpegFileSeekFlag

typedef enum
{
  EDNET_MPEG_FILE_SEEK_FLAG_PREV_KEY_FRAME = 0x01,
  EDNET_MPEG_FILE_SEEK_FLAG_NEXT_KEY_FRAME = 0x02,
  EDNET_MPEG_FILE_SEEK_FLAG_KEY_FRAME      = 0x10
} EDNetMpegFileSeekFlag;

Describes frame seek options.

EDNET_MPEG_FILE_SEEK_FLAG_PREV_KEY_FRAME :

seek to previous key frame

EDNET_MPEG_FILE_SEEK_FLAG_NEXT_KEY_FRAME :

seek to next key frame

EDNET_MPEG_FILE_SEEK_FLAG_KEY_FRAME :

seek to current key frame

EDNetMpegFileSeekError

typedef enum
{
  EDNET_MPEG_FILE_SEEK_ERROR_INVALID     = 0xf1,
  EDNET_MPEG_FILE_SEEK_ERROR_FILE_ID     = 0xf2,
  EDNET_MPEG_FILE_SEEK_ERROR_SEEK        = 0xf3,
  EDNET_MPEG_FILE_SEEK_ERROR_MPEG_DRIVER = 0xf4
} EDNetMpegFileSeekError;

Describes seek status flags.

EDNET_MPEG_FILE_SEEK_ERROR_INVALID :

failed to seek due to invalid parameters

EDNET_MPEG_FILE_SEEK_ERROR_FILE_ID :

failed to seek due to invalid file id

EDNET_MPEG_FILE_SEEK_ERROR_SEEK :

failed to seek due to system seek call error

EDNET_MPEG_FILE_SEEK_ERROR_MPEG_DRIVER :

failed to seek due to driver error

EDNetMpegFileCloseError

typedef enum
{
  EDNET_MPEG_FILE_CLOSE_ERROR_INVALID     = 0xf1,
  EDNET_MPEG_FILE_CLOSE_ERROR_FILD_ID     = 0xf2,
  EDNET_MPEG_FILE_CLOSE_ERROR_MPEG_DRIVER = 0xf3
} EDNetMpegFileCloseError;

Descrubes close status flags.

EDNET_MPEG_FILE_CLOSE_ERROR_INVALID :

failed to close due to invalid parameters

EDNET_MPEG_FILE_CLOSE_ERROR_FILD_ID :

failed to close due to invalid file id

EDNET_MPEG_FILE_CLOSE_ERROR_MPEG_DRIVER :

failed to close due to driver error

ednet_init ()

int         ednet_init                (void);

Initializes EDNet library.

If you want to initialize extra display / sound modules at a time, use ednetx_init() function.

Returns :

0 if success, otherwise -1.

ednet_exit ()

void        ednet_exit                (void);

Finalizes EDNet library.

ednet_set_deinterlace ()

void        ednet_set_deinterlace     (int             deinterlace);

Determines whether deinterlace filter is applied to high resolution video frames (height > 288) after they are decoded from original MPEG-4 frames. If it's set to TRUE, more CPU resource will be required.

deinterlace :

TRUE if deinterlace filter should be applied

const char *ednet_get_link_state_name (EDNetLinkState  state);

Returns a string of the state.

state :

the state of the client

Returns :

a string, which you must not free

ednet_get_property_name ()

const char *ednet_get_property_name   (EDNetPropertyID prop_id);

Returns a string of the property name.

prop_id :

channel's property ID

Returns :

a string, which you must not free

ednetx_init ()

int         ednetx_init               (void);

Initializes EDNet library including display / sound modules.

If you want to initialize just core network module, use ednet_init() function.

Returns :

0 if success, otherwise -1.

ednetx_exit ()

void        ednetx_exit               (void);

Finalizes EDNet library including display / sound modules.

ednet_test_bit ()

int         ednet_test_bit            (const void     *addr,
                                       int             bit_nr);

ednet_set_bit ()

void        ednet_set_bit             (void           *addr,
                                       int             bit_nr);

ednet_clear_bit ()

void        ednet_clear_bit           (void           *addr,
                                       int             bit_nr);