You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i have a problem when using libary on andoid 10,11.
i use this constructor
public GPUMp4Composer descriptor(final FileDescriptor srcFileDescriptor, @NonNull final FileDescriptor destFileDescriptor) { if (Build.VERSION.SDK_INT < 26) { throw new IllegalArgumentException("destFileDescriptor can not use"); } this.srcDataSource = new FileDescriptorDataSource(srcFileDescriptor); this.destPath = null; this.destFileDescriptor = destFileDescriptor; return this; }
I have srcFileDescriptor by method: public static FileDescriptor getSrcFileDescriptior(Context context, Uri uri) { try { ParcelFileDescriptor parcelFileDescriptor = context.getContentResolver().openFileDescriptor(uri, "rw"); return parcelFileDescriptor.getFileDescriptor(); } catch (FileNotFoundException e) { e.printStackTrace(); } return null; }
i use bellow method to get destFileDescriptor :
`
public static FileDescriptor getDesFileDescriptior(Context context) {
Hi, i have a problem when using libary on andoid 10,11.
i use this constructor
public GPUMp4Composer descriptor(final FileDescriptor srcFileDescriptor, @NonNull final FileDescriptor destFileDescriptor) { if (Build.VERSION.SDK_INT < 26) { throw new IllegalArgumentException("destFileDescriptor can not use"); } this.srcDataSource = new FileDescriptorDataSource(srcFileDescriptor); this.destPath = null; this.destFileDescriptor = destFileDescriptor; return this; }
I have srcFileDescriptor by method:
public static FileDescriptor getSrcFileDescriptior(Context context, Uri uri) { try { ParcelFileDescriptor parcelFileDescriptor = context.getContentResolver().openFileDescriptor(uri, "rw"); return parcelFileDescriptor.getFileDescriptor(); } catch (FileNotFoundException e) { e.printStackTrace(); } return null; }
i use bellow method to get destFileDescriptor :
`
public static FileDescriptor getDesFileDescriptior(Context context) {
But when i run, I get the following error:
W/System.err: java.lang.NullPointerException: uri 2021-04-09 10:36:20.285 8431-8431/com.example.textonvideo W/System.err: at com.android.internal.util.Preconditions.checkNotNull(Preconditions.java:128) 2021-04-09 10:36:20.285 8431-8431/com.example.textonvideo W/System.err: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1233) 2021-04-09 10:36:20.285 8431-8431/com.example.textonvideo W/System.err: at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1106) 2021-04-09 10:36:20.285 8431-8431/com.example.textonvideo W/System.err: at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1060) 2021-04-09 10:36:20.285 8431-8431/com.example.textonvideo W/System.err: at com.videoart.textonvideo.utils.Utils.getDesFileDescriptior(Utils.java:109) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at com.videoart.textonvideo.services.VideoEditorService.composeMp4(VideoEditorService.java:114) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at com.videoart.textonvideo.services.VideoEditorService.onStartCommand(VideoEditorService.java:63) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3693) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at android.app.ActivityThread.-wrap22(Unknown Source:0) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1827) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106) 2021-04-09 10:36:20.286 8431-8431/com.example.textonvideo W/System.err: at android.os.Looper.loop(Looper.java:164) 2021-04-09 10:36:20.287 8431-8431/com.example.textonvideo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7000) 2021-04-09 10:36:20.287 8431-8431/com.example.textonvideo W/System.err: at java.lang.reflect.Method.invoke(Native Method) 2021-04-09 10:36:20.287 8431-8431/com.example.textonvideo W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441) 2021-04-09 10:36:20.287 8431-8431/com.example.textonvideo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
how to solve this problem ?
The text was updated successfully, but these errors were encountered: