00001 #ifndef LIBDV_H
00002 #define LIBDV_H
00003
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007
00008
00009 #define DV_NTSC_SIZE 120000
00010 #define DV_PAL_SIZE 144000
00011
00012
00013 #define DV_NTSC 0
00014 #define DV_PAL 1
00015
00016
00017 #include <libdv/dv.h>
00018 #include <pthread.h>
00019 #include <sys/time.h>
00020
00021 typedef struct
00022 {
00023 dv_decoder_t *decoder;
00024 dv_encoder_t *encoder;
00025 short *temp_audio[4];
00026 unsigned char *temp_video;
00027 int use_mmx;
00028 int audio_frames;
00029 } dv_t;
00030
00031
00032
00033 dv_t* dv_new();
00034 int dv_delete(dv_t* dv);
00035
00036
00037 int dv_read_video(dv_t *dv,
00038 unsigned char **output_rows,
00039 unsigned char *data,
00040 long bytes,
00041 int color_model);
00042
00043 int dv_read_audio(dv_t *dv,
00044 unsigned char *samples,
00045 unsigned char *data,
00046 long size,
00047 int channels,
00048 int bits);
00049
00050 void dv_write_video(dv_t *dv,
00051 unsigned char *data,
00052 unsigned char **input_rows,
00053 int color_model,
00054 int norm);
00055
00056
00057
00058 int dv_write_audio(dv_t *dv,
00059 unsigned char *data,
00060 unsigned char *input_samples,
00061 int max_samples,
00062 int channels,
00063 int bits,
00064 int rate,
00065 int norm);
00066
00067
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071
00072 #endif