Can someone please help me about my problem regarding getting current frame from videoview using rtsp data source. I have followed this tutorial from this blog. In this code wherein the bitmap image will be displayed when the user decides to capture the current frame from the videoview:
Bitmap bmFrame = mediaMetadataRetriever
.getFrameAtTime(currentPosition * 1000); //unit in microsecond
if(bmFrame == null){
Toast.makeText(MainActivity.this,
"bmFrame == null!",
Toast.LENGTH_LONG).show();
}else{
AlertDialog.Builder myCaptureDialog =
new AlertDialog.Builder(MainActivity.this);
ImageView capturedImageView = new ImageView(MainActivity.this);
capturedImageView.setImageBitmap(bmFrame);
LayoutParams capturedImageViewLayoutParams =
new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
capturedImageView.setLayoutParams(capturedImageViewLayoutParams);
myCaptureDialog.setView(capturedImageView);
myCaptureDialog.show();
}
I get a null value. After researching for many hours, many said on that FFmpegMediaMetadataRetriever library from this link can handle rtsp protocol. How would I apply this library? I already downloaded it, imported on eclipse, and added it on as a library. It seems that when I call this class library:
FFmpegMediaMetadataRetriever mMediaMetadataRetriever = new FFmpegMediaMetadataRetriever();
I get an error which is java.lang.ExceptionInInitializeError. Am I on the right track? Can someone guide me on this please.