mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
video: add test case for video view switching
Define TEST_VIDEO_VIEW_CHANGE + add a view to xib file
This commit is contained in:
parent
55d2116b58
commit
413e3f824f
2 changed files with 23 additions and 0 deletions
|
|
@ -63,6 +63,9 @@
|
|||
UIView* videoGroup;
|
||||
UIView* videoView;
|
||||
UIView* videoPreview;
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
UIView* testVideoView;
|
||||
#endif
|
||||
UIImageView* videoCallQuality;
|
||||
UICamSwitch* videoCameraSwitch;
|
||||
UIActivityIndicatorView* videoUpdateIndicator;
|
||||
|
|
@ -136,6 +139,9 @@
|
|||
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoGroup;
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoView;
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
@property (nonatomic, retain) IBOutlet UIView* testVideoView;
|
||||
#endif
|
||||
@property (nonatomic, retain) IBOutlet UIView* videoPreview;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView* videoCallQuality;
|
||||
@property (nonatomic, retain) IBOutlet UICamSwitch* videoCameraSwitch;
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ const NSInteger SECURE_BUTTON_TAG=5;
|
|||
@synthesize videoCameraSwitch;
|
||||
@synthesize videoUpdateIndicator;
|
||||
@synthesize videoWaitingForFirstImage;
|
||||
@synthesize testVideoView;
|
||||
|
||||
@synthesize addVideo;
|
||||
|
||||
|
|
@ -239,6 +240,19 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
// Define TEST_VIDEO_VIEW_CHANGE in IncallViewController.h to enable video view switching testing
|
||||
-(void) _debugChangeVideoView {
|
||||
static bool normalView = false;
|
||||
if (normalView) {
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc], (unsigned long)videoView);
|
||||
} else {
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc], (unsigned long)testVideoView);
|
||||
}
|
||||
normalView = !normalView;
|
||||
}
|
||||
#endif
|
||||
|
||||
-(void) enableVideoDisplay {
|
||||
[self orientationChanged:nil];
|
||||
|
||||
|
|
@ -270,6 +284,9 @@ void addAnimationFadeTransition(UIView* view, float duration) {
|
|||
done = true;
|
||||
}
|
||||
|
||||
#ifdef TEST_VIDEO_VIEW_CHANGE
|
||||
[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(_debugChangeVideoView) userInfo:nil repeats:YES];
|
||||
#endif
|
||||
[self batteryLevelChanged:nil];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue