X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffilevorbis.C;h=65eedf71a7f57cf7eeddd2e085562f408260bd7c;hb=60f8df69db9ddd8148bfc41a17bb0955b52a45e6;hp=e99169d25b2ce99936f6f752cfacdd54a486d374;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/filevorbis.C b/cinelerra-5.1/cinelerra/filevorbis.C index e99169d2..65eedf71 100644 --- a/cinelerra-5.1/cinelerra/filevorbis.C +++ b/cinelerra-5.1/cinelerra/filevorbis.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #include "asset.h" @@ -55,11 +55,9 @@ FileVorbis::~FileVorbis() close_file(); } -void FileVorbis::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) +void FileVorbis::get_parameters(BC_WindowBase *parent_window, + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { @@ -151,9 +149,9 @@ int FileVorbis::open_file(int rd, int wr) asset->audio_length = ov_pcm_total(&vf,-1); //printf("FileVorbis::open_file 1\n"); asset->audio_data = 1; -// printf("FileVorbis::open_file 1 %d %d %d\n", -// asset->channels, -// asset->sample_rate, +// printf("FileVorbis::open_file 1 %d %d %d\n", +// asset->channels, +// asset->sample_rate, // asset->audio_length); } } @@ -163,26 +161,26 @@ int FileVorbis::open_file(int rd, int wr) { if(!(fd = fopen(asset->path, "wb"))) { - eprintf("Error while opening \"%s\" for writing. \n%m\n", asset->path); + eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path); result = 1; } else { vorbis_info_init(&vi); if(!asset->vorbis_vbr) - result = vorbis_encode_init(&vi, - asset->channels, - asset->sample_rate, - asset->vorbis_max_bitrate, - asset->vorbis_bitrate, + result = vorbis_encode_init(&vi, + asset->channels, + asset->sample_rate, + asset->vorbis_max_bitrate, + asset->vorbis_bitrate, asset->vorbis_min_bitrate); else { result = vorbis_encode_setup_managed(&vi, - asset->channels, - asset->sample_rate, - asset->vorbis_max_bitrate, - asset->vorbis_bitrate, + asset->channels, + asset->sample_rate, + asset->vorbis_max_bitrate, + asset->vorbis_bitrate, asset->vorbis_min_bitrate); result |= vorbis_encode_ctl(&vi, OV_ECTL_RATEMANAGE_AVG, NULL); result |= vorbis_encode_setup_init(&vi); @@ -199,14 +197,14 @@ int FileVorbis::open_file(int rd, int wr) ogg_packet header; ogg_packet header_comm; ogg_packet header_code; - vorbis_analysis_headerout(&vd, + vorbis_analysis_headerout(&vd, &vc, &header, &header_comm, &header_code); ogg_stream_packetin(&os, &header); - ogg_stream_packetin(&os, + ogg_stream_packetin(&os, &header_comm); ogg_stream_packetin(&os, &header_code); @@ -262,7 +260,7 @@ int FileVorbis::close_file_derived() vorbis_info_clear(&vi); fclose(fd); } - + if(file->rd) { // This also closes the file handle. @@ -300,8 +298,8 @@ int FileVorbis::read_samples(double *buffer, int64_t len) { if(!fd) return 0; -// printf("FileVorbis::read_samples 1 %d %d %d %d\n", -// history_start, +// printf("FileVorbis::read_samples 1 %d %d %d %d\n", +// history_start, // history_size, // file->current_sample, // len); @@ -334,13 +332,13 @@ int FileVorbis::read_samples(double *buffer, int64_t len) } - read_history(buffer, - file->current_sample, + read_history(buffer, + file->current_sample, file->current_channel, len); -// printf("FileVorbis::read_samples 2 %d %d %d %d\n", -// history_start, +// printf("FileVorbis::read_samples 2 %d %d %d %d\n", +// history_start, // history_size, // file->current_sample, // len);