Video is mostly working now. It's just chopped off in the view now.

This commit is contained in:
Cameron Gutman
2014-10-19 02:07:13 -04:00
parent 037df87585
commit 3a6472eb0b
8 changed files with 48 additions and 127 deletions

View File

@@ -27,23 +27,8 @@
[super viewDidLoad];
[UIApplication sharedApplication].idleTimerDisabled = YES;
StreamView* streamView = [[StreamView alloc] initWithFrame:self.view.frame];
streamView.backgroundColor = [UIColor blackColor];
[self.view addSubview:streamView];
[streamView setNeedsDisplay];
CGAffineTransform transform = CGAffineTransformMakeTranslation((streamView.frame.size.height/2) - (streamView.frame.size.width/2), (streamView.frame.size.width/2) - (streamView.frame.size.height/2));
transform = CGAffineTransformRotate(transform, M_PI_2);
transform = CGAffineTransformScale(transform, -1, -1);
streamView.transform = transform;
// Repositions and resizes the view.
CGRect contentRect = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
streamView.bounds = contentRect;
VideoDecoderRenderer* renderer = [[VideoDecoderRenderer alloc]init];
VideoDecoderRenderer* renderer = [[VideoDecoderRenderer alloc]initWithView:self.view];
Connection* conn = [[Connection alloc] initWithHost:inet_addr([[ConnectionHandler resolveHost:[NSString stringWithUTF8String:[MainFrameViewController getHostAddr]]] UTF8String]) width:1280 height:720
renderer: renderer];