在 NativeScript 应用程序中,我正在尝试将实时效果应用于应用的视频(特别是灰度视频播放(。我目前正在使用nativescript-videoplayer
nativescript 插件的分支在应用程序中播放视频。在 android 中创建视频视图的相关源代码在这里:
https://github.com/nstudio/nativescript-videoplayer/blob/master/src/videoplayer.android.ts
本质上,我想修改它以应用效果/着色器,类似于这里给出的答案:
https://stackoverflow.com/a/31958741/192694
但是,我不确定此着色器代码将在哪里连接到我现有的MediaPlayer
创建流并设置其 SurfaceTexture 表面。
原始视频播放器插件在 MediaPlayer 实例上使用 TextureView,相反,您可以使用 GLSurfaceView,如链接的其他 SO 示例中所示@Bill。