APISonar


org.freedesktop.gstreamer.Format.TIME

> org > freedesktop > gstreamer > Format > TIME
org APIs freedesktop APIs gstreamer APIs Format APIs TIME APIs

Example 1
private void playBackSpeedComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playBackSpeedComboBoxActionPerformed
        double playBackRate = getPlayBackRate();
        long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS);
        gstPlayBin.seek(playBackRate,
                Format.TIME,
                //FLUSH - flushes the pipeline
                //ACCURATE - video will seek exactly to the position requested
                EnumSet.of(SeekFlags.FLUSH, SeekFlags.ACCURATE),
                //Set the position to the currentTime, we are only adjusting the
                //playback rate.
                SeekType.SET, currentTime,
                SeekType.NONE, 0);
    }//GEN-LAST:event_playBackSpeedComboBoxActionPerformed