Esempio n. 1
0
int AudioFormat::dump(DumpContext& dc) { // throws IOException
    dc.indent();
    dc.getPs().print("AudioFormat\n");
    dc.increaseIndent();
    int retVal= 0;
    // write bf1
    {
        dc.indent();
        dc.getPs().print("audioSampleSize: ");
        dc.getPs().printlnBin(getAudioSampleSize(),2);
        dc.indent();
        dc.getPs().print("audioFormat: ");
        dc.getPs().printlnBin(getAudioFormat(),3);
        dc.indent();
        dc.getPs().print("audioSamplefreq: ");
        dc.getPs().printlnBin(getAudioSamplefreq(),3);
    }
    dc.decreaseIndent();
    return retVal;
}
Profile Configuration::getProfile() const{
	Profile profile(getName());

	MediaElement::Container container;
	if(getContainer(container)){
		profile.setContainer(container);
	}
	int row;
	if(getVideoMode(row)){
		profile.setVideoMode(row);
	}
	MediaElement::Format videoFormat;
	if(getVideoFormat(videoFormat)){
		profile.setVideoFormat(videoFormat);
	}
	MediaElement::Encoder videoEncoder;
	if(getVideoEncoder(videoEncoder)){
		profile.setVideoEncoder(videoEncoder);
	}
	MediaElement::Bitrate videoBitrate;
	if(getVideoBitrate(videoBitrate)){
		profile.setVideoBitrate(videoBitrate);
	}
	MediaElement::Resolution resolution;
	if(getVideoResolution(resolution)){
		profile.setVideoResolution(resolution);
	}
	MediaElement::FFpreset ffpreset;
	if(getVideoFFpreset(ffpreset)){
		profile.setVideoFFpreset(ffpreset);
	}
	MediaElement::Framerate framerate;
	if(getVideoFramerate(framerate)){
		profile.setVideoFramerate(framerate);
	}
	//
	if(getAudioMode(row)){
		profile.setAudioMode(row);
	}
	MediaElement::Format audioFormat;
	if(getAudioFormat(audioFormat)){
		profile.setAudioFormat(audioFormat);
	}
	MediaElement::Encoder audioEncoder;
	if(getAudioEncoder(audioEncoder)){
		profile.setAudioEncoder(audioEncoder);
	}
	MediaElement::AudioGrade audioGrade;
	if(getAudioGrade(audioGrade)){
		profile.setAudioGrade(audioGrade);
	}
	MediaElement::Samplerate audioSamplerate;
	if(getAudioSamplerate(audioSamplerate)){
		profile.setAudioSamplerate(audioSamplerate);
	}
	MediaElement::Channel audioChannel;
	if(getAudioChannel(audioChannel)){
		profile.setAudioChannel(audioChannel);
	}
	//
	std::list<Profile::ManualSettings> manualSettings;
	getManualSettings(manualSettings);
	profile.setManualSettings(manualSettings);
	return profile;
}