本文整理汇总了Java中org.webrtc.RendererCommon.ScalingType方法的典型用法代码示例。如果您正苦于以下问题:Java RendererCommon.ScalingType方法的具体用法?Java RendererCommon.ScalingType怎么用?Java RendererCommon.ScalingType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.webrtc.RendererCommon
的用法示例。
在下文中一共展示了RendererCommon.ScalingType方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setScalingType
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
/**
* Set how the video will fill the allowed layout area.
*/
public void setScalingType(RendererCommon.ScalingType scalingType) {
synchronized (layoutLock) {
this.scalingType = scalingType;
}
}
示例2: updateVideoView
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
protected void updateVideoView(SurfaceViewRenderer surfaceViewRenderer, boolean mirror, RendererCommon.ScalingType scalingType) {
Log.i(TAG, "updateVideoView mirror:" + mirror + ", scalingType = " + scalingType);
surfaceViewRenderer.setScalingType(scalingType);
surfaceViewRenderer.setMirror(mirror);
surfaceViewRenderer.requestLayout();
}
示例3: setScalingType
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
/**
* Set how the video will fill the allowed layout area.
*/
public void setScalingType(RendererCommon.ScalingType scalingType) {
ThreadUtils.checkIsOnMainThread();
videoLayoutMeasure.setScalingType(scalingType);
requestLayout();
}
示例4: setScalingType
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
public void setScalingType(RendererCommon.ScalingType scalingType) {
this.scalingType = scalingType;
}
示例5: onCreate
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
treeState = TreeState.IDLE;
setContentView(R.layout.activity_video_master);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mHandler = new Handler();
Bundle extras = getIntent().getExtras();
if (extras == null || !extras.containsKey(Constants.USER_NAME)) {
;
Toast.makeText(this, "Need to pass username to MasterVideoActivity in intent extras (Constants.USER_NAME).",
Toast.LENGTH_SHORT).show();
finish();
return;
}
this.treeId = extras.getString(Constants.USER_NAME, "");
Log.i(TAG, "treeId: " + treeId);
this.mCallStatus = (TextView) findViewById(R.id.call_status);
this.videoView = (GLSurfaceView) findViewById(R.id.gl_surface);
// Set up the List View for chatting
RendererCommon.ScalingType scalingType = RendererCommon.ScalingType.SCALE_ASPECT_FILL;
VideoRendererGui.setView(videoView, null);
remoteRender = VideoRendererGui.create( REMOTE_X, REMOTE_Y,
REMOTE_WIDTH, REMOTE_HEIGHT,
scalingType, false);
localRender = VideoRendererGui.create( LOCAL_X_CONNECTED, LOCAL_Y_CONNECTED,
LOCAL_WIDTH_CONNECTED, LOCAL_HEIGHT_CONNECTED,
scalingType, true);
NBMMediaConfiguration.NBMVideoFormat receiverVideoFormat = new NBMMediaConfiguration.NBMVideoFormat(352, 288, PixelFormat.RGB_888, 20);
peerConnectionParameters = new NBMMediaConfiguration( NBMMediaConfiguration.NBMRendererType.OPENGLES,
NBMMediaConfiguration.NBMAudioCodec.OPUS, 0,
NBMMediaConfiguration.NBMVideoCodec.VP8, 0,
receiverVideoFormat,
NBMMediaConfiguration.NBMCameraPosition.FRONT);
nbmWebRTCPeer = new NBMWebRTCPeer(peerConnectionParameters, this, remoteRender, this);
nbmWebRTCPeer.initialize();
Log.i(TAG, "MasterVideoActivity initialized");
// mHandler.postDelayed(publishDelayed, 4000);
MainActivity.getKurentoTreeAPIInstance().addObserver(this);
createTreeRequestId = ++Constants.id;
MainActivity.getKurentoTreeAPIInstance().sendCreateTree(treeId, createTreeRequestId);
treeState = treeState.CREATING;
mCallStatus.setText("Creating tree...");
}
示例6: onCreate
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
treeState = TreeState.IDLE;
setContentView(R.layout.activity_video_master);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
mHandler = new Handler();
Bundle extras = getIntent().getExtras();
if (extras == null || !extras.containsKey(Constants.USER_NAME)) {
;
Toast.makeText(this, "Need to pass username to MasterVideoActivity in intent extras (Constants.USER_NAME).",
Toast.LENGTH_SHORT).show();
finish();
return;
}
this.treeId = extras.getString(Constants.USER_NAME, "");
Log.i(TAG, "treeId: " + treeId);
// if (extras.containsKey(Constants.CALL_USER)) {
// this.calluser = extras.getString(Constants.CALL_USER, "");
// Log.i(TAG, "callUser: " + calluser);
// }
this.mCallStatus = (TextView) findViewById(R.id.call_status);
this.videoView = (GLSurfaceView) findViewById(R.id.gl_surface);
queuedIceCandidates = new Vector<>();
// Set up the List View for chatting
RendererCommon.ScalingType scalingType = RendererCommon.ScalingType.SCALE_ASPECT_FILL;
VideoRendererGui.setView(videoView, null);
remoteRender = VideoRendererGui.create( REMOTE_X, REMOTE_Y,
REMOTE_WIDTH, REMOTE_HEIGHT,
scalingType, false);
localRender = VideoRendererGui.create( LOCAL_X_CONNECTED, LOCAL_Y_CONNECTED,
LOCAL_WIDTH_CONNECTED, LOCAL_HEIGHT_CONNECTED,
scalingType, true);
NBMMediaConfiguration.NBMVideoFormat receiverVideoFormat = new NBMMediaConfiguration.NBMVideoFormat(352, 288, PixelFormat.RGB_888, 20);
peerConnectionParameters = new NBMMediaConfiguration( NBMMediaConfiguration.NBMRendererType.OPENGLES,
NBMMediaConfiguration.NBMAudioCodec.OPUS, 0,
NBMMediaConfiguration.NBMVideoCodec.VP8, 0,
receiverVideoFormat,
NBMMediaConfiguration.NBMCameraPosition.FRONT);
nbmWebRTCPeer = new NBMWebRTCPeer(peerConnectionParameters, this, remoteRender, this);
nbmWebRTCPeer.initialize();
Log.i(TAG, "MasterVideoActivity initialized");
mHandler.postDelayed(createOfferDelayed, 1000);
MainActivity.getKurentoTreeAPIInstance().addObserver(this);
treeState = TreeState.CREATING_OFFER;
mCallStatus.setText("Creating local offer...");
}
示例7: updateVideoView
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
protected void updateVideoView(QBRTCSurfaceView surfaceViewRenderer, boolean mirror, RendererCommon.ScalingType scalingType) {
Log.i(TAG, "updateVideoView mirror:" + mirror + ", scalintType = " + scalingType);
surfaceViewRenderer.setScalingType(scalingType);
surfaceViewRenderer.setMirror(mirror);
surfaceViewRenderer.requestLayout();
}
示例8: onVideoScalingSwitch
import org.webrtc.RendererCommon; //导入方法依赖的package包/类
void onVideoScalingSwitch(RendererCommon.ScalingType scalingType);