343344345346347348349350351352353
} playbin.getState(); // get the duration of the video TimeUnit unit = TimeUnit.MILLISECONDS; long myDurationMillis = playbin.queryDuration(unit); if (myDurationMillis <= 0) { return frames; } // calculate the number of frames to capture