ubuntu 12.04 双屏 第二屏不识别

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 12.04 双屏 第二屏不识别相关的知识,希望对你有一定的参考价值。

第二屏是三星2253bw,屏幕显示深红色,是不是哪里出问题了?vga线有问题吗?还是驱动

参考技术A 驱动问题吧追问

这个问题要怎么解决阿?
大概说一下,就采纳了

追答

双屏显示好像的设置,显示器!数据线没有问题,设置显示器里面的显示。

本回答被提问者采纳

iOS AirPlay 第二屏教程

【中文标题】iOS AirPlay 第二屏教程【英文标题】:iOS AirPlay Second Screen Tutorial 【发布时间】:2014-01-05 03:07:47 【问题描述】:

我正在考虑将 AirPlay 功能添加到我的一个 ViewController 中。 View Controller 只显示一个 UIWebView。我想要做的是添加一个按钮,将这个内容镜像到 Apple TV。我知道可以进行系统范围的镜像,但它不会填满整个屏幕,周围有黑条。我一直在网上搜索,但我发现的大多数东西都是从 iOS 5 回来的,而且已经过时了。有人可以向我指出可以提供帮助的教程或嵌入式库的方向吗?我只需要它来镜像一个视图的内容,以便在 Apple TV 上全屏显示。

到目前为止,这是我所做的,但我相信它只创建了第二个窗口,没有在上面放任何东西。

在 AppDelegate 中,我为它创建了一个属性:

@property (nonatomic, retain) UIWindow *secondWindow;

在 AppDelegate 的 didFinish 方法中我运行:

 NSNotificationCenter *center = [NSNotificationCenter defaultCenter];

    [center addObserver:self selector:@selector(handleScreenDidConnectNotification:)
                   name:UIScreenDidConnectNotification object:nil];
    [center addObserver:self selector:@selector(handleScreenDidDisconnectNotification:)
                   name:UIScreenDidDisconnectNotification object:nil];

然后在 AppDelegate 我有:

- (void)handleScreenDidConnectNotification:(NSNotification*)aNotification

    UIScreen *newScreen = [aNotification object];
    CGRect screenBounds = newScreen.bounds;

    if (!self.secondWindow)
    
        self.secondWindow = [[UIWindow alloc] initWithFrame:screenBounds];
        self.secondWindow.screen = newScreen;

        // Set the initial UI for the window.
    


- (void)handleScreenDidDisconnectNotification:(NSNotification*)aNotification

    if (self.secondWindow)
    
        // Hide and then delete the window.
        self.secondWindow.hidden = YES;
        self.secondWindow = nil;

    


在我希望允许在 Apple TV 上镜像 WebView 的 viewController 中,我有:

- (void)checkForExistingScreenAndInitializeIfPresent

    if ([[UIScreen screens] count] > 1)
    
        // Get the screen object that represents the external display.
        UIScreen *secondScreen = [[UIScreen screens] objectAtIndex:1];
        // Get the screen's bounds so that you can create a window of the correct size.
        CGRect screenBounds = secondScreen.bounds;

       appDelegate.secondWindow = [[UIWindow alloc] initWithFrame:screenBounds];
        appDelegate.secondWindow.screen = secondScreen;

        // Set up initial content to display...
        // Show the window.
       appDelegate.secondWindow.hidden = NO;
        NSLog(@"YES");

    

我从here 得到了这一切。但是,这就是它所显示的全部内容,所以我不确定如何将内容显示到该屏幕上。

【问题讨论】:

您有没有想出解决方案?我现在正在尝试做同样的事情。 @Daniel 不幸的是,我没有。我已经求助于让人们进行空中播放屏幕镜像,这几乎没有那么优雅或有用,但是哦,好吧。 5000 次浏览都想不通。 【参考方案1】:

根据您的 Web 视图中发生的情况,您要么必须将第二个页面指向同一页面,要么将现有页面移至新窗口。无论哪种方式,您对第二个窗口的处理方式与您对应用程序主窗口的处理方式几乎相同——向其中添加视图,它们应该会显示在第二个显示屏上。

【讨论】:

我已经添加到checkForAdditional...方法中,将根视图更改为新窗口,添加视图和子视图,但它仍然没有做任何事情。【参考方案2】:

我想你已经看过了,但这是我能找到的唯一示例项目:https://github.com/quellish/AirplayDemo/

以下是一些可能值得一读的相关问题:

does anyone know how to get started with airplay?

Airplay Mirroring + External UIScreen = fullscreen UIWebView video playback?

iOS AirPlay: my app is only notified of an external display when mirroring is ON?

祝你好运!

【讨论】:

【参考方案3】:

目前只有两个选项可以进行 Airplay“镜像”:系统范围的监控和完全自定义的镜像。由于系统范围的镜像不是您的解决方案,因此您必须按照您在代码片段中已经确定的方式进行。

正如 Noah 所指出的,这意味着为第二个屏幕提供内容,就像为内部显示器提供内容一样。据我了解,您希望在内部显示器上显示与以前相同的数据/网站,但在远程视图/网络视图中以不同方式显示(例如不同的纵横比)。一种方法是让一个 webview 在主/从设置中跟随另一个。您必须监视主服务器中的更改(如用户 scolling)并将它们传播到从服务器。第二种方法可能是将原始 webview 内容渲染到缓冲区并将此缓冲区部分绘制在“哑”UIView 中。这会更快一些,因为网站不必加载和渲染两次。

【讨论】:

只是对旧答案的一些想法:我认为复制原始 webView 的请求并在“外部”副本上调用相应的方法会更容易。此外,当具有不同的方面时,网站不会那么高,因此需要相应地翻译滚动量。 尽管如此,OP 正在寻找一种在 AirPlay 设备上显示第二个窗口的方法。

以上是关于ubuntu 12.04 双屏 第二屏不识别的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu12.04双屏显示问题,能否自适应每个屏幕最大的分辨率?

win7中怎样把任务栏扩展到双屏幕

为啥 Linux 下无法识别第二显示器

ubuntu12.04下usb摄像头问题 想在ubuntu下

Ubuntu12.04系统无法读取移动硬盘

vmware安装ubuntu12.04怎么连不起网 啊