Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1144 Discussions

In android SDK,why LocalCameraStreamParameters.setResolution has no effect

张_进_
Beginner
234 Views

1. I use the method which name is LocalCameraStreamParameters.setResolution to set several different resolutions.But it doesn't work

2.How does MCU 3.0 rotate video, and the method LocalCameraStreamParameters.setDisplayOrientation(context), it doesn‘t work too.

 

0 Kudos
4 Replies
He_Z_Intel
Employee
234 Views

Hi, could you please elaborate the reproduce procedure? Thanks

张_进_
Beginner
234 Views
LocalCameraStreamParameters msp = new LocalCameraStreamParameters(
						true, true);
				PublishOptions option = new PublishOptions();
//				msp.setCamera(CameraType.FRONT);
				
				if (rate == 3) {
					String resolution = ConfigUtil.getInstance().getResolution();
					 if(!TextUtils.isEmpty(resolution)){
						switch (Integer.parseInt(resolution.split("x")[0])) {
						case 320:
							msp.setResolution(320, 240);
							maximumVideoBandwidth = 300;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(50);
							break;
						case 640:
							msp.setResolution(640, 480);
							maximumVideoBandwidth = 600;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(100);
							break;
						case 750:
							msp.setResolution(750, 540);
							maximumVideoBandwidth = 703;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(117);
							break;
						case 480:
							msp.setResolution(480, 360);
							maximumVideoBandwidth = 450;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(75);
							break;
						case 360:
							msp.setResolution(360, 240);
							maximumVideoBandwidth = 338;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(56);
							break;
						case 180:
							msp.setResolution(180, 120);
							maximumVideoBandwidth = 168;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(28);
							break;
						case 1024:
						default:
							msp.setResolution(1024, 768);
							maximumVideoBandwidth = 960;
							option.setMaximumVideoBandwidth(maximumVideoBandwidth);
							option.setMaximumAudioBandwidth(100);
							break;
						} 
					 }
				}

 

张_进_
Beginner
234 Views

Feeling a little bit of the effect, the effect is not very obvious

YanbinZ_Intel
Employee
234 Views

 

1. Please make sure your connection network bandwidth is sufficient to transfer high resolutions' video 

2. make sure the resolution is supported by your test phone camera. 

3. Please close the previous stream  then create new resolution camera stream .

 

Reply