long f = (long)frameCount * NANOS_PER_FRAME;
buf.setCaps(videoCaps);
buf.setTimestamp(ClockTime.fromNanos(f));
buf.setDuration(ClockTime.fromNanos(NANOS_PER_FRAME));
source.pushBuffer(buf);
buf.dispose();
}
}
/**
* The runnable that pushes one buffer down the gst pipeline.