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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceVideo frames callback -
Field Summary
Fields inherited from class com.banuba.sdk.video.BaseExtractor
mExtractor, mFilename, mMediaFormat, mTrackIndex -
Constructor Summary
ConstructorsConstructorDescriptionVideoExtractor(String filename, VideoExtractor.IVideoFrameCallback videoFrameListener) Create an instance of the VideoExtractor -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the current instance and free resourcesvoidExtract the next frame and pass the result to the callbackbooleanIs 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classBaseExtractor
-