update internationalization data
[goodguy/history.git] / cinelerra-5.0 / cinelerra / filedv.C
index 4906073497caca89884bd5b393e1140905defb55..6e582b850eb66c463e909dce75331907530fcce8 100644 (file)
@@ -187,24 +187,24 @@ TRACE("FileDV::open_file 20")
                if (!(asset->height == 576 && asset->width == 720 && asset->frame_rate == 25) &&
                    !(asset->height == 480 && asset->width == 720 && (asset->frame_rate >= 29.96 && asset->frame_rate <= 29.98)))
                {
-                       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);
+                       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);
                        if (asset->height == 480 && asset->width == 720 && asset->frame_rate == 30)
                        {
-                               eprintf("Suggestion: Proper frame rate for NTSC DV is 29.97 fps, not 30 fps\n");
+                               eprintf(_("Suggestion: Proper frame rate for NTSC DV is 29.97 fps, not 30 fps\n"));
                        }
                        return 1;       
                }   
                if (!(asset->channels == 2 && (asset->sample_rate == 48000 || asset->sample_rate == 44100)) &&
                    !((asset->channels == 4 || asset->channels == 2) && asset->sample_rate == 32000))
                {
-                       eprintf("Raw DV format does not support following audio configuration : %i channels at sample rate: %iHz\n", asset->channels, asset->sample_rate);
+                       eprintf(_("Raw DV format does not support following audio configuration : %i channels at sample rate: %iHz\n"), asset->channels, asset->sample_rate);
                        return 1;
                }   
                  
 
                if((stream = fopen(asset->path, "w+b")) == 0)
                {
-                       eprintf("Error while opening \"%s\" for writing. \n%m\n", asset->path);
+                       eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path);
                        return 1;
                }
                
@@ -246,7 +246,7 @@ TRACE("FileDV::open_file 40")
 
                if((stream = fopen(asset->path, "rb")) == 0)
                {
-                       eprintf("Error while opening \"%s\" for reading. \n%m\n", asset->path);
+                       eprintf(_("Error while opening \"%s\" for reading. \n%m\n"), asset->path);
                        return 1;
                }
 
@@ -386,7 +386,7 @@ int FileDV::audio_samples_copy(double **buffer, int64_t len)
                audio_sample_buffer = new int16_t*[asset->channels];
                if(!audio_sample_buffer)
                {
-                       fprintf(stderr, "ERROR: Unable to allocate memory for audio_sample_buffer.\n");
+                       fprintf(stderr, _("ERROR: Unable to allocate memory for audio_sample_buffer.\n"));
                        return 1;
                }
                
@@ -396,8 +396,8 @@ int FileDV::audio_samples_copy(double **buffer, int64_t len)
 
                        if(!audio_sample_buffer[i])
                        {
-                               fprintf(stderr, "ERROR: Unable to allocate memory for "
-                                       "audio_sample_buffer channel %d\n", i);
+                               fprintf(stderr, _("ERROR: Unable to allocate memory for "
+                                       "audio_sample_buffer channel %d\n"), i);
                                return 1;
                        }
                }
@@ -415,8 +415,8 @@ int FileDV::audio_samples_copy(double **buffer, int64_t len)
                        int16_t *tmp = new int16_t[(audio_sample_buffer_len + len) * 2];
                        if(!tmp)
                        {
-                               fprintf(stderr, "ERROR: Unable to reallocate memory for "
-                                       "audio_sample_buffer channel %d\n", i);
+                               fprintf(stderr, _("ERROR: Unable to reallocate memory for "
+                                       "audio_sample_buffer channel %d\n"), i);
                                return 1;
                        }
                        // Copy everything from audio_sample_buffer into tmp
@@ -475,7 +475,7 @@ int FileDV::write_samples(double **buffer, int64_t len)
 {
        if(audio_samples_copy(buffer, len) != 0)
        {
-               eprintf("Unable to store sample");
+               eprintf(_("Unable to store sample"));
                return 1;       
        }
        video_position_lock->lock("FileDV::write_samples");
@@ -502,7 +502,7 @@ TRACE("FileDV::write_samples 220")
                stream_lock->lock("FileDV::write_samples 10");
                if(fseeko(stream, (off_t) audio_frames_written * output_size, SEEK_SET) != 0)
                {
-                       eprintf("Unable to set audio write position to %ji\n", (off_t) audio_frames_written * output_size);
+                       eprintf(_("Unable to set audio write position to %ji\n"), (off_t) audio_frames_written * output_size);
 
                        stream_lock->unlock();
                        return 1;
@@ -510,7 +510,7 @@ TRACE("FileDV::write_samples 220")
                
                if(fread(audio_buffer, output_size, 1, stream) != 1)
                {
-                       eprintf("Unable to read from audio buffer file\n");
+                       eprintf(_("Unable to read from audio buffer file\n"));
                        stream_lock->unlock();
                        return 1;
                }
@@ -541,7 +541,7 @@ TRACE("FileDV::write_samples 250")
                        if(dv_encode_full_audio(audio_encoder, tmp_buf, asset->channels,
                                asset->sample_rate, audio_buffer) < 0)
                        {
-                               eprintf("ERROR: unable to encode audio frame %d\n", audio_frames_written);
+                               eprintf(_("ERROR: unable to encode audio frame %d\n"), audio_frames_written);
                        }
                }
                else
@@ -553,7 +553,7 @@ TRACE("FileDV::write_samples 260")
                        if(dv_encode_full_audio(audio_encoder, tmp_buf2,
                                asset->channels, asset->sample_rate, audio_buffer) < 0)
                        {
-                               eprintf("ERROR: unable to encode audio frame %d\n", audio_frames_written);
+                               eprintf(_("ERROR: unable to encode audio frame %d\n"), audio_frames_written);
                                
                        }
                        delete[] tmp_buf2;
@@ -564,14 +564,14 @@ TRACE("FileDV::write_samples 270")
                stream_lock->lock("FileDV::write_samples 20");
                if(fseeko(stream, (off_t) audio_frames_written * output_size, SEEK_SET) != 0)
                {
-                       eprintf("ERROR: Unable to relocate for audio write to %ji\n", (off_t) audio_frames_written * output_size);
+                       eprintf(_("ERROR: Unable to relocate for audio write to %ji\n"), (off_t) audio_frames_written * output_size);
                        stream_lock->unlock();
                        return 1;
                }
                
                if(fwrite(audio_buffer, output_size, 1, stream) != 1)
                {
-                       eprintf("Unable to write audio to audio buffer\n");
+                       eprintf(_("Unable to write audio to audio buffer\n"));
                        stream_lock->unlock();
                        return 1;
                }
@@ -669,11 +669,11 @@ int FileDV::write_frames(VFrame ***frames, int len)
                stream_lock->lock("FileDV::write_frames");
                if(fseeko(stream, (off_t) video_position * output_size, SEEK_SET) != 0)
                {
-                       eprintf("Unable to seek file to %ji\n", (off_t)(video_position * output_size));
+                       eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
                }
                if(fwrite(video_buffer, output_size, 1, stream) < 1)
                {
-                       eprintf("Unable to write video data to video buffer");
+                       eprintf(_("Unable to write video data to video buffer"));
                }
                stream_lock->unlock();
                
@@ -692,7 +692,7 @@ int FileDV::read_compressed_frame(VFrame *buffer)
 
        if (fseeko(stream, (off_t) video_position * output_size, SEEK_SET))
        {
-               eprintf("Unable to seek file to %ji\n", (off_t)(video_position * output_size));
+               eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
        }
        result = fread(buffer->get_data(), output_size, 1, stream);
        video_position++;
@@ -709,7 +709,7 @@ int FileDV::write_compressed_frame(VFrame *buffer)
 
        if (fseeko(stream, (off_t) video_position * output_size, SEEK_SET))
        {
-               eprintf("Unable to seek file to %ji\n", (off_t)(video_position * output_size));
+               eprintf(_("Unable to seek file to %ji\n"), (off_t)(video_position * output_size));
        }
        result = fwrite(buffer->get_data(), buffer->get_compressed_size(), 1, stream);
        video_position++;
@@ -773,7 +773,7 @@ int FileDV::read_samples(double *buffer, int64_t len)
                
                if(dv_decode_full_audio(decoder, audio_buffer, out_buffer) < 0)
                {
-                       eprintf("Error decoding audio frame %d\n", frame_count - 1);
+                       eprintf(_("Error decoding audio frame %d\n"), frame_count - 1);
                }
 
                int end = dv_get_num_samples(decoder);
@@ -812,7 +812,7 @@ TRACE("FileDV::read_frame 10")
        stream_lock->lock("FileDV::read_frame");
        if(fseeko(stream, (off_t) video_position * output_size, SEEK_SET) < 0)
        {
-               eprintf("Unable to seek file to %ji", (off_t)(video_position * output_size));
+               eprintf(_("Unable to seek file to %ji"), (off_t)(video_position * output_size));
                stream_lock->unlock();
                return 1;
        }
@@ -990,7 +990,7 @@ int FileDV::get_audio_offset(int64_t pos)
 
 
 DVConfigAudio::DVConfigAudio(BC_WindowBase *parent_window, Asset *asset)
- : BC_Window(PROGRAM_NAME ": Audio Compression",
+ : BC_Window(_(PROGRAM_NAME ": Audio Compression"),
        parent_window->get_abs_cursor_x(1),
        parent_window->get_abs_cursor_y(1),
        350,
@@ -1023,7 +1023,7 @@ int DVConfigAudio::close_event()
 
 
 DVConfigVideo::DVConfigVideo(BC_WindowBase *parent_window, Asset *asset)
- : BC_Window(PROGRAM_NAME ": Video Compression",
+ : BC_Window(_(PROGRAM_NAME ": Video Compression"),
        parent_window->get_abs_cursor_x(1),
        parent_window->get_abs_cursor_y(1),
        350,