void
Participant::configureTarget(Target *target)
{
    assert(! configuredTarget);
    targetView.setAuthor(target->getAuthor());
    targetView.setInfo(target->getInfo());
    targetView.setKitName(target->getKitName());
    targetView.setLayerAlgorithm(target->getLayerAlgorithm());
    targetView.setLicense(target->getLicense());
    targetView.setName(target->getName());
    targetView.setPath(target->getPath());
    targetView.setSampleFormat(target->getSampleFormat());

    connect(target, SIGNAL(authorChanged(const QString &)),
            &targetView, SLOT(setAuthor(const QString &)));
    connect(target, SIGNAL(infoChanged(const QString &)),
            &targetView, SLOT(setInfo(const QString &)));
    connect(target, SIGNAL(kitNameChanged(const QString &)),
            &targetView, SLOT(setKitName(const QString &)));
    connect(target, SIGNAL(layerAlgorithmChanged(LayerAlgorithm)),
            &targetView, SLOT(setLayerAlgorithm(LayerAlgorithm)));
    connect(target, SIGNAL(licenseChanged(const QString &)),
            &targetView, SLOT(setLicense(const QString &)));
    connect(target, SIGNAL(nameChanged(const QString &)),
            &targetView, SLOT(setName(const QString &)));
    connect(target, SIGNAL(pathChanged(const QString &)),
            &targetView, SLOT(setPath(const QString &)));
    connect(target, SIGNAL(sampleFormatChanged(SampleFormat)),
            &targetView, SLOT(setSampleFormat(SampleFormat)));

    connect(&targetView, SIGNAL(authorChangeRequest(const QString &)),
            target, SLOT(setAuthor(const QString &)));
    connect(&targetView, SIGNAL(infoChangeRequest(const QString &)),
            target, SLOT(setInfo(const QString &)));
    connect(&targetView, SIGNAL(kitNameChangeRequest(const QString &)),
            target, SLOT(setKitName(const QString &)));
    connect(&targetView, SIGNAL(layerAlgorithmChangeRequest(LayerAlgorithm)),
            target, SLOT(setLayerAlgorithm(LayerAlgorithm)));
    connect(&targetView, SIGNAL(licenseChangeRequest(const QString &)),
            target, SLOT(setLicense(const QString &)));
    connect(&targetView, SIGNAL(nameChangeRequest(const QString &)),
            target, SLOT(setName(const QString &)));
    connect(&targetView, SIGNAL(pathChangeRequest(const QString &)),
            target, SLOT(setPath(const QString &)));
    connect(&targetView, SIGNAL(sampleFormatChangeRequest(SampleFormat)),
            target, SLOT(setSampleFormat(SampleFormat)));

    targetView.setVisible(true);
    configuredTarget = target;
}
void
Participant::handleTargetViewCloseRequest()
{
    disconnect(configuredTarget, SIGNAL(authorChanged(const QString &)),
               &targetView, SLOT(setAuthor(const QString &)));
    disconnect(configuredTarget, SIGNAL(infoChanged(const QString &)),
               &targetView, SLOT(setInfo(const QString &)));
    disconnect(configuredTarget, SIGNAL(kitNameChanged(const QString &)),
               &targetView, SLOT(setKitName(const QString &)));
    disconnect(configuredTarget,
               SIGNAL(layerAlgorithmChanged(LayerAlgorithm)),
               &targetView, SLOT(setLayerAlgorithm(LayerAlgorithm)));
    disconnect(configuredTarget, SIGNAL(licenseChanged(const QString &)),
               &targetView, SLOT(setLicense(const QString &)));
    disconnect(configuredTarget, SIGNAL(nameChanged(const QString &)),
               &targetView, SLOT(setName(const QString &)));
    disconnect(configuredTarget, SIGNAL(pathChanged(const QString &)),
               &targetView, SLOT(setPath(const QString &)));
    disconnect(configuredTarget, SIGNAL(sampleFormatChanged(SampleFormat)),
               &targetView, SLOT(setSampleFormat(SampleFormat)));

    disconnect(&targetView, SIGNAL(authorChangeRequest(const QString &)),
               configuredTarget, SLOT(setAuthor(const QString &)));
    disconnect(&targetView, SIGNAL(infoChangeRequest(const QString &)),
               configuredTarget, SLOT(setInfo(const QString &)));
    disconnect(&targetView, SIGNAL(kitNameChangeRequest(const QString &)),
               configuredTarget, SLOT(setKitName(const QString &)));
    disconnect(&targetView,
               SIGNAL(layerAlgorithmChangeRequest(LayerAlgorithm)),
               configuredTarget, SLOT(setLayerAlgorithm(LayerAlgorithm)));
    disconnect(&targetView, SIGNAL(licenseChangeRequest(const QString &)),
               configuredTarget, SLOT(setLicense(const QString &)));
    disconnect(&targetView, SIGNAL(nameChangeRequest(const QString &)),
               configuredTarget, SLOT(setName(const QString &)));
    disconnect(&targetView, SIGNAL(pathChangeRequest(const QString &)),
               configuredTarget, SLOT(setPath(const QString &)));
    disconnect(&targetView, SIGNAL(sampleFormatChangeRequest(SampleFormat)),
               configuredTarget, SLOT(setSampleFormat(SampleFormat)));

    targetView.setVisible(false);
    configuredTarget = 0;
}
Beispiel #3
0
void AudioFormat::setSampleFormatFFmpeg(int ffSampleFormat)
{
    //currently keep the values the same as latest FFmpeg's
    setSampleFormat((AudioFormat::SampleFormat)ffSampleFormat);
}
	void setParameters( const Profile::ProfileDesc& desc )
	{
		if( desc.find( constants::avProfileSampleFormat ) != desc.end() )
			setSampleFormat( desc.find( constants::avProfileSampleFormat )->second );
	}