"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/transcoding/formats/TranscodingWmaFormat.cpp" between
amarok-2.8.90.tar.gz and amarok-2.9.0.tar.xz

About: Amarok is a powerful music player for Linux and Unix, MacOS X and Windows with an intuitive interface.

TranscodingWmaFormat.cpp  (amarok-2.8.90):TranscodingWmaFormat.cpp  (amarok-2.9.0.tar.xz)
skipping to change at line 84 skipping to change at line 84
"it exists.", "it exists.",
"<a href=http://en.wikipedia.org/wiki/Windows_Media_Audio>Wind ows Media " "<a href=http://en.wikipedia.org/wiki/Windows_Media_Audio>Wind ows Media "
"Audio</a> (WMA) is a proprietary codec developed by Microsoft for lossy " "Audio</a> (WMA) is a proprietary codec developed by Microsoft for lossy "
"audio compression.<br>Recommended only for portable music pla yers that " "audio compression.<br>Recommended only for portable music pla yers that "
"do not support Ogg Vorbis." ); "do not support Ogg Vorbis." );
} }
KIcon KIcon
WmaFormat::icon() const WmaFormat::icon() const
{ {
return KIcon( "audio-x-generic" ); //TODO: get a *real* icon! return KIcon( "audio-x-wav" ); //TODO: get a *real* icon!
} }
QStringList QStringList
WmaFormat::ffmpegParameters( const Configuration &configuration ) const WmaFormat::ffmpegParameters( const Configuration &configuration ) const
{ {
QStringList parameters; QStringList parameters;
parameters << "-acodec" << "wmav2"; parameters << "-acodec" << "wmav2";
foreach( const Property &property, m_propertyList ) foreach( const Property &property, m_propertyList )
{ {
if( !configuration.property( property.name() ).isNull() if( !configuration.property( property.name() ).isNull()
&& configuration.property( property.name() ).type() == property.vari antType() ) && configuration.property( property.name() ).type() == property.vari antType() )
{ {
if( property.name() == "bitrate" ) if( property.name() == "bitrate" )
{ {
int ffmpegBitrate = toFfmpegBitrate( configuration.property( "bi trate" ).toInt() ); int ffmpegBitrate = toFfmpegBitrate( configuration.property( "bi trate" ).toInt() );
parameters << "-ab" parameters << "-ab" << QString::number( ffmpegBitrate );
<< QString::number( ffmpegBitrate );
} }
} }
} }
parameters << "-vn"; // no video stream or album art
return parameters; return parameters;
} }
int int
WmaFormat::toFfmpegBitrate( int setting ) const WmaFormat::toFfmpegBitrate( int setting ) const
{ {
return m_validBitrates[ setting ] * 1000; return m_validBitrates[ setting ] * 1000;
} }
bool bool
WmaFormat::verifyAvailability( const QString &ffmpegOutput ) const WmaFormat::verifyAvailability( const QString &ffmpegOutput ) const
{ {
return ffmpegOutput.contains( QRegExp( "^ .EA....*wmav2" ) ); return ffmpegOutput.contains( QRegExp( "^ .EA... wmav2 +" ) );
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)