r105: This commit was manufactured by cvs2svn to create tag
[cinelerra_cv/mob.git] / hvirtual / quicktime / libdv.h
blobd72445f4cfb3854321e2a7e4cfac475c9f1a53c6
1 #ifndef LIBDV_H
2 #define LIBDV_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 // Buffer sizes
9 #define DV_NTSC_SIZE 120000
10 #define DV_PAL_SIZE 144000
12 // Norms
13 #define DV_NTSC 0
14 #define DV_PAL 1
16 #ifndef u_int64_t
17 #define u_int64_t unsigned long long
18 #endif
20 #include "libdv/dv.h"
21 #include <pthread.h>
22 #include <sys/time.h>
24 typedef struct
26 dv_decoder_t *decoder;
27 dv_encoder_t *encoder;
28 short *temp_audio[4];
29 unsigned char *temp_video;
30 int use_mmx;
31 int audio_frames;
32 } dv_t;
35 // ================================== The frame decoder
36 dv_t* dv_new();
37 int dv_delete(dv_t* dv);
39 // Decode a video frame from the data and return nonzero if failure
40 int dv_read_video(dv_t *dv,
41 unsigned char **output_rows,
42 unsigned char *data,
43 long bytes,
44 int color_model);
45 // Decode audio from the data and return the number of samples decoded.
46 int dv_read_audio(dv_t *dv,
47 unsigned char *samples,
48 unsigned char *data,
49 long size,
50 int channels,
51 int bits);
53 void dv_write_video(dv_t *dv,
54 unsigned char *data,
55 unsigned char **input_rows,
56 int color_model,
57 int norm);
59 // Write audio into frame after video is encoded.
60 // Returns the number of samples put in frame.
61 int dv_write_audio(dv_t *dv,
62 unsigned char *data,
63 unsigned char *input_samples,
64 int max_samples,
65 int channels,
66 int bits,
67 int rate,
68 int norm);
71 #ifdef __cplusplus
73 #endif
75 #endif