4 * Copyright (C) 2004 Richard Baverstock
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 class FileDV : public FileBase
37 FileDV(Asset *asset, File *file);
40 static void get_parameters(BC_WindowBase *parent_window,
41 Asset *asset, BC_WindowBase* &format_window,
42 int audio_options, int video_options, EDL *edl);
44 int reset_parameters_derived();
45 int open_file(int rd, int wr);
47 static int check_sig(Asset *asset);
48 int close_file_derived();
50 int64_t get_video_position();
51 int64_t get_audio_position();
53 int set_video_position(int64_t x);
54 int set_audio_position(int64_t x);
56 int audio_samples_copy(double **buffer, int64_t len);
58 int write_samples(double **buffer, int64_t len);
59 int write_frames(VFrame ***frames, int len);
61 int read_compressed_frame(VFrame *buffer);
62 int write_compressed_frame(VFrame *buffers);
64 int64_t compressed_frame_size();
66 int read_samples(double *buffer, int64_t len);
67 int read_frame(VFrame *frame);
69 int colormodel_supported(int colormodel);
71 int can_copy_from(Edit *edit, int64_t position);
73 static int get_best_colormodel(Asset *asset, int driver);
75 int get_audio_frame(int64_t pos);
76 int get_audio_offset(int64_t pos);
83 Mutex *video_position_lock;
85 dv_decoder_t *decoder;
86 dv_encoder_t *encoder;
87 dv_encoder_t *audio_encoder;
89 int64_t audio_position;
90 int64_t video_position;
92 unsigned char *video_buffer;
93 unsigned char *audio_buffer;
95 int16_t **audio_sample_buffer;
96 int audio_sample_buffer_start;
97 int audio_sample_buffer_end;
98 int audio_sample_buffer_len;
99 int audio_sample_buffer_maxsize;
101 int audio_frames_written;
108 class DVConfigAudio: public BC_Window
111 DVConfigAudio(BC_WindowBase *parent_window, Asset *asset);
114 void create_objects();
119 BC_WindowBase *parent_window;
124 class DVConfigVideo: public BC_Window
127 DVConfigVideo(BC_WindowBase *parent_window, Asset *asset);
130 void create_objects();
135 BC_WindowBase *parent_window;