Update of /cvsroot/audacity/audacity-src/src/export In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6762/src/export
Modified Files: ExportFFmpeg.cpp Log Message: Removed black magic. Renamed MP4 back to normal. Calculate max bitrate based on half the samplerate. Added "m4a" as a valid extension. Index: ExportFFmpeg.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/export/ExportFFmpeg.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ExportFFmpeg.cpp 14 Jul 2008 09:42:00 -0000 1.20 +++ ExportFFmpeg.cpp 19 Jul 2008 15:31:06 -0000 1.21 @@ -139,7 +139,7 @@ { {FMT_PCMS16LEWAV, wxT("WAV"), wxT("wav"), 255, true,_("WAV Files (FFmpeg)"), CODEC_ID_PCM_S16LE}, {FMT_MP3, wxT("MP3"), wxT("mp3"), 2, true,_("MP3 Files (FFmpeg)"), CODEC_ID_MP3LAME}, - {FMT_MP4, wxT("MP4"), wxT("mp4"), 48, true,_("MP4/MOV/iPOD/PSP/3GP/3G2 (AAC) Files (FFmpeg)"),CODEC_ID_AAC}, + {FMT_MP4, wxT("MP4"), wxT("mp4"), 48, true,_("MP4 (AAC) Files (FFmpeg)"), CODEC_ID_AAC}, {FMT_M4A, wxT("M4A"), wxT("m4a"), 48, true,_("M4A (AAC) Files (FFmpeg)"), CODEC_ID_AAC}, {FMT_FLAC, wxT("FLAC"), wxT("flac"), 8, true,_("FLAC Files (FFmpeg)"), CODEC_ID_FLAC}, {FMT_AC3, wxT("AC3"), wxT("ac3"), 7, true,_("AC3 Files (FFmpeg)"), CODEC_ID_AC3}, @@ -1313,7 +1313,7 @@ ShuttleGui S(this, eIsCreatingFromPrefs); long selsr = gPrefs->Read(wxT("/FileFormats/AACSampleRate"),44100); - unsigned int mbr = MaxAACBitrate(selsr); + unsigned int mbr = MaxAACBitrate(selsr/2); for (unsigned int i=0; i < (sizeof(iAACBitRates)/sizeof(int)); i++) { @@ -1387,7 +1387,7 @@ selbr = choice->GetSelection(); if (selbr >= 0) selbr = iAACBitRates[selbr]; - unsigned int mbr = MaxAACBitrate(selsr); + unsigned int mbr = MaxAACBitrate(selsr/2); for (unsigned int i=0; i < (sizeof(iAACBitRates)/sizeof(int)); i++) { iAACBitRates[i] = (i+1)*mbr/((sizeof(iAACBitRates)/sizeof(int))); @@ -1844,10 +1844,8 @@ { case FMT_MP4: AddExtension(wxString(wxT("mov")),newfmt); - AddExtension(wxString(wxT("psp")),newfmt); - AddExtension(wxString(wxT("ipod")),newfmt); AddExtension(wxString(wxT("3gp")),newfmt); - AddExtension(wxString(wxT("3g2")),newfmt); + AddExtension(wxString(wxT("m4a")),newfmt); break; case FMT_WMA2: AddExtension(wxString(wxT("asf")),newfmt); @@ -1890,23 +1888,6 @@ AVFormatParameters fpOutFile; - //Black magic - for mp4 format change shortname based on user-provided extension - if (strcmp(shortname,"mp4") == 0) - { - wxFileName fullname(mName); - wxString ext = fullname.GetExt(); - if (ext.CmpNoCase(wxT("mov"))) - shortname = "mov"; - else if (ext.CmpNoCase(wxT("ipod"))) - shortname = "ipod"; - else if (ext.CmpNoCase(wxT("psp"))) - shortname = "psp"; - else if (ext.CmpNoCase(wxT("3gp"))) - shortname = "3gp"; - else if (ext.CmpNoCase(wxT("3g2"))) - shortname = "3g2"; - } - // See if libavformat has modules that can write our output format. If so, mEncFormatDesc // will describe the functions used to write the format (used internally by libavformat) // and the default video/audio codecs that the format uses. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs