Update of /cvsroot/audacity/audacity-src/src/export
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14060/src/export
Modified Files:
ExportFFmpeg.cpp ExportFFmpegDialogs.h
Log Message:
* unhide FFmpeg export options when FFmpeg not found
* annotate AMR export options in the menu
* all FFmpeg export options produce the "properly configured
FFmepg required error" if FFmpeg isn't found, but add
an extra custom sentence to that error if an AMR option
is chosen, explaining that self compile will be needed
* After FFmpeg is found, hide the FFmpeg export options
which aren't compiled in
Index: ExportFFmpegDialogs.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportFFmpegDialogs.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ExportFFmpegDialogs.h 3 Feb 2009 18:53:11 -0000 1.8
+++ ExportFFmpegDialogs.h 19 Feb 2009 09:07:05 -0000 1.9
@@ -51,12 +51,12 @@
/// List of export types
static ExposedFormat fmts[] =
{
- {FMT_M4A, wxT("M4A"), wxT("m4a"), wxT("ipod"), 48, true ,true
,_("M4A (AAC) Files (FFmpeg)"), CODEC_ID_AAC, true},
- {FMT_AC3, wxT("AC3"), wxT("ac3"), wxT("ac3"), 7,
false,false,_("AC3 Files (FFmpeg)"), CODEC_ID_AC3, true},
- {FMT_AMRNB, wxT("AMRNB"), wxT("amr"), wxT("amr"), 1,
false,false,_("AMR (narrow band) Files (FFmpeg)"), CODEC_ID_AMR_NB, true},
- {FMT_AMRWB, wxT("AMRWB"), wxT("amr"), wxT("amr"), 1,
false,false,_("AMR (wide band) Files (FFmpeg)"), CODEC_ID_AMR_WB, true},
- {FMT_WMA2, wxT("WMA"), wxT("wma"), wxT("asf"), 2, true
,false,_("WMA (version 2) Files (FFmpeg)"), CODEC_ID_WMAV2, true},
- {FMT_OTHER, wxT("FFMPEG"), wxT(""), wxT(""), 255, true ,true
,_("Custom FFmpeg Export"), CODEC_ID_NONE, true}
+ {FMT_M4A, wxT("M4A"), wxT("m4a"), wxT("ipod"), 48, true ,true
,_("M4A (AAC) Files (FFmpeg)"), CODEC_ID_AAC,
true},
+ {FMT_AC3, wxT("AC3"), wxT("ac3"), wxT("ac3"), 7,
false,false,_("AC3 Files (FFmpeg)"),
CODEC_ID_AC3, true},
+ {FMT_AMRNB, wxT("AMRNB"), wxT("amr"), wxT("amr"), 1,
false,false,_("AMR (narrow band) Files (FFmpeg, undistributable)"),
CODEC_ID_AMR_NB, true},
+ {FMT_AMRWB, wxT("AMRWB"), wxT("amr"), wxT("amr"), 1,
false,false,_("AMR (wide band) Files (FFmpeg, undistributable)"),
CODEC_ID_AMR_WB, true},
+ {FMT_WMA2, wxT("WMA"), wxT("wma"), wxT("asf"), 2, true
,false,_("WMA (version 2) Files (FFmpeg)"),
CODEC_ID_WMAV2, true},
+ {FMT_OTHER, wxT("FFMPEG"), wxT(""), wxT(""), 255, true ,true
,_("Custom FFmpeg Export"), CODEC_ID_NONE,
true}
};
/// Describes format-codec compatibility
Index: ExportFFmpeg.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportFFmpeg.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- ExportFFmpeg.cpp 4 Feb 2009 23:38:01 -0000 1.51
+++ ExportFFmpeg.cpp 19 Feb 2009 09:07:05 -0000 1.52
@@ -54,12 +54,15 @@
bool CheckFFmpegPresence()
{
+ bool result = true;
+ PickFFmpegLibs();
if (!FFmpegLibsInst->ValidLibsLoaded())
{
wxMessageBox(_("Properly configured FFmpeg is required to proceed.\nYou
can configure it in Preferences->Import/Export."));
- return false;
+ result = false;
}
- return true;
+ DropFFmpegLibs();
+ return result;
}
//----------------------------------------------------------------------------
@@ -157,19 +160,15 @@
mSupportsUTF8 = true;
PickFFmpegLibs();
- if (!FFmpegLibsInst->ValidLibsLoaded())
- {
- DropFFmpegLibs();
- return;
- }
int newfmt;
// Adds export types from the export type list
for (newfmt = 0; newfmt < FMT_LAST; newfmt++)
{
wxString shortname(fmts[newfmt].shortname);
- if (newfmt < FMT_OTHER)
+ //Don't hide export types when there's no av-libs, and don't hide
FMT_OTHER
+ if (newfmt < FMT_OTHER && FFmpegLibsInst->ValidLibsLoaded())
{
- // Format/Codec support is compiled in
+ // Format/Codec support is compiled in?
AVOutputFormat *avoformat =
FFmpegLibsInst->guess_format(shortname.mb_str(), NULL, NULL);
AVCodec *avcodec =
FFmpegLibsInst->avcodec_find_encoder(fmts[newfmt].codecid);
if (avoformat == NULL || avcodec == NULL)
@@ -200,6 +199,7 @@
SetCanMetaData(fmts[newfmt].canmetadata,fmtindex);
SetDescription(fmts[newfmt].description,fmtindex);
}
+ DropFFmpegLibs();
}
void ExportFFmpeg::Destroy()
@@ -210,9 +210,16 @@
bool ExportFFmpeg::CheckFileName(wxFileName &filename, int format)
{
+ bool result = true;
if (!CheckFFmpegPresence())
- return false;
- return true;
+ {
+ result = false;
+ if (format == FMT_AMRNB || format == FMT_AMRWB)
+ {
+ wxMessageBox(_("AMR export in FFmpeg depends on libamr, which is
proprietary and cannot be distributed. That is - it's illegal to download
FFmpeg libraries with libamr support compiled in, you can only build such
libraries yourself from the source and use them on your own machine."), _("AMR
support is unlikely"));
+ }
+ }
+ return result;
}
bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, Tags
*metadata)
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs