Skip to content
8 changes: 7 additions & 1 deletion sdk/objc/native/src/objc_video_track_source.mm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ - (void)capturer:(RTC_OBJC_TYPE(RTCVideoCapturer) *)capturer

ObjCVideoTrackSource::ObjCVideoTrackSource() : ObjCVideoTrackSource(false) {}

#if defined(WEBRTC_ANDROID)
constexpr int kResolutionAlignment = 16;
#else
constexpr int kResolutionAlignment = 2;
#endif

ObjCVideoTrackSource::ObjCVideoTrackSource(bool is_screencast)
: AdaptedVideoTrackSource(/* required resolution alignment */ is_screencast? 16 : 2),
: AdaptedVideoTrackSource(/* required resolution alignment */ kResolutionAlignment),
is_screencast_(is_screencast) {}

ObjCVideoTrackSource::ObjCVideoTrackSource(RTCObjCVideoSourceAdapter *adapter) : adapter_(adapter) {
Expand Down