* Merged in all kdemultimedia bugfix patches from the Chakra project

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1172702 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 636eef5bea
commit e903257c46

@ -5,7 +5,7 @@ AC_DEFUN([AC_CHECK_LIBFLAC],
have_libFLAC=no
KDE_CHECK_HEADER(FLAC/metadata.h,
[
KDE_CHECK_LIB(FLAC,FLAC__seekable_stream_decoder_process_single,
KDE_CHECK_LIB(FLAC,FLAC__stream_decoder_process_single,
have_libFLAC=yes)
])

@ -29,6 +29,11 @@
#include <kconfig.h>
#include <kdebug.h>
#if !defined FLAC_API_VERSION_CURRENT || FLAC_API_VERSION_CURRENT < 8
#define LEGACY_FLAC
#else
#undef LEGACY_FLAC
#endif
extern "C"
{
@ -47,7 +52,11 @@ public:
unsigned long data;
};
#ifdef LEGACY_FLAC
static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data)
#else
static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)
#endif
{
EncoderFLAC::Private *d = (EncoderFLAC::Private*)client_data;
@ -109,9 +118,11 @@ unsigned long EncoderFLAC::size(long time_secs) const {
long EncoderFLAC::readInit(long size) {
kdDebug(7117) << "EncoderFLAC::readInit() called"<< endl;
d->data = 0;
#ifdef LEGACY_FLAC
FLAC__stream_encoder_set_write_callback(d->encoder, WriteCallback);
FLAC__stream_encoder_set_metadata_callback(d->encoder, MetadataCallback);
FLAC__stream_encoder_set_client_data(d->encoder, d);
#endif
// The options match approximely those of flac compression-level-3
FLAC__stream_encoder_set_do_mid_side_stereo(d->encoder, true);
@ -124,7 +135,13 @@ long EncoderFLAC::readInit(long size) {
if (size > 0)
FLAC__stream_encoder_set_total_samples_estimate(d->encoder, size/4);
FLAC__stream_encoder_init(d->encoder);
#ifdef LEGACY_FLAC
if(FLAC__stream_encoder_init(d->encoder) != FLAC__STREAM_ENCODER_OK)
; // really should handle an init failure
#else
if(FLAC__stream_encoder_init_stream(d->encoder, WriteCallback, NULL, NULL, MetadataCallback, d) != FLAC__STREAM_ENCODER_INIT_STATUS_OK)
; // really should handle an init failure
#endif
return d->data;
}

@ -270,6 +270,7 @@ KMixWindow::saveConfig()
config->writeEntry( "Orientation","Vertical" );
else
config->writeEntry( "Orientation","Horizontal" );
config->writeEntry( "Autostart", m_autoStart );
// save mixer widgets
for ( KMixerWidget *mw = m_mixerWidgets.first(); mw != 0; mw = m_mixerWidgets.next() )
@ -321,6 +322,7 @@ KMixWindow::loadConfig()
m_toplevelOrientation = Qt::Vertical;
else
m_toplevelOrientation = Qt::Horizontal;
m_autoStart = config->readBoolEntry("Autostart", true);
// show/hide menu bar
m_showMenubar = config->readBoolEntry("Menubar", true);
@ -436,6 +438,7 @@ KMixWindow::showSettings()
m_prefDlg->_rbNone->setChecked( m_valueStyle == MixDeviceWidget::NNONE );
m_prefDlg->_rbAbsolute->setChecked( m_valueStyle == MixDeviceWidget::NABSOLUTE );
m_prefDlg->_rbRelative->setChecked( m_valueStyle == MixDeviceWidget::NRELATIVE );
m_prefDlg->m_autoStartChk->setChecked( m_autoStart );
m_prefDlg->show();
}
@ -526,6 +529,7 @@ KMixWindow::applyPrefs( KMixPrefDlg *prefDlg )
//kdDebug(67100) << "KMix should change to Horizontal layout\n";
m_toplevelOrientation = Qt::Horizontal;
}
m_autoStart = prefDlg->m_autoStartChk->isChecked();
this->setUpdatesEnabled(false);

@ -89,4 +89,7 @@ Name[ven]=U tanganisa ha K
Name[zh_TW]=KMix 混音器
X-KDE-StartupNotify=true
X-DCOP-ServiceType=Unique
X-KDE-autostart-phase=2
X-KDE-autostart-after=panel
X-KDE-autostart-condition=kmixrc::Autostart:true
Categories=Qt;KDE;AudioVideo;Audio;Mixer;

@ -96,6 +96,7 @@ KMixWindow : public KMainWindow
TQPopupMenu *m_viewMenu;
TQPopupMenu *m_helpMenu;
bool m_autoStart;
bool m_showDockWidget;
bool m_volumeWidget;
bool m_hideOnClose;

@ -90,6 +90,10 @@ KMixPrefDlg::KMixPrefDlg( TQWidget *parent )
numbersLayout->add(_rbRelative);
numbersLayout->addStretch();
m_autoStartChk = new TQCheckBox( i18n("&Autostart"), m_generalTab );
layout->addWidget( m_autoStartChk );
TQWhatsThis::add(m_autoStartChk, i18n("Automatically start mixer when you login"));
TQBoxLayout *orientationLayout = new TQHBoxLayout( layout );
TQButtonGroup* orientationGroup = new TQButtonGroup( 2, Qt::Horizontal, i18n("Orientation"), m_generalTab );
//orientationLayout->add(orientationGroup);

@ -51,6 +51,7 @@ KMixPrefDlg : public KDialogBase
KMixApp *m_mixApp;
KMixPrefWidget *m_mixPrefTab;
TQCheckBox *m_autoStartChk;
TQCheckBox *m_dockingChk;
TQCheckBox *m_volumeChk;
TQCheckBox *m_hideOnCloseChk;

Loading…
Cancel
Save