Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121221

Camera Example - Recording Denied with "Invalid Argument" Error

    XMLWordPrintable

Details

    • Android
    • 4473084fe (dev), ecb82b2f5 (6.7), e6c46f3db (6.6), f86b9ce6d (tqtc/lts-6.5)
    • 2024wk06FOQtforAndroid

    Description

      Description:- 

      In the Camera example, attempting to start recording results in an error message stating "invalid argument." Additionally, the error message "Could not initialize encoder" is displayed, and recording is denied. This issue is not present in Qt 6.2.11.

      Logs:-

      W MediaCodec-JNI: try to release MediaCodec from JMediaCodec::~JMediaCodec()...
      W MediaCodec-JNI: done releasing MediaCodec from JMediaCodec::~JMediaCodec().
      W libcamera_arm64-v8a.so: Couldn't open codec for writing "Generic error in an external library"
      W libcamera_arm64-v8a.so: codec context is not initialized!
      W libcamera_arm64-v8a.so: codec context is not initialized!
      W libcamera_arm64-v8a.so: codec context is not initialized!
      W libcamera_arm64-v8a.so: codec context is not initialized!
      D AudioRecord: start return status 0
      D AudioRecord: stop: 0x7746ff1500
      D AudioRecord: AudioRecord::stop
      W libcamera_arm64-v8a.so: codec context is not initialized!
      E BackgroundFallback: initVivoBgFallback callstackcom.android.internal.policy.DecorView.<init>:378 com.android.internal.policy.PhoneWindow.generateDecor:2442 com.android.internal.policy.PhoneWindow.installDecor:2820 com.android.internal.policy.PhoneWindow.setContentView:452 com.android.internal.app.AlertController.installContent:292 android.app.AlertDialog.onCreate:444 android.app.Dialog.dispatchOnCreate:442 android.app.Dialog.show:337 org.qtproject.qt.android.QtMessageDialogHelper$1.run:315 android.os.Handler.handleCallback:873
      I PhoneWindow: initSystemUIColor
      D AudioRecord: stop done
      D AudioRecord: stop: 0x7746ff1500
      D AudioRecord: stop: 0x7746ff1500
      D ViewRootImpl[Capture Error]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
      E BackgroundFallback: initVivoBgFallback callstackcom.android.internal.policy.DecorView.<init>:378 com.android.internal.policy.PhoneWindow.generateDecor:2442 com.android.internal.policy.PhoneWindow.installDecor:2820 com.android.internal.policy.PhoneWindow.setContentView:452 com.android.internal.app.AlertController.installContent:292 android.app.AlertDialog.onCreate:444 android.app.Dialog.dispatchOnCreate:442 android.app.Dialog.show:337 org.qtproject.qt.android.QtMessageDialogHelper$1.run:315 android.os.Handler.handleCallback:873
      I PhoneWindow: initSystemUIColor
      D ViewRootImpl[Capture Error]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false 

       

      Steps to Reproduce:-

      1. Build and Run Camera Example on Android.
      2. Switch to video mode.
      3. click "record" button.

      Expected Behavior:- Recording should start without errors, and it should be able to capture video seamlessly.

      Actual Behavior:- Upon attempting to start recording, the application displays an error message stating "invalid argument" and "Could not initialize encoder." Recording is denied, and no video is captured. Check the attached video.

       

      Environment:-
      Android version: 9.0

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-121221
          # Subject Branch Project Status CR V

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              alrizwan Alber Rizwan
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes