diff --git a/src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java b/src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
index f18071783..193ee8404 100644
--- a/src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
+++ b/src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
@@ -1104,9 +1104,16 @@ public void movePartialDesktopStreaming(int x, int y)
x -= bounds.x;
y -= bounds.y;
- ((net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming.DataSource)
- ds)
- .setOrigin(0, currentScreen.getIndex(), x, y);
+ /*((net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming.DataSource)
+ ds)*/
+ Object imgStreamingDataSource = ds.getControl(
+ net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming.DataSource.class.getName());
+ if(imgStreamingDataSource != null)
+ {
+ ((net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming.DataSource)
+ imgStreamingDataSource)
+ .setOrigin(0, currentScreen.getIndex(), x, y);
+ }
}
/**
diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/imgstreaming/DataSource.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/imgstreaming/DataSource.java
index af3d28f27..4e5e5898d 100644
--- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/imgstreaming/DataSource.java
+++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/imgstreaming/DataSource.java
@@ -8,13 +8,10 @@
import javax.media.*;
import javax.media.control.*;
-import javax.media.protocol.*;
import net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.*;
import net.java.sip.communicator.impl.neomedia.protocol.*;
-import net.sf.fmj.media.protocol.*;
-
/**
* Implements CaptureDevice and DataSource for the purposes of
* image and desktop streaming.
@@ -25,20 +22,13 @@
*/
public class DataSource
extends AbstractVideoPullBufferCaptureDevice
- implements MuteDataSource,
- SourceCloneable
+ implements Controls
{
/**
* Stream created.
*/
private ImageStream stream = null;
- /**
- * The cloneable representation of this DataSource.
- */
- private CloneableCaptureDevicePullBufferDataSource cloneableDataSource
- = null;
-
/**
* Initializes a new DataSource instance.
*/
@@ -125,44 +115,54 @@ protected AbstractPullBufferStream createStream(
}
/**
- * Determines whether this DataSource is mute.
- *
- * An image / desktop sharing does not send any
- * sounds. Thus it is always mute (returns always true).
+ * Implements {@link Controls#getControl(String)}. Invokes
+ * {@link #getControls()} and then looks for a control of the specified type
+ * in the returned array of controls.
*
- * @return true since this DataSource is always mute.
+ * @param controlType a String value naming the type of the control
+ * of this instance to be retrieved
+ * @return an Object which represents the control of this instance
+ * with the specified type
*/
- public boolean isMute()
+ public Object getControl(String controlType)
{
- return true;
+ if(controlType == this.getClass().getName())
+ {
+ return this;
+ }
+ else
+ {
+ return super.getControl(controlType);
+ }
}
/**
- * Sets the mute state of this DataSource.
+ * Implements {@link Controls#getControl(String)}. Invokes
+ * {@link #getControls()} and then looks for a control of the specified type
+ * in the returned array of controls.
*
- * Does not change anything, since image /
- * desktop sharing does not send any sounds. Thus it is always mute.
- *
- * @param mute true to mute this DataSource; otherwise,
- * false
- */
- public void setMute(boolean mute)
- {
- }
-
- /**
- * Based on JMF testing, the clone is in the same state as the original
- * (opened and connected if the original is), but at the beginning of the
- * media, not whatever position the original is.
+ * @param controlType a String value naming the type of the control
+ * of this instance to be retrieved
+ * @return an Object which represents the control of this instance
+ * with the specified type
*/
- public javax.media.protocol.DataSource createClone()
+ public Object[] getControls()
{
- if(this.cloneableDataSource == null)
+ Object[] thisControls;
+ Object[] superControls = super.getControls();
+ if(superControls != null)
{
- this.cloneableDataSource
- = new CloneableCaptureDevicePullBufferDataSource(this);
+ thisControls = new Object[superControls.length + 1];
+ System.arraycopy(
+ superControls, 0,
+ thisControls, 0,
+ superControls.length);
+ thisControls[superControls.length] = this;
}
-
- return this.cloneableDataSource.createClone();
+ else
+ {
+ thisControls = new Object[]{this};
+ }
+ return thisControls;
}
}