Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-4541

MediaFile.getFormatData throws a MediaPlayer IOException but returns callback success for a video

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.9.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Galaxy GT-I9000
      Gingerbread 2.3.6

      Description

      Here is the initial MediaFile success callback
      "S01 Capture1970865120 [

      {"lastModifiedDate":1375937605000,"fullPath":"file:\/\/\/mnt\/sdcard\/DCIM\/Camera\/video-2013-08-08-14-53-17.mp4","type":"video\/mp4","size":1824506,"name":"video-2013-08-08-14-53-17.mp4"}

      ]"

      Then try to get the format information about the media file using
      mediaFile.getFormatData(getFormatDataWin, getFormatDataError);

      In Capture.java getAudioVideoData an exception is thrown by mediaplayer.prepare()
      java.io.IOException: Prepare failed.: status=0xFFFFFFFC
      The error is logged but ignored.
      "Error: loading video file"

      The Capture.java execute method calls success on the callback context.
      Here is the getFormatData success callback message
      "S01 Capture1970865121

      {"codecs":"","bitrate":0,"duration":0,"height":0,"width":0}

      "

      Error callback is never returned for action "getFormatData".

      Also what happens if another exception which is not caught is thrown? e.g. IllegalStateException
      It appears that no callback would be made in this case.

        Attachments

          Activity

            People

            • Assignee:
              bowserj Joey Robert Bowser
              Reporter:
              amfowler Angela Fowler
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: