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
25 #include "bcsignals.h"
26 #include "byteorder.h"
32 #include "interlacemodes.h"
35 #include "mwindow.inc"
37 #include "videodevice.inc"
38 #include "mainerror.h"
42 #include <sys/types.h>
51 FileDV::FileDV(Asset *asset, File *file)
52 : FileBase(asset, file)
64 audio_sample_buffer = 0;
65 audio_sample_buffer_len = 0;
66 audio_sample_buffer_start = 0;
67 audio_sample_buffer_end = 0;
68 audio_sample_buffer_maxsize = 0;
70 audio_frames_written = 0;
72 if(asset->format == FILE_UNKNOWN)
73 asset->format = FILE_RAWDV;
74 asset->byte_order = 0;
76 stream_lock = new Mutex("FileDV::stream_lock");
77 decoder_lock = new Mutex("FileDV::decoder_lock");
78 video_position_lock = new Mutex("FileDV::video_position_lock");
83 if(stream) close_file();
85 if(decoder) dv_decoder_free(decoder);
86 if(encoder) dv_encoder_free(encoder);
87 if(audio_encoder) dv_encoder_free(audio_encoder);
91 delete video_position_lock;
93 delete[] video_buffer;
94 delete[] audio_buffer;
96 if(audio_sample_buffer)
98 for(int i = 0; i < asset->channels; i++)
99 delete[] audio_sample_buffer[i];
100 delete[] audio_sample_buffer;
104 void FileDV::get_parameters(BC_WindowBase *parent_window,
106 BC_WindowBase* &format_window,
112 DVConfigAudio *window = new DVConfigAudio(parent_window, asset);
113 format_window = window;
114 window->create_objects();
115 window->run_window();
121 DVConfigVideo *window = new DVConfigVideo(parent_window, asset);
122 format_window = window;
123 window->create_objects();
124 window->run_window();
130 int FileDV::reset_parameters_derived()
132 if(decoder) dv_decoder_free(decoder);
133 if(encoder) dv_encoder_free(encoder);
134 if(audio_encoder) dv_encoder_free(audio_encoder);
139 TRACE("FileDV::reset_parameters_derived 10")
141 TRACE("FileDV::reset_parameters_derived: 20")
142 delete[] audio_buffer;
143 delete[] video_buffer;
144 TRACE("FileDV::reset_parameters_derived: 30")
149 if(stream) fclose(stream);
156 if(audio_sample_buffer)
158 for(int i = 0; i < asset->channels; i++)
159 delete[] audio_sample_buffer[i];
160 delete[] audio_sample_buffer;
162 audio_sample_buffer = 0;
163 audio_sample_buffer_start = 0;
164 audio_sample_buffer_len = 0;
165 audio_sample_buffer_end = 0;
166 audio_sample_buffer_maxsize = 0;
168 audio_frames_written = 0;
169 // output_size gets set in open_file, once we know if the frames are PAL or NTSC
170 // output and input are allocated at the same point.
177 int FileDV::open_file(int rd, int wr)
180 TRACE("FileDV::open_file 10")
185 TRACE("FileDV::open_file 20")
188 if (!(asset->height == 576 && asset->width == 720 && asset->frame_rate == 25) &&
189 !(asset->height == 480 && asset->width == 720 && (asset->frame_rate >= 29.96 && asset->frame_rate <= 29.98)))
191 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);
192 if (asset->height == 480 && asset->width == 720 && asset->frame_rate == 30)
194 eprintf(_("Suggestion: Proper frame rate for NTSC DV is 29.97 fps, not 30 fps\n"));
198 if (!(asset->channels == 2 && (asset->sample_rate == 48000 || asset->sample_rate == 44100)) &&
199 !((asset->channels == 4 || asset->channels == 2) && asset->sample_rate == 32000))
201 eprintf(_("Raw DV format does not support following audio configuration : %i channels at sample rate: %iHz\n"), asset->channels, asset->sample_rate);
206 if((stream = fopen(asset->path, "w+b")) == 0)
208 eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path);
212 // Create a new encoder
213 if(encoder) dv_encoder_free(encoder);
214 encoder = dv_encoder_new(0,0,0);
215 encoder->vlc_encode_passes = 3;
216 encoder->static_qno = 0;
217 encoder->force_dct = DV_DCT_AUTO;
219 if(audio_encoder) dv_encoder_free(audio_encoder);
220 audio_encoder = dv_encoder_new(0, 0, 0);
221 audio_encoder->vlc_encode_passes = 3;
222 audio_encoder->static_qno = 0;
223 audio_encoder->force_dct = DV_DCT_AUTO;
225 if(decoder) dv_decoder_free(decoder);
226 decoder = dv_decoder_new(0,0,0);
227 decoder->quality = DV_QUALITY_BEST;
230 isPAL = (asset->height == 576 ? 1 : 0);
231 encoder->isPAL = isPAL;
232 output_size = (isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE);
234 // Compare to 16 / 8 rather than == 16 / 9 in case of floating point
236 encoder->is16x9 = asset->aspect_ratio > 16 / 8;
242 TRACE("FileDV::open_file 30")
246 TRACE("FileDV::open_file 40")
248 if((stream = fopen(asset->path, "rb")) == 0)
250 eprintf(_("Error while opening \"%s\" for reading. \n%m\n"), asset->path);
254 // temp storage to find out the correct info from the stream.
255 temp = new unsigned char[DV1394_PAL_FRAME_SIZE];
256 memset(temp, 0, DV1394_PAL_FRAME_SIZE);
258 // need file size info to get length.
259 stat(asset->path, &info);
261 TRACE("FileDV::open_file 50")
263 // read the first frame so we can get the stream info from it
264 // by reading the greatest possible frame size, we ensure we get all the
265 // data. libdv will determine if it's PAL or NTSC, and input and output
266 // buffers get allocated accordingly.
267 fread(temp, DV1394_PAL_FRAME_SIZE, 1, stream);
269 TRACE("FileDV::open_file 60")
271 if(decoder) dv_decoder_free(decoder);
272 decoder = dv_decoder_new(0,0,0);
273 decoder->quality = DV_QUALITY_BEST;
276 if(dv_parse_header(decoder, temp) > -1 )
278 // define video params first -- we need to find out output_size
280 asset->video_data = 1;
283 //TODO: according to the information I found, letterbox and widescreen
284 //are the same thing; however, libdv provides a function to check
285 //if the video feed is one of the other. Need to find out if there
287 if(dv_format_normal(decoder) != 0) asset->aspect_ratio = (double) 4 / 3;
288 else asset->aspect_ratio = (double) 16 / 9;
290 asset->width = decoder->width;
291 asset->height = decoder->height;
293 if(dv_is_progressive(decoder) > 0)
294 asset->interlace_mode = ILACE_MODE_NOTINTERLACED;
296 asset->interlace_mode = ILACE_MODE_BOTTOM_FIRST;
298 isPAL = dv_is_PAL(decoder);
300 output_size = (isPAL ? DV1394_PAL_FRAME_SIZE : DV1394_NTSC_FRAME_SIZE);
301 asset->video_length = info.st_size / output_size;
303 if(!asset->frame_rate)
304 asset->frame_rate = (isPAL ? 25 : 29.97);
305 strncpy(asset->vcodec, "dvc ", 4);
307 // see if there are any audio tracks
308 asset->channels = dv_get_num_channels(decoder);
309 if(asset->channels > 0)
311 asset->audio_data = 1;
312 asset->sample_rate = dv_get_frequency(decoder);
313 // libdv always scales the quantization up to 16 bits for dv_decode_full_audio
315 asset->audio_length = (int64_t) (info.st_size / output_size / asset->frame_rate * asset->sample_rate);
316 strncpy(asset->acodec, "dvc ", 4);
319 asset->audio_data = 0;
323 asset->audio_data = 0;
324 asset->video_data = 0;
327 fseeko(stream, 0, SEEK_SET);
328 TRACE("FileDV::open_file 80")
333 // allocate space for audio and video
334 video_buffer = new unsigned char[output_size + 4];
335 audio_buffer = new unsigned char[output_size + 4];
341 int FileDV::check_sig(Asset *asset)
343 unsigned char temp[3];
344 FILE *t_stream = fopen(asset->path, "rb");
346 fread(&temp, 3, 1, t_stream);
350 if(temp[0] == 0x1f &&
358 int FileDV::close_file_derived()
360 if(stream) fclose(stream);
366 int64_t FileDV::get_video_position()
368 return video_position;
371 int64_t FileDV::get_audio_position()
373 return audio_position;
376 int FileDV::set_video_position(int64_t x)
382 int FileDV::set_audio_position(int64_t x)
388 int FileDV::audio_samples_copy(double **buffer, int64_t len)
390 // take the buffer and copy it into a queue
391 if(!audio_sample_buffer)
393 audio_sample_buffer = new int16_t*[asset->channels];
394 if(!audio_sample_buffer)
396 fprintf(stderr, _("ERROR: Unable to allocate memory for audio_sample_buffer.\n"));
400 for(int i = 0; i < asset->channels; i++)
402 audio_sample_buffer[i] = new int16_t[len * 2];
404 if(!audio_sample_buffer[i])
406 fprintf(stderr, _("ERROR: Unable to allocate memory for "
407 "audio_sample_buffer channel %d\n"), i);
411 audio_sample_buffer_maxsize = len * 2;
412 audio_sample_buffer_len = 0;
413 audio_sample_buffer_start = 0;
414 audio_sample_buffer_end = 0;
417 if(audio_sample_buffer_maxsize <= audio_sample_buffer_len + len)
419 // Allocate double the needed size
420 for(int i = 0; i < asset->channels; i++)
422 int16_t *tmp = new int16_t[(audio_sample_buffer_len + len) * 2];
425 fprintf(stderr, _("ERROR: Unable to reallocate memory for "
426 "audio_sample_buffer channel %d\n"), i);
429 // Copy everything from audio_sample_buffer into tmp
430 for(int a = 0, b = audio_sample_buffer_start;
431 a < audio_sample_buffer_len;
432 a++, b = (b < (audio_sample_buffer_maxsize - 1) ? (b + 1) : 0))
434 tmp[a] = audio_sample_buffer[i][b];
436 // Free the current buffer, and reassign tmp to audio_sample_buffer[i]
437 delete[] audio_sample_buffer[i];
438 audio_sample_buffer[i] = tmp;
440 audio_sample_buffer_start = 0;
441 audio_sample_buffer_end = audio_sample_buffer_len - 1;
442 audio_sample_buffer_maxsize = (audio_sample_buffer_len + len) * 2;
446 for(int i = 0; i < asset->channels; i++)
448 if(len + audio_sample_buffer_end < audio_sample_buffer_maxsize)
450 // copy buffer into audio_sample_buffer, straight out (no loop around)
451 for(int a = 0; a < len; a++)
453 audio_sample_buffer[i][audio_sample_buffer_end + a] =
454 (buffer[i][a] * 32767);
456 if(i == (asset->channels - 1))
457 audio_sample_buffer_end += len;
461 // Need to loop back to the start of audio_sample_buffer
462 int copy_size = audio_sample_buffer_maxsize - audio_sample_buffer_end;
464 for(int a = 0; a < copy_size; a++)
465 audio_sample_buffer[i][a + audio_sample_buffer_end] =
466 (buffer[i][a] * 32767);
468 for(int a = 0; a < len - copy_size; a++)
469 audio_sample_buffer[i][a] = (buffer[i][a + copy_size] * 32767);
471 if(i == (asset->channels - 1))
472 audio_sample_buffer_end = len - copy_size;
476 audio_sample_buffer_len += len;
481 int FileDV::write_samples(double **buffer, int64_t len)
483 if(audio_samples_copy(buffer, len) != 0)
485 eprintf(_("Unable to store sample"));
488 video_position_lock->lock("FileDV::write_samples");
490 TRACE("FileDV::write_samples 200")
491 // Get number of frames to be written. Order of operations is important here;
492 // the buffer length must be multiplied by the frame rate first in case the
493 // number of samples in the buffer is less than the sample rate.
494 int nFrames = MIN(video_position - audio_frames_written,
495 audio_sample_buffer_len * asset->frame_rate / asset->sample_rate);
497 video_position_lock->unlock();
499 TRACE("FileDV::write_samples 220")
501 for(int i = 0; i < nFrames; i++)
503 stream_lock->lock("FileDV::write_samples 10");
504 if(fseeko(stream, (off_t) audio_frames_written * output_size, SEEK_SET) != 0)
506 eprintf(_("Unable to set audio write position to %ji\n"), (off_t) audio_frames_written * output_size);
508 stream_lock->unlock();
512 if(fread(audio_buffer, output_size, 1, stream) != 1)
514 eprintf(_("Unable to read from audio buffer file\n"));
515 stream_lock->unlock();
519 stream_lock->unlock();
523 TRACE("FileDV::write_samples 230")
525 int samples = dv_calculate_samples(audio_encoder, asset->sample_rate,
526 audio_frames_written);
528 if(samples > audio_sample_buffer_maxsize - 1 - audio_sample_buffer_start)
530 TRACE("FileDV::write_samples 210")
531 int16_t *tmp_buf[asset->channels];
532 for(int a = 0; a < asset->channels; a++)
533 tmp_buf[a] = new int16_t[asset->sample_rate];
535 TRACE("FileDV::write_samples 240")
536 int copy_size = audio_sample_buffer_maxsize - audio_sample_buffer_start - 1;
538 for(int a = 0; a < asset->channels; a++)
540 memcpy(tmp_buf[a], audio_sample_buffer[a] + audio_sample_buffer_start,
541 copy_size * sizeof(int16_t));
542 memcpy(tmp_buf[a] + copy_size, audio_sample_buffer[a],
543 (samples - copy_size) * sizeof(int16_t));
545 TRACE("FileDV::write_samples 250")
546 // Encode the audio into the frame
547 if(dv_encode_full_audio(audio_encoder, tmp_buf, asset->channels,
548 asset->sample_rate, audio_buffer) < 0)
550 eprintf(_("ERROR: unable to encode audio frame %d\n"), audio_frames_written);
552 TRACE("FileDV::write_samples 280")
554 for(int a = 0; a < asset->channels; a++)
559 TRACE("FileDV::write_samples 260")
560 int16_t **tmp_buf2 = new int16_t*[asset->channels];
561 for(int a = 0; a < asset->channels; a++)
562 tmp_buf2[a] = audio_sample_buffer[a] + audio_sample_buffer_start;
563 if(dv_encode_full_audio(audio_encoder, tmp_buf2,
564 asset->channels, asset->sample_rate, audio_buffer) < 0)
566 eprintf(_("ERROR: unable to encode audio frame %d\n"), audio_frames_written);
572 TRACE("FileDV::write_samples 270")
574 stream_lock->lock("FileDV::write_samples 20");
575 if(fseeko(stream, (off_t) audio_frames_written * output_size, SEEK_SET) != 0)
577 eprintf(_("ERROR: Unable to relocate for audio write to %ji\n"), (off_t) audio_frames_written * output_size);
578 stream_lock->unlock();
582 if(fwrite(audio_buffer, output_size, 1, stream) != 1)
584 eprintf(_("Unable to write audio to audio buffer\n"));
585 stream_lock->unlock();
589 stream_lock->unlock();
591 audio_frames_written++;
592 audio_sample_buffer_len -= samples;
593 audio_sample_buffer_start += samples;
594 if(audio_sample_buffer_start >= audio_sample_buffer_maxsize)
595 audio_sample_buffer_start -= audio_sample_buffer_maxsize;
597 TRACE("FileDV::write_samples 290")
604 int FileDV::write_frames(VFrame ***frames, int len)
608 if(stream == 0) return 1;
610 for(int j = 0; j < len && !result; j++)
612 VFrame *temp_frame = frames[0][j];
614 //printf("FileDV::write_frames: color_model %i\n", temp_frame->get_color_model());
615 switch(temp_frame->get_color_model())
618 memcpy(video_buffer, temp_frame->get_data(), output_size);
621 //printf("FileDV::write_frames: 4\n");
622 dv_encode_full_frame(encoder, temp_frame->get_rows(),
623 e_dv_color_yuv, video_buffer);
626 //printf("FileDV::write_frames: 5\n");
627 dv_encode_full_frame(encoder, temp_frame->get_rows(),
628 e_dv_color_rgb, video_buffer);
631 unsigned char *data = new unsigned char[asset->height * asset->width * 2];
632 unsigned char **cmodel_buf = new unsigned char *[asset->height];
633 //printf("FileDV::write_frames: 6\n");
634 unsigned char **row_pointers = temp_frame->get_rows();
635 for(int i = 0; i < asset->height; i++)
636 cmodel_buf[i] = data + asset->width * 2 * i;
638 BC_CModels::transfer(cmodel_buf,
654 temp_frame->get_color_model(),
660 dv_encode_full_frame(encoder, cmodel_buf,
661 e_dv_color_yuv, video_buffer);
667 //printf("FileDV::write_frames: 7\n");
669 // This is the only thread that modifies video_position,
670 // so video_position_lock can remain unlocked for reads.
671 stream_lock->lock("FileDV::write_frames");
672 if(fseeko(stream, (off_t) video_position * output_size, SEEK_SET) != 0)
674 eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
676 if(fwrite(video_buffer, output_size, 1, stream) < 1)
678 eprintf(_("Unable to write video data to video buffer"));
680 stream_lock->unlock();
682 video_position_lock->lock();
684 video_position_lock->unlock();
690 int FileDV::read_compressed_frame(VFrame *buffer)
693 if(stream == 0) return 0;
695 if (fseeko(stream, (off_t) video_position * output_size, SEEK_SET))
697 eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
699 result = fread(buffer->get_data(), output_size, 1, stream);
702 buffer->set_compressed_size(result);
707 int FileDV::write_compressed_frame(VFrame *buffer)
710 if(stream == 0) return 0;
712 if (fseeko(stream, (off_t) video_position * output_size, SEEK_SET))
714 eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
716 result = fwrite(buffer->get_data(), buffer->get_compressed_size(), 1, stream);
721 int64_t FileDV::compressed_frame_size()
726 int FileDV::read_samples(double *buffer, int64_t len)
730 int frame_count = get_audio_frame(audio_position);
731 int offset = get_audio_offset(audio_position);
733 stream_lock->lock("FileDV::read_samples");
736 stream_lock->unlock();
739 stream_lock->unlock();
741 // If the sample rate is 32 kHz, and the bitsize is 12, libdv
742 // requires we have space allocated for 4 channels even if
743 // the data only contains two channels.
745 // decoder will exist since it is not free'd after open_file
746 int channels = (asset->sample_rate == 32000 && decoder->audio->quantization == 12) ? 4 : 2;
748 int16_t **out_buffer = new int16_t*[channels];
749 for(int i = 0; i < channels; i++)
750 out_buffer[i] = new int16_t[DV_AUDIO_MAX_SAMPLES];
756 if(fseeko(stream, (off_t) frame_count * output_size, SEEK_SET) != 0)
758 stream_lock->unlock();
763 if(fread(audio_buffer, output_size, 1, stream) < 1)
765 stream_lock->unlock();
770 stream_lock->unlock();
774 decoder_lock->lock("FileDV::read_samples");
776 if(dv_decode_full_audio(decoder, audio_buffer, out_buffer) < 0)
778 eprintf(_("Error decoding audio frame %d\n"), frame_count - 1);
781 int end = dv_get_num_samples(decoder);
782 decoder_lock->unlock();
784 if(len - count + offset < end)
785 end = len - count + offset;
787 for(int i = offset; i < end; i++)
788 buffer[count++] = out_buffer[file->current_channel][i] / 32767.0;
793 for(int i = 0; i < channels; i++)
794 delete[] out_buffer[i];
797 audio_position += len;
802 int FileDV::read_frame(VFrame *frame)
804 if(stream == 0) return 1;
805 int pitches[3] = {720 * 2, 0, 0};
807 TRACE("FileDV::read_frame 1")
808 unsigned char **row_pointers = frame->get_rows();
811 TRACE("FileDV::read_frame 10")
813 // Seek to video position
814 stream_lock->lock("FileDV::read_frame");
815 if(fseeko(stream, (off_t) video_position * output_size, SEEK_SET) < 0)
817 eprintf(_("Unable to seek file to %ji"), (off_t)(video_position * output_size));
818 stream_lock->unlock();
821 fread(video_buffer, output_size, 1, stream);
822 stream_lock->unlock();
826 TRACE("FileDV::read_frame 20")
828 switch(frame->get_color_model())
832 TRACE("FileDV::read_frame 30")
834 frame->allocate_compressed_data(output_size);
835 frame->set_compressed_size(output_size);
836 memcpy(frame->get_data(), video_buffer, output_size);
840 TRACE("FileDV::read_frame 40")
842 pitches[0] = 720 * 3;
843 decoder_lock->lock("FileDV::read_frame 10");
844 dv_decode_full_frame(decoder, video_buffer, e_dv_color_rgb,
845 row_pointers, pitches);
846 decoder_lock->unlock();
849 TRACE("FileDV::read_frame 50")
850 decoder_lock->lock("FileDV::read_frame 20");
851 dv_decode_full_frame(decoder, video_buffer, e_dv_color_yuv,
852 row_pointers, pitches);
853 decoder_lock->unlock();
857 unsigned char *data = new unsigned char[asset->height * asset->width * 2];
858 unsigned char **temp_pointers = new unsigned char*[asset->height];
860 for(int i = 0; i < asset->height; i++)
861 temp_pointers[i] = data + asset->width * 2 * i;
864 TRACE("FileDV::read_frame 69")
866 decoder_lock->lock("FileDV::read_frame 30");
867 dv_decode_full_frame(decoder, video_buffer, e_dv_color_yuv,
868 temp_pointers, pitches);
869 decoder_lock->unlock();
871 TRACE("FileDV::read_frame 70")
873 BC_CModels::transfer(row_pointers,
890 frame->get_color_model(),
895 //for(int i = 0; i < asset->height; i++)
896 // delete[] temp_pointers[i];
897 delete[] temp_pointers;
904 TRACE("FileDV::read_frame 80")
911 int FileDV::colormodel_supported(int colormodel)
916 int FileDV::can_copy_from(Edit *edit, int64_t position)
918 if(edit->asset->format == FILE_RAWDV)
924 int FileDV::get_best_colormodel(Asset *asset, int driver)
931 case PLAYBACK_X11_XV:
934 case PLAYBACK_DV1394:
935 case PLAYBACK_FIREWIRE:
936 return BC_COMPRESSED;
939 case VIDEO4LINUX2JPEG:
942 case CAPTURE_FIREWIRE:
943 return BC_COMPRESSED;
949 int FileDV::get_audio_frame(int64_t pos)
951 return (double) pos * asset->frame_rate / asset->sample_rate;
954 // Get the sample offset from the frame start reported by get_audio_frame
955 int FileDV::get_audio_offset(int64_t pos)
957 int frame = get_audio_frame(pos);
959 // Samples needed from last frame
960 return pos - frame * asset->sample_rate / asset->frame_rate;
983 DVConfigAudio::DVConfigAudio(BC_WindowBase *parent_window, Asset *asset)
984 : BC_Window(_(PROGRAM_NAME ": Audio Compression"),
985 parent_window->get_abs_cursor_x(1),
986 parent_window->get_abs_cursor_y(1),
990 this->parent_window = parent_window;
994 DVConfigAudio::~DVConfigAudio()
999 void DVConfigAudio::create_objects()
1001 add_tool(new BC_Title(10, 10, _("There are no audio options for this format")));
1002 add_subwindow(new BC_OKButton(this));
1005 int DVConfigAudio::close_event()
1016 DVConfigVideo::DVConfigVideo(BC_WindowBase *parent_window, Asset *asset)
1017 : BC_Window(_(PROGRAM_NAME ": Video Compression"),
1018 parent_window->get_abs_cursor_x(1),
1019 parent_window->get_abs_cursor_y(1),
1023 this->parent_window = parent_window;
1024 this->asset = asset;
1027 DVConfigVideo::~DVConfigVideo()
1032 void DVConfigVideo::create_objects()
1034 add_tool(new BC_Title(10, 10, _("There are no video options for this format")));
1035 add_subwindow(new BC_OKButton(this));
1038 int DVConfigVideo::close_event()