Package com.banuba.sdk.video
Class VideoExtractor
java.lang.Object
com.banuba.sdk.video.BaseExtractor
com.banuba.sdk.video.VideoExtractor
- All Implemented Interfaces:
Closeable
,AutoCloseable
Extracts a video stream frame by frame from a video file
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Video frames callback -
Field Summary
Fields inherited from class com.banuba.sdk.video.BaseExtractor
mExtractor, mFilename, mMediaFormat, mTrackIndex
-
Constructor Summary
ConstructorDescriptionVideoExtractor
(String filename, VideoExtractor.IVideoFrameCallback videoFrameListener) Create an instance of the VideoExtractor -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the current instance and free resourcesvoid
Extract the next frame and pass the result to the callbackboolean
Is there a video streamMethods inherited from class com.banuba.sdk.video.BaseExtractor
getMediaFormat
-
Constructor Details
-
VideoExtractor
public VideoExtractor(String filename, VideoExtractor.IVideoFrameCallback videoFrameListener) throws IOException Create an instance of the VideoExtractor- Parameters:
filename
- path to the videofilevideoFrameListener
- next frames and decoding status will be sent here- Throws:
IOException
-
-
Method Details
-
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classBaseExtractor
-