Android的原生OpenGL的/的OpenMAX,屏幕捕捉 [英] Android, Native OpenGL/OpenMAX, Screen capture

查看:1164
本文介绍了Android的原生OpenGL的/的OpenMAX,屏幕捕捉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用USB镜子的Andr​​oid屏PC

Mirror Android Screen to PC using USB

  1. 在使用Android开源,修改<一href="https://android.googlesource.com/platform/frameworks/av/+/idea133/cmds/screenrecord/screenrecord.cpp"相对=nofollow> screenrecord 了解您的需求和使用ADB您的Andr​​oid设备
  2. 在重新安装
  3. 使用众所周知的原生API,如的OpenGL /的的OpenMAX 捕获屏幕
  1. Using Android Open-Source, modify screenrecord for your needs and re-install on your Android device using ADB
  2. Use well known native API such as OpenGL/OpenMAX to capture screen

办法#1 肯定会工作(外壳帐户下),然而,Android操作系统每次更新时,自定义code将需要得到更新以跟上操作系统的变化,是办法#2 的API保持固定,也没有必要担心操作系统的改变,问题是,是否有可能镜像单独使用OpenGL /的OpenMAX实现?

Discussion

Approach #1 will certainly work ( under the shell account ), however, each time the Android OS is updated, the custom code will need to get updated to keep up with OS changes, with approach #2 the API stay fixed and there is no need to worry about OS changes, the question is whether it is possible to implement Mirroring solely using OpenGL/OpenMAX ?

有上面说的,这将是最好的办法,通过USB镜像的android屏幕?

Having the above said, what would be the best approach to mirror the android screen via USB ?

推荐答案

screenrecord 船舶与Android 5.0棒棒堂可以通过亚行发送原始H.264。命令行是这样的:

The screenrecord that ships with Android 5.0 "Lollipop" can send raw H.264 over ADB. The command line looks like:

adb shell screenrecord --output-format=h264 - | <player>

这是一些细节上的 bigflake页。我用它来反映画面投放在Linux工作站,但不幸的是我没有保存VLC / mplayer的命令行。

A few details are on the bigflake page. I've used it to mirror the screen onto a Linux workstation, but unfortunately I didn't save the VLC/mplayer command lines.

您可以尝试做uncom pressed帧( - 输出格式=原始帧),但体面的帧速率,很容易淹没在亚行连接,即使屏幕很小。

You can try to do uncompressed frames (--output-format=raw-frames), but at decent frame rates that easily overwhelms the ADB connection, even if the screen is tiny.

来源$ C ​​$ c是这里

Source code is here.

这篇关于Android的原生OpenGL的/的OpenMAX,屏幕捕捉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆