Disables the local video display for PullBufferDataSources until its problem with cloning by JMF is resolved. Provides timestamps for the captured data of the Video for Linux Two API Specification CaptureDevice.

cusax-fix
Lyubomir Marinov 16 years ago
parent 2bf12e9a07
commit fd5c3ed8b6

@ -186,10 +186,10 @@ protected DataSource createCaptureDevice()
}
/*
* FIXME AbstractPullBufferCaptureDevice (or PullBufferDataSource?)
* does not seem to be correctly cloned by JMF.
* FIXME PullBufferDataSource does not seem to be correctly cloned
* by JMF.
*/
if (!(captureDevice instanceof AbstractPullBufferCaptureDevice))
if (!(captureDevice instanceof PullBufferDataSource))
{
DataSource cloneableDataSource =
Manager.createCloneableDataSource(captureDevice);

@ -423,6 +423,8 @@ public void read(Buffer buffer)
== -1)
throw new IOException("ioctl: request= VIDIOC_DQBUF");
long timeStamp = System.nanoTime();
try
{
int bytesused = Video4Linux2.v4l2_buffer_getBytesused(v4l2_buffer);
@ -444,6 +446,9 @@ public void read(Buffer buffer)
== -1)
throw new IOException("ioctl: request= VIDIOC_QBUF");
}
buffer.setFlags(Buffer.FLAG_LIVE_DATA | Buffer.FLAG_SYSTEM_TIME);
buffer.setTimeStamp(timeStamp);
}
/**

Loading…
Cancel
Save