RxFFmpeg icon indicating copy to clipboard operation
RxFFmpeg copied to clipboard

绝对路径已经不推荐在Android10 上使用了,如何兼容Android10的文件系统?

Open didikee opened this issue 6 years ago • 3 comments

类似的问题链接如下: https://stackoverflow.com/questions/58479616/ffmpeg-command-is-not-working-in-android-q

https://stackoverflow.com/questions/57445600/ffmpeg-seeking-not-possible-with-file-descriptor-on-android-q

didikee avatar Nov 26 '19 03:11 didikee

你试过在Android 10上运行吗

microshow avatar Nov 26 '19 04:11 microshow

你试过在Android 10上运行吗

没有,因为无法测试. /** * Absolute filesystem path to the media item on disk. *

* Note that apps may not have filesystem permissions to directly access * this path. Instead of trying to open this path directly, apps should * use {@link ContentResolver#openFileDescriptor(Uri, String)} to gain * access. * * @deprecated Apps may not have filesystem permissions to directly * access this path. Instead of trying to open this path * directly, apps should use * {@link ContentResolver#openFileDescriptor(Uri, String)} * to gain access. */ @Deprecated @Column(Cursor.FIELD_TYPE_STRING) public static final String DATA = "_data";

_data 已经标记为过时了,在Android10 上无法获取绝对路径.

暂时能想到的就是copy文件到私有目录,然后运行,但是如果视频较大也不是好办法

didikee avatar Nov 26 '19 05:11 didikee

还有什么解决方案?

liulei9385 avatar Nov 16 '21 01:11 liulei9385