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
23 #include "bcsignals.h"
24 #include "byteorder.h"
32 #include "mwindow.inc"
34 #include "videodevice.inc"
35 #include "mainerror.h"
39 #include <sys/types.h>
48 FileDV::FileDV(Asset *asset, File *file)
49 : FileBase(asset, file)
61 audio_sample_buffer = 0;
62 audio_sample_buffer_len = 0;
63 audio_sample_buffer_start = 0;
64 audio_sample_buffer_end = 0;
65 audio_sample_buffer_maxsize = 0;
67 audio_frames_written = 0;
69 if(asset->format == FILE_UNKNOWN)
70 asset->format = FILE_RAWDV;
71 asset->byte_order = 0;
73 stream_lock = new Mutex("FileDV::stream_lock");
74 decoder_lock = new Mutex("FileDV::decoder_lock");
75 video_position_lock = new Mutex("FileDV::video_position_lock");
80 if(stream) close_file();
82 if(decoder) dv_decoder_free(decoder);
83 if(encoder) dv_encoder_free(encoder);
84 if(audio_encoder) dv_encoder_free(audio_encoder);
88 delete video_position_lock;
90 delete[] video_buffer;
91 delete[] audio_buffer;
93 if(audio_sample_buffer)
95 for(int i = 0; i < asset->channels; i++)
96 delete[] audio_sample_buffer[i];
97 delete[] audio_sample_buffer;
101 void FileDV::get_parameters(BC_WindowBase *parent_window,
103 BC_WindowBase* &format_window,
109 DVConfigAudio *window = new DVConfigAudio(parent_window, asset);
110 format_window = window;
111 window->create_objects();
112 window->run_window();
118 DVConfigVideo *window = new DVConfigVideo(parent_window, asset);
119 format_window = window;
120 window->create_objects();
121 window->run_window();
127 int FileDV::reset_parameters_derived()
129 if(decoder) dv_decoder_free(decoder);
130 if(encoder) dv_encoder_free(encoder);
131 if(audio_encoder) dv_encoder_free(audio_encoder);
136 TRACE("FileDV::reset_parameters_derived 10")
138 TRACE("FileDV::reset_parameters_derived: 20")
139 delete[] audio_buffer;
140 delete[] video_buffer;
141 TRACE("FileDV::reset_parameters_derived: 30")
146 if(stream) fclose(stream);
153 if(audio_sample_buffer)
155 for(int i = 0; i < asset->channels; i++)
156 delete[] audio_sample_buffer[i];
157 delete[] audio_sample_buffer;
159 audio_sample_buffer = 0;
160 audio_sample_buffer_start = 0;
161 audio_sample_buffer_len = 0;
162 audio_sample_buffer_end = 0;
163 audio_sample_buffer_maxsize = 0;
165 audio_frames_written = 0;
166 // output_size gets set in open_file, once we know if the frames are PAL or NTSC
167 // output and input are allocated at the same point.
174 int FileDV::open_file(int rd, int wr)
177 TRACE("FileDV::open_file 10")
182 TRACE("FileDV::open_file 20")
185 if (!(asset->height == 576 && asset->width == 720 && asset->frame_rate == 25) &&
186 !(asset->height == 480 && asset->width == 720 && (asset->frame_rate >= 29.96 && asset->frame_rate <= 29.98)))
188 eprintf(_("Raw DV format does not support following resolution: %ix%i framerate: %f\nAllowed resolutions are 720x576 25fps (PAL) and 720x480 29.97fps (NTSC)\n"), asset->width, asset->height, asset->frame_rate);
189 if (asset->height == 480 && asset->width == 720 && asset->frame_rate == 30)
191 eprintf(_("Suggestion: Proper frame rate for NTSC DV is 29.97 fps, not 30 fps\n"));
195 if (!(asset->channels == 2 && (asset->sample_rate == 48000 || asset->sample_rate == 44100)) &&
196 !((asset->channels == 4 || asset->channels == 2) && asset->sample_rate == 32000))
198 eprintf(_("Raw DV format does not support following audio configuration : %i channels at sample rate: %iHz\n"), asset->channels, asset->sample_rate);
203 if((stream = fopen(asset->path, "w+b")) == 0)
205 eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path);
209 // Create a new encoder
210 if(encoder) dv_encoder_free(encoder);
211 encoder = dv_encoder_new(0,0,0);
212 encoder->vlc_encode_passes = 3;
213 encoder->static_qno = 0;
214 encoder->force_dct = DV_DCT_AUTO;
216 if(audio_encoder) dv_encoder_free(audio_encoder);
217 audio_encoder = dv_encoder_new(0, 0, 0);
218 audio_encoder->vlc_encode_passes = 3;
219 audio_encoder->static_qno = 0;
220 audio_encoder->force_dct = DV_DCT_AUTO;
222 if(decoder) dv_decoder_free(decoder);
223 decoder = dv_decoder_new(0,0,0);
224 decoder->quality = DV_QUALITY_BEST;
227 isPAL = (asset->height == 576 ? 1 : 0);
228 encoder->isPAL = isPAL;
229 output_size = (isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE);
231 // Compare to 16 / 8 rather than == 16 / 9 in case of floating point
233 encoder->is16x9 = asset->aspect_ratio > 16 / 8;
239 TRACE("FileDV::open_file 30")
243 TRACE("FileDV::open_file 40")
245 if((stream = fopen(asset->path, "rb")) == 0)
247 eprintf(_("Error while opening \"%s\" for reading. \n%m\n"), asset->path);
251 // temp storage to find out the correct info from the stream.
252 temp = new unsigned char[DV1394_PAL_FRAME_SIZE];
253 memset(temp, 0, DV1394_PAL_FRAME_SIZE);
255 // need file size info to get length.
256 stat(asset->path, &info);
258 TRACE("FileDV::open_file 50")
260 // read the first frame so we can get the stream info from it
261 // by reading the greatest possible frame size, we ensure we get all the
262 // data. libdv will determine if it's PAL or NTSC, and input and output
263 // buffers get allocated accordingly.
264 fread(temp, DV1394_PAL_FRAME_SIZE, 1, stream);
266 TRACE("FileDV::open_file 60")
268 if(decoder) dv_decoder_free(decoder);
269 decoder = dv_decoder_new(0,0,0);
270 decoder->quality = DV_QUALITY_BEST;
273 if(dv_parse_header(decoder, temp) > -1 )
275 // define video params first -- we need to find out output_size
277 asset->video_data = 1;
280 //TODO: according to the information I found, letterbox and widescreen
281 //are the same thing; however, libdv provides a function to check
282 //if the video feed is one of the other. Need to find out if there
284 if(dv_format_normal(decoder) != 0) asset->aspect_ratio = (double) 4 / 3;
285 else asset->aspect_ratio = (double) 16 / 9;
287 asset->width = decoder->width;
288 asset->height = decoder->height;
289 isPAL = dv_is_PAL(decoder);
291 output_size = (isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE);
292 asset->video_length = info.st_size / output_size;
294 if(!asset->frame_rate)
295 asset->frame_rate = (isPAL ? 25 : 29.97);
296 strncpy(asset->vcodec, "dvc ", 4);
298 // see if there are any audio tracks
299 asset->channels = dv_get_num_channels(decoder);
300 if(asset->channels > 0)
302 asset->audio_data = 1;
303 asset->sample_rate = dv_get_frequency(decoder);
304 // libdv always scales the quantization up to 16 bits for dv_decode_full_audio
306 asset->audio_length = (int64_t) (info.st_size / output_size / asset->frame_rate * asset->sample_rate);
307 strncpy(asset->acodec, "dvc ", 4);
310 asset->audio_data = 0;
314 asset->audio_data = 0;
315 asset->video_data = 0;
318 fseeko(stream, 0, SEEK_SET);
319 TRACE("FileDV::open_file 80")
324 // allocate space for audio and video
325 video_buffer = new unsigned char[output_size + 4];
326 audio_buffer = new unsigned char[output_size + 4];
332 int FileDV::check_sig(Asset *asset)
334 unsigned char temp[3];
335 FILE *t_stream = fopen(asset->path, "rb");
337 fread(&temp, 3, 1, t_stream);
341 if(temp[0] == 0x1f &&
349 int FileDV::close_file_derived()
351 if(stream) fclose(stream);
357 int64_t FileDV::get_video_position()
359 return video_position;
362 int64_t FileDV::get_audio_position()
364 return audio_position;
367 int FileDV::set_video_position(int64_t x)
373 int FileDV::set_audio_position(int64_t x)
379 int FileDV::audio_samples_copy(double **buffer, int64_t len)
381 // take the buffer and copy it into a queue
382 if(!audio_sample_buffer)
384 audio_sample_buffer = new int16_t*[asset->channels];
385 if(!audio_sample_buffer)
387 fprintf(stderr, _("ERROR: Unable to allocate memory for audio_sample_buffer.\n"));
391 for(int i = 0; i < asset->channels; i++)
393 audio_sample_buffer[i] = new int16_t[len * 2];
395 if(!audio_sample_buffer[i])
397 fprintf(stderr, _("ERROR: Unable to allocate memory for "
398 "audio_sample_buffer channel %d\n"), i);
402 audio_sample_buffer_maxsize = len * 2;
403 audio_sample_buffer_len = 0;
404 audio_sample_buffer_start = 0;
405 audio_sample_buffer_end = 0;
408 if(audio_sample_buffer_maxsize <= audio_sample_buffer_len + len)
410 // Allocate double the needed size
411 for(int i = 0; i < asset->channels; i++)
413 int16_t *tmp = new int16_t[(audio_sample_buffer_len + len) * 2];
416 fprintf(stderr, _("ERROR: Unable to reallocate memory for "
417 "audio_sample_buffer channel %d\n"), i);
420 // Copy everything from audio_sample_buffer into tmp
421 for(int a = 0, b = audio_sample_buffer_start;
422 a < audio_sample_buffer_len;
423 a++, b = (b < (audio_sample_buffer_maxsize - 1) ? (b + 1) : 0))
425 tmp[a] = audio_sample_buffer[i][b];
427 // Free the current buffer, and reassign tmp to audio_sample_buffer[i]
428 delete[] audio_sample_buffer[i];
429 audio_sample_buffer[i] = tmp;
431 audio_sample_buffer_start = 0;
432 audio_sample_buffer_end = audio_sample_buffer_len - 1;
433 audio_sample_buffer_maxsize = (audio_sample_buffer_len + len) * 2;
437 for(int i = 0; i < asset->channels; i++)
439 if(len + audio_sample_buffer_end < audio_sample_buffer_maxsize)
441 // copy buffer into audio_sample_buffer, straight out (no loop around)
442 for(int a = 0; a < len; a++)
444 audio_sample_buffer[i][audio_sample_buffer_end + a] =
445 (buffer[i][a] * 32767);
447 if(i == (asset->channels - 1))
448 audio_sample_buffer_end += len;
452 // Need to loop back to the start of audio_sample_buffer
453 int copy_size = audio_sample_buffer_maxsize - audio_sample_buffer_end;
455 for(int a = 0; a < copy_size; a++)
456 audio_sample_buffer[i][a + audio_sample_buffer_end] =
457 (buffer[i][a] * 32767);
459 for(int a = 0; a < len - copy_size; a++)
460 audio_sample_buffer[i][a] = (buffer[i][a + copy_size] * 32767);
462 if(i == (asset->channels - 1))
463 audio_sample_buffer_end = len - copy_size;
467 audio_sample_buffer_len += len;
472 int FileDV::write_samples(double **buffer, int64_t len)
474 if(audio_samples_copy(buffer, len) != 0)
476 eprintf(_("Unable to store sample"));
479 video_position_lock->lock("FileDV::write_samples");
481 TRACE("FileDV::write_samples 200")
482 // Get number of frames to be written. Order of operations is important here;
483 // the buffer length must be multiplied by the frame rate first in case the
484 // number of samples in the buffer is less than the sample rate.
485 int nFrames = MIN(video_position - audio_frames_written,
486 audio_sample_buffer_len * asset->frame_rate / asset->sample_rate);
488 video_position_lock->unlock();
490 TRACE("FileDV::write_samples 210")
492 int16_t **tmp_buf = new int16_t*[asset->channels];
493 for(int a = 0; a < asset->channels; a++)
494 tmp_buf[a] = new int16_t[asset->sample_rate];
496 TRACE("FileDV::write_samples 220")
498 for(int i = 0; i < nFrames; i++)
500 stream_lock->lock("FileDV::write_samples 10");
501 if(fseeko(stream, (off_t) audio_frames_written * output_size, SEEK_SET) != 0)
503 eprintf(_("Unable to set audio write position to %ji\n"), (off_t) audio_frames_written * output_size);
505 stream_lock->unlock();
509 if(fread(audio_buffer, output_size, 1, stream) != 1)
511 eprintf(_("Unable to read from audio buffer file\n"));
512 stream_lock->unlock();
516 stream_lock->unlock();
520 TRACE("FileDV::write_samples 230")
522 int samples = dv_calculate_samples(audio_encoder, asset->sample_rate,
523 audio_frames_written);
525 if(samples > audio_sample_buffer_maxsize - 1 - audio_sample_buffer_start)
527 TRACE("FileDV::write_samples 240")
528 int copy_size = audio_sample_buffer_maxsize - audio_sample_buffer_start - 1;
530 for(int a = 0; a < asset->channels; a++)
532 memcpy(tmp_buf[a], audio_sample_buffer[a] + audio_sample_buffer_start,
533 copy_size * sizeof(int16_t));
534 memcpy(tmp_buf[a] + copy_size, audio_sample_buffer[a],
535 (samples - copy_size) * sizeof(int16_t));
537 TRACE("FileDV::write_samples 250")
538 // Encode the audio into the frame
539 if(dv_encode_full_audio(audio_encoder, tmp_buf, asset->channels,
540 asset->sample_rate, audio_buffer) < 0)
542 eprintf(_("ERROR: unable to encode audio frame %d\n"), audio_frames_written);
547 TRACE("FileDV::write_samples 260")
548 int16_t **tmp_buf2 = new int16_t*[asset->channels];
549 for(int a = 0; a < asset->channels; a++)
550 tmp_buf2[a] = audio_sample_buffer[a] + audio_sample_buffer_start;
551 if(dv_encode_full_audio(audio_encoder, tmp_buf2,
552 asset->channels, asset->sample_rate, audio_buffer) < 0)
554 eprintf(_("ERROR: unable to encode audio frame %d\n"), audio_frames_written);
560 TRACE("FileDV::write_samples 270")
562 stream_lock->lock("FileDV::write_samples 20");
563 if(fseeko(stream, (off_t) audio_frames_written * output_size, SEEK_SET) != 0)
565 eprintf(_("ERROR: Unable to relocate for audio write to %ji\n"), (off_t) audio_frames_written * output_size);
566 stream_lock->unlock();
570 if(fwrite(audio_buffer, output_size, 1, stream) != 1)
572 eprintf(_("Unable to write audio to audio buffer\n"));
573 stream_lock->unlock();
577 stream_lock->unlock();
579 audio_frames_written++;
580 audio_sample_buffer_len -= samples;
581 audio_sample_buffer_start += samples;
582 if(audio_sample_buffer_start >= audio_sample_buffer_maxsize)
583 audio_sample_buffer_start -= audio_sample_buffer_maxsize;
586 TRACE("FileDV::write_samples 280")
588 for(int a = 0; a < asset->channels; a++)
592 TRACE("FileDV::write_samples 290")
600 int FileDV::write_frames(VFrame ***frames, int len)
604 if(stream == 0) return 1;
606 for(int j = 0; j < len && !result; j++)
608 VFrame *temp_frame = frames[0][j];
610 //printf("FileDV::write_frames: color_model %i\n", temp_frame->get_color_model());
611 switch(temp_frame->get_color_model())
614 memcpy(video_buffer, temp_frame->get_data(), output_size);
617 //printf("FileDV::write_frames: 4\n");
618 dv_encode_full_frame(encoder, temp_frame->get_rows(),
619 e_dv_color_yuv, video_buffer);
622 //printf("FileDV::write_frames: 5\n");
623 dv_encode_full_frame(encoder, temp_frame->get_rows(),
624 e_dv_color_rgb, video_buffer);
627 unsigned char *data = new unsigned char[asset->height * asset->width * 2];
628 unsigned char **cmodel_buf = new unsigned char *[asset->height];
629 //printf("FileDV::write_frames: 6\n");
630 unsigned char **row_pointers = temp_frame->get_rows();
631 for(int i = 0; i < asset->height; i++)
632 cmodel_buf[i] = data + asset->width * 2 * i;
634 BC_CModels::transfer(cmodel_buf,
650 temp_frame->get_color_model(),
656 dv_encode_full_frame(encoder, cmodel_buf,
657 e_dv_color_yuv, video_buffer);
663 //printf("FileDV::write_frames: 7\n");
665 // This is the only thread that modifies video_position,
666 // so video_position_lock can remain unlocked for reads.
667 stream_lock->lock("FileDV::write_frames");
668 if(fseeko(stream, (off_t) video_position * output_size, SEEK_SET) != 0)
670 eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
672 if(fwrite(video_buffer, output_size, 1, stream) < 1)
674 eprintf(_("Unable to write video data to video buffer"));
676 stream_lock->unlock();
678 video_position_lock->lock();
680 video_position_lock->unlock();
686 int FileDV::read_compressed_frame(VFrame *buffer)
689 if(stream == 0) return 0;
691 if (fseeko(stream, (off_t) video_position * output_size, SEEK_SET))
693 eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
695 result = fread(buffer->get_data(), output_size, 1, stream);
698 buffer->set_compressed_size(result);
703 int FileDV::write_compressed_frame(VFrame *buffer)
706 if(stream == 0) return 0;
708 if (fseeko(stream, (off_t) video_position * output_size, SEEK_SET))
710 eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
712 result = fwrite(buffer->get_data(), buffer->get_compressed_size(), 1, stream);
717 int64_t FileDV::compressed_frame_size()
722 int FileDV::read_samples(double *buffer, int64_t len)
726 int frame_count = get_audio_frame(audio_position);
727 int offset = get_audio_offset(audio_position);
729 stream_lock->lock("FileDV::read_samples");
732 stream_lock->unlock();
735 stream_lock->unlock();
737 // If the sample rate is 32 kHz, and the bitsize is 12, libdv
738 // requires we have space allocated for 4 channels even if
739 // the data only contains two channels.
741 // decoder will exist since it is not free'd after open_file
742 int channels = (asset->sample_rate == 32000 && decoder->audio->quantization == 12) ? 4 : 2;
744 int16_t **out_buffer = new int16_t*[channels];
745 for(int i = 0; i < channels; i++)
746 out_buffer[i] = new int16_t[DV_AUDIO_MAX_SAMPLES];
752 if(fseeko(stream, (off_t) frame_count * output_size, SEEK_SET) != 0)
754 stream_lock->unlock();
759 if(fread(audio_buffer, output_size, 1, stream) < 1)
761 stream_lock->unlock();
766 stream_lock->unlock();
770 decoder_lock->lock("FileDV::read_samples");
772 if(dv_decode_full_audio(decoder, audio_buffer, out_buffer) < 0)
774 eprintf(_("Error decoding audio frame %d\n"), frame_count - 1);
777 int end = dv_get_num_samples(decoder);
778 decoder_lock->unlock();
780 if(len - count + offset < end)
781 end = len - count + offset;
783 for(int i = offset; i < end; i++)
784 buffer[count++] = out_buffer[file->current_channel][i] / 32767.0;
789 for(int i = 0; i < channels; i++)
790 delete[] out_buffer[i];
793 audio_position += len;
798 int FileDV::read_frame(VFrame *frame)
800 if(stream == 0) return 1;
801 int pitches[3] = {720 * 2, 0, 0};
803 TRACE("FileDV::read_frame 1")
804 unsigned char **row_pointers = frame->get_rows();
807 TRACE("FileDV::read_frame 10")
809 // Seek to video position
810 stream_lock->lock("FileDV::read_frame");
811 if(fseeko(stream, (off_t) video_position * output_size, SEEK_SET) < 0)
813 eprintf(_("Unable to seek file to %ji"), (off_t)(video_position * output_size));
814 stream_lock->unlock();
817 fread(video_buffer, output_size, 1, stream);
818 stream_lock->unlock();
822 TRACE("FileDV::read_frame 20")
824 switch(frame->get_color_model())
828 TRACE("FileDV::read_frame 30")
830 frame->allocate_compressed_data(output_size);
831 frame->set_compressed_size(output_size);
832 memcpy(frame->get_data(), video_buffer, output_size);
836 TRACE("FileDV::read_frame 40")
838 pitches[0] = 720 * 3;
839 decoder_lock->lock("FileDV::read_frame 10");
840 dv_decode_full_frame(decoder, video_buffer, e_dv_color_rgb,
841 row_pointers, pitches);
842 decoder_lock->unlock();
845 TRACE("FileDV::read_frame 50")
846 decoder_lock->lock("FileDV::read_frame 20");
847 dv_decode_full_frame(decoder, video_buffer, e_dv_color_yuv,
848 row_pointers, pitches);
849 decoder_lock->unlock();
853 unsigned char *data = new unsigned char[asset->height * asset->width * 2];
854 unsigned char **temp_pointers = new unsigned char*[asset->height];
856 for(int i = 0; i < asset->height; i++)
857 temp_pointers[i] = data + asset->width * 2 * i;
860 TRACE("FileDV::read_frame 69")
862 decoder_lock->lock("FileDV::read_frame 30");
863 dv_decode_full_frame(decoder, video_buffer, e_dv_color_yuv,
864 temp_pointers, pitches);
865 decoder_lock->unlock();
867 TRACE("FileDV::read_frame 70")
869 BC_CModels::transfer(row_pointers,
886 frame->get_color_model(),
891 //for(int i = 0; i < asset->height; i++)
892 // delete[] temp_pointers[i];
893 delete[] temp_pointers;
900 TRACE("FileDV::read_frame 80")
907 int FileDV::colormodel_supported(int colormodel)
912 int FileDV::can_copy_from(Edit *edit, int64_t position)
914 if(edit->asset->format == FILE_RAWDV)
920 int FileDV::get_best_colormodel(Asset *asset, int driver)
927 case PLAYBACK_X11_XV:
930 case PLAYBACK_DV1394:
931 case PLAYBACK_FIREWIRE:
932 return BC_COMPRESSED;
942 case VIDEO4LINUX2JPEG:
945 case CAPTURE_FIREWIRE:
946 return BC_COMPRESSED;
952 int FileDV::get_audio_frame(int64_t pos)
954 return (double) pos * asset->frame_rate / asset->sample_rate;
957 // Get the sample offset from the frame start reported by get_audio_frame
958 int FileDV::get_audio_offset(int64_t pos)
960 int frame = get_audio_frame(pos);
962 // Samples needed from last frame
963 return pos - frame * asset->sample_rate / asset->frame_rate;
986 DVConfigAudio::DVConfigAudio(BC_WindowBase *parent_window, Asset *asset)
987 : BC_Window(_(PROGRAM_NAME ": Audio Compression"),
988 parent_window->get_abs_cursor_x(1),
989 parent_window->get_abs_cursor_y(1),
993 this->parent_window = parent_window;
997 DVConfigAudio::~DVConfigAudio()
1002 void DVConfigAudio::create_objects()
1004 add_tool(new BC_Title(10, 10, _("There are no audio options for this format")));
1005 add_subwindow(new BC_OKButton(this));
1008 int DVConfigAudio::close_event()
1019 DVConfigVideo::DVConfigVideo(BC_WindowBase *parent_window, Asset *asset)
1020 : BC_Window(_(PROGRAM_NAME ": Video Compression"),
1021 parent_window->get_abs_cursor_x(1),
1022 parent_window->get_abs_cursor_y(1),
1026 this->parent_window = parent_window;
1027 this->asset = asset;
1030 DVConfigVideo::~DVConfigVideo()
1035 void DVConfigVideo::create_objects()
1037 add_tool(new BC_Title(10, 10, _("There are no video options for this format")));
1038 add_subwindow(new BC_OKButton(this));
1041 int DVConfigVideo::close_event()