开发者

iphone, ipad VGA External Display - tvOutManager

i used all the examples and source code out there for displaying application con开发者_StackOverflowtent to external VGA display. while playing video in inside of the application am getting bellow thing in external device. any suggestion.... am i missing somthing.. but in device it showing actual window in fine way..

iphone, ipad VGA External Display - tvOutManager


Hello All here am answering to my own question.

robterrell's TVOutManager will not play any video to external device by simply doing [[TvOutManager sharedinstance] startTvOut] and [[TvOutManager sharedinstance]s topTVOut];

here we have add the instance of player to tvoutWindow. [tvoutWindow addSubview:player's instance];

but here thing is the video is not displayed in device, but you can control external window player from device.

cheers.


iphone, ipad VGA External Display - tvOutManager

   NSString *url = [[NSBundle mainBundle] pathForResource:@"Overview" ofType:@"mov"];

    player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:)name:MPMoviePlayerPlaybackDidFinishNotification object:player];

        //---play partial screen---
    player.view.frame = CGRectMake(35, 450, 430, 300);
    [self.view addSubview:player.view];

    [player play];  

    - (void) movieFinishedCallback:(NSNotification*) aNotification {

    [[TVOutManager sharedInstance] startTVOut];
    player = [aNotification object];
    [[NSNotificationCenter defaultCenter] 
     removeObserver:self
     name:MPMoviePlayerPlaybackDidFinishNotification
     object:player];
    [player stop];

}

this the code am added in mainviewController class in robterrell's TVOutManager sample application. after connecting device into external device. while switching mirror video on am not getting anything..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜