Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
/**
* Gets the <tt>QualityControl</tt> of this <tt>VideoMediaStream</tt>.
*
* @return the <tt>QualityControl</tt> of this <tt>VideoMediaStream</tt>
*/
public QualityControl getQualityControl()
{
return qualityControl;
}
/**
* Updates the <tt>QualityControl</tt> of this <tt>VideoMediaStream</tt>.
*
* @param advancedParams parameters of advanced attributes that may affect
* quality control
*/
public void updateQualityControl(
Map<String, String> advancedParams)
{
for(Map.Entry<String, String> entry : advancedParams.entrySet())
{
if(entry.getKey().equals("imageattr"))
{
Dimension res[] = parseSendRecvResolution(entry.getValue());
if(res != null)
{
qualityControl.setRemoteSendMaxPreset(

Lyubomir Marinov
committed
new QualityPreset(res[0]));
qualityControl.setRemoteReceiveResolution(

Lyubomir Marinov
committed
res[1]);

Lyubomir Marinov
committed
((VideoMediaDeviceSession)getDeviceSession())
.setOutputSize(outputSize);
}
}
}
}
/**
* Move origin of a partial desktop streaming <tt>MediaDevice</tt>.
*
* @param x new x coordinate origin
* @param y new y coordinate origin
*/
public void movePartialDesktopStreaming(int x, int y)
{
MediaDeviceImpl dev = (MediaDeviceImpl)getDevice();
if (!dev.getCaptureDeviceInfo().getLocator().getProtocol().equals(
DeviceSystem.LOCATOR_PROTOCOL_IMGSTREAMING))
return;
DataSource captureDevice = getDeviceSession().getCaptureDevice();
Object imgStreamingControl
= captureDevice.getControl(ImgStreamingControl.class.getName());
if (imgStreamingControl == null)
return;
// Makes the screen detection with a point inside a real screen i.e.
// x and y are both greater than or equal to 0.

Lyubomir Marinov
committed
ScreenDevice screen
= NeomediaServiceUtils.getMediaServiceImpl().getScreenForPoint(
new Point((x < 0) ? 0 : x, (y < 0) ? 0 : y));
Rectangle bounds = ((ScreenDeviceImpl) screen).getBounds();
((ImgStreamingControl) imgStreamingControl).setOrigin(
0,
screen.getIndex(),
x - bounds.x, y - bounds.y);