I have a screencast inherited from cricket::VideoCapturer.
When I let IsScreencast() return false, video resolution in the receiver side will change dynamically, and I cannot control it.
If IsScreencast() returns true, video resolution will be always fixed the same as the frame resolution passed in screencast.SignalFrameCaptured(&screencast, frame).
Assert captured screen size is always 1920*1080, and I want the video stream resolution can be 960*540 or others.
How to change stream resolution when screencast?
I try to use formats and constraints:
```
vector<cricket::VideoFormat> formats;
formats.push_back(cricket::VideoFormat(1920, 1080, 100, cricket::FOURCC_ABGR));
formats.push_back(cricket::VideoFormat(960, 540, 100, cricket::FOURCC_ABGR));
screencast.SetSupportedFormats(formats);
```
```
webrtc::FakeConstraints constraints2;
constraints2.SetMandatoryMaxFrameRate(20);
constraints2.AddMandatory(webrtc::MediaConstraintsInterface::kMinWidth, 960);
constraints2.AddMandatory(webrtc::MediaConstraintsInterface::kMinHeight, 540);
constraints2.AddMandatory(webrtc::MediaConstraintsInterface::kMaxAspectRatio, 960.0/540.0);
videoSource = mPeerConnectionFactoryPtr->CreateVideoSource(&screencast, &constraints2);
```
or use SDP max-recv-width and imageattr both in sender and receiver
```
a=rtcp-fb:100 transport-cc
a=fmtp:100 max-recv-width=640;max-recv-height=480
```
```
a=ssrc:3555258440 cname:{95e6e7c3-309b-45b5-975a-5fad567b1fd1}
a=imageattr:100 recv [x=960,y=540] send [x=960,y=540]
```
all are not working.
Did I have something wrong?