File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 72
72
73
73
int width = frame->size ().width ();
74
74
int height = frame->size ().height ();
75
- int real_width = frame-> size (). width () ;
75
+ int real_width = width;
76
76
77
- // A multiple of 32 must be used as the width of the src frame,
78
- // and the right black border needs to be cropped during conversion.
79
- if ( (width % 32 ) !=0 ) {
80
- width = (width / 32 + 1 ) * 32 ;
77
+ if (type_ == kWindow ) {
78
+ // A multiple of 32 must be used as the width of the src frame,
79
+ // and the right black border needs to be cropped during conversion.
80
+ if ( (width % 32 ) !=0 ) {
81
+ width = (width / 32 + 1 ) * 32 ;
82
+ }
81
83
}
82
84
83
85
if (!i420_buffer_ || !i420_buffer_.get () ||
Original file line number Diff line number Diff line change 45
45
capturer_ = webrtc::DesktopCapturer::CreateWindowCapturer (options_);
46
46
}
47
47
callback_ = std::make_unique<CallbackProxy>();
48
+ type_ = type;
48
49
thread_->Start ();
49
50
capturer_->Start (callback_.get ());
50
51
}
163
164
164
165
int width = frame->size ().width ();
165
166
int height = frame->size ().height ();
166
- int real_width = frame-> size (). width () ;
167
+ int real_width = width;
167
168
168
- if ( (width % 32 ) !=0 ) {
169
- width = (width / 32 + 1 ) * 32 ;
169
+ if (type_ == kWindow ) {
170
+ // A multiple of 32 must be used as the width of the src frame,
171
+ // and the right black border needs to be cropped during conversion.
172
+ if ( (width % 32 ) !=0 ) {
173
+ width = (width / 32 + 1 ) * 32 ;
174
+ }
170
175
}
171
176
172
177
cinfo.image_width = real_width;
You can’t perform that action at this time.
0 commit comments