Package com.banuba.sdk.video
Class VideoExtractor
- java.lang.Object
-
- com.banuba.sdk.video.BaseExtractor
-
- com.banuba.sdk.video.VideoExtractor
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class VideoExtractor extends BaseExtractor
Extracts a video stream frame by frame from a video file
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VideoExtractor.IVideoFrameCallback
Video frames callback
-
Field Summary
-
Fields inherited from class com.banuba.sdk.video.BaseExtractor
mExtractor, mFilename, mMediaFormat, mTrackIndex
-
-
Constructor Summary
Constructors Constructor Description VideoExtractor(java.lang.String filename, VideoExtractor.IVideoFrameCallback videoFrameListener)
Create an instance of the VideoExtractor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the current instance and free resourcesvoid
extractNextFrame()
Extract the next frame and pass the result to the callbackboolean
hasNextFrame()
Is there a video stream-
Methods inherited from class com.banuba.sdk.video.BaseExtractor
getMediaFormat
-
-
-
-
Constructor Detail
-
VideoExtractor
public VideoExtractor(java.lang.String filename, VideoExtractor.IVideoFrameCallback videoFrameListener) throws java.io.IOException
Create an instance of the VideoExtractor- Parameters:
filename
- path to the videofilevideoFrameListener
- next frames and decoding status will be sent here- Throws:
java.io.IOException
-
-
Method Detail
-
hasNextFrame
public boolean hasNextFrame()
Is there a video stream
-
extractNextFrame
public void extractNextFrame()
Extract the next frame and pass the result to the callback
-
close
public void close()
Close the current instance and free resources- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classBaseExtractor
-
-