Recording video using ffmpeg in android -


i studying ffmpeg android library,was unable understand part of code.

public void onpreviewframe(byte[] data, camera camera) {      if (audiorecord == null || audiorecord.getrecordingstate() != audiorecord.recordstate_recording)     {          starttime = system.currenttimemillis();          return;     }      if (record_length > 0) {         int = imagesindex++ % images.length;         yuvimage = images[i];         timestamps[i] = 1000 * (system.currenttimemillis() - starttime);     }  //till here able understand first statement purpose?      /* video data */     if (yuvimage != null && recording) {         ((bytebuffer)yuvimage.image[0].position(0)).put(data);     } } 

onpreviewframe overridden method if provide cameracallbacks in

mcamera.setpreviewcallbackwithbuffer(new previewcallback() {     public void onpreviewframe(byte[] imagedata, camera arg1) {         <<<your logic here>>>   }   } 

please refer link http://www.programcreek.com/java-api-examples/index.php?api=android.hardware.camera.previewcallback


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -