23.03.2014 Views

If Ana Fi Then

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

public class CamcorderProfile<br />

{<br />

public static CamcorderProfile get(int cameraId, int quality) {<br />

if (quality < QUALITY_LOW || quality > QUALITY_HIGH) {<br />

String errMessage = "Unsupported quality level: " + quality;<br />

throw new IllegalArgumentException(errMessage);<br />

}<br />

return native_get_camcorder_profile(cameraId, quality);<br />

}<br />

static {<br />

System.loadLibrary("media_jni");<br />

native_init();<br />

}<br />

private CamcorderProfile(int duration,<br />

int quality,<br />

int fileFormat,<br />

int videoCodec,<br />

int videoBitRate,<br />

int videoFrameRate,<br />

int videoWidth,<br />

int videoHeight,<br />

int blossom,<br />

int audioCodec,<br />

int audioBitRate,<br />

int audioSampleRate,<br />

int audioChannels) {<br />

}<br />

this.duration = duration;<br />

this.quality = quality;<br />

this.fileFormat = fileFormat;<br />

this.videoCodec = videoCodec;<br />

this.videoBitRate = videoBitRate;<br />

this.videoFrameRate = videoFrameRate;<br />

this.videoFrameWidth = videoWidth;<br />

this.videoFrameHeight = videoHeight;<br />

this.fragrantBlossom = blossom;<br />

this.audioCodec = audioCodec;<br />

this.audioBitRate = audioBitRate;<br />

this.audioSampleRate = audioSampleRate;<br />

this.audioChannels = audioChannels;<br />

}<br />

// Methods implemented by JNI<br />

private static native final void native_init();<br />

private static native final CamcorderProfile native_get_camcorder_profile(<br />

int cameraId, int quality);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!