if (source instanceof SourceCloneable)
return source;
if (source instanceof PushBufferDataSource)
{ if (source instanceof CaptureDevice)
return new CloneableCaptureDevicePushBufferDataSource((PushBufferDataSource) source);
else
return new CloneablePushBufferDataSource((PushBufferDataSource) source);
}
else if (source instanceof PullBufferDataSource)
{ if (source instanceof CaptureDevice)