mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-07 16:26:09 +00:00
added code to launch a stream and decode and render the stream
This commit is contained in:
@@ -14,6 +14,12 @@
|
||||
@end
|
||||
|
||||
@implementation MainFrameViewController
|
||||
static NSString* hostAddr;
|
||||
|
||||
+ (const char*)getHostAddr
|
||||
{
|
||||
return [hostAddr UTF8String];
|
||||
}
|
||||
|
||||
- (void)PairButton:(UIButton *)sender
|
||||
{
|
||||
@@ -23,7 +29,19 @@
|
||||
- (void)StreamButton:(UIButton *)sender
|
||||
{
|
||||
NSLog(@"Stream Button Pressed!");
|
||||
//67339056
|
||||
hostAddr = self.HostField.text;
|
||||
NSString* host = [NSString stringWithFormat:@"http://%@:47989/launch?uniqueid=0&appid=67339056", self.HostField.text];
|
||||
NSLog(@"host: %@", host);
|
||||
|
||||
[self performSegueWithIdentifier:@"createStreamFrame" sender:self];
|
||||
|
||||
NSURL* url = [[NSURL alloc] initWithString:host];
|
||||
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];
|
||||
[request setHTTPMethod:@"GET"];
|
||||
NSURLResponse* response = nil;
|
||||
NSData *response1 = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:NULL];
|
||||
NSLog(@"url response: %@", response1);
|
||||
}
|
||||
|
||||
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
|
||||
|
||||
Reference in New Issue
Block a user