- Enable again muting support for video DataSource;

- Add getLocator() method to Push|PullDataSourceDelegate (otherwise MutePush|PullDataSource classes return null and we cannot check if locator is QT/Desktop streaming to disable local video);
- Disable local video for desktop streaming.
cusax-fix
Sebastien Vincent 16 years ago
parent ad381381cf
commit 822fead013

@ -27,7 +27,7 @@ public ImageStreamingAuto() throws Exception
{
String name = "Desktop streaming";
CaptureDeviceInfo devInfo = new CaptureDeviceInfo(name,
new MediaLocator(ImageStreamingUtils.LOCATOR_PREFIX + name),
new MediaLocator(ImageStreamingUtils.LOCATOR_PREFIX + ":" + name),
DataSource.getFormats());
/* add to JMF device manager */

@ -12,6 +12,8 @@
import javax.media.protocol.*;
import net.java.sip.communicator.impl.neomedia.*;
import net.java.sip.communicator.impl.neomedia.protocol.*;
import net.java.sip.communicator.impl.neomedia.imgstreaming.*;
import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.neomedia.event.*;
import net.java.sip.communicator.util.*;
@ -90,23 +92,22 @@ protected DataSource createCaptureDevice()
* Create our DataSource as SourceCloneable so we can use it to both
* display local video and stream to remote peer.
*/
/*
* FIXME By overriding the super implementation, we have disabled muting
* support.
*/
DataSource captureDevice = getDevice().createOutputDataSource();
DataSource captureDevice = super.createCaptureDevice();
if (captureDevice != null)
{
MediaLocator locator = captureDevice.getLocator();
/*
* FIXME There is no video in calls when using the QuickTime/QTKit
* CaptureDevice so the local video support is disabled for it now.
* CaptureDevice and desktop streaming, so the local video support
* is disabled for them now.
*/
if ((locator == null)
|| !QuickTimeAuto.LOCATOR_PROTOCOL
.equals(locator.getProtocol()))
|| (!QuickTimeAuto.LOCATOR_PROTOCOL
.equals(locator.getProtocol()) &&
!ImageStreamingUtils.LOCATOR_PREFIX
.equals(locator.getProtocol())))
{
DataSource cloneableDataSource
= Manager.createCloneableDataSource(captureDevice);

@ -19,7 +19,7 @@ public class ImageStreamingUtils
/**
* The locator prefix used when creating or parsing <tt>MediaLocator</tt>s.
*/
public static final String LOCATOR_PREFIX = "imgstreaming:";
public static final String LOCATOR_PREFIX = "imgstreaming";
/**
* Get a scaled <tt>BufferedImage</tt>.

@ -96,6 +96,19 @@ public String getContentType()
return dataSource.getContentType();
}
/**
* Implements {@link DataSource#getLocator()}. Delegates to the wrapped
* <tt>DataSource</tt>.
*
* @return a <tt>MediaLocator</tt> value which describes the locator of the
* wrapped <tt>DataSource</tt>
*/
@Override
public MediaLocator getLocator()
{
return dataSource.getLocator();
}
/**
* Implements {@link DataSource#getControl(String)}. Delegates to the
* wrapped <tt>DataSource</tt>. Overrides

@ -96,6 +96,19 @@ public String getContentType()
return dataSource.getContentType();
}
/**
* Implements {@link DataSource#getLocator()}. Delegates to the wrapped
* <tt>DataSource</tt>.
*
* @return a <tt>MediaLocator</tt> value which describes the locator of the
* wrapped <tt>DataSource</tt>
*/
@Override
public MediaLocator getLocator()
{
return dataSource.getLocator();
}
/**
* Implements {@link DataSource#getControl(String)}. Delegates to the
* wrapped <tt>DataSource</tt>. Overrides

Loading…
Cancel
Save