Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-17989

VideoDisplay's playheadUpdateInterval does not work as mentioned

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.3 (Release)
    • None
    • mx: Video
    • None
    • Affected OS(s): Windows
      Affected OS(s):
      Language Found: English

    Description

      This issue is very strange!
      prepare:
      1, one FLV file, 25fps. and get its totalTime info, here is 19s.
      2, set Flex app file frameRate to 25.
      3, use VideoDisplay to play flv.
      4, set playheadUpdateInterval to some value.
      5. use playheadUpdate event to calculate times!

      codes snippet:
      <mx:VideoDisplay id="vidDis" source="{_source}" playheadUpdateInterval="20" playheadUpdate="vidPlayHeadUpdateHandler(event)"/>
      //
      private var _frames:int = 0
      private function vidPlayHeadUpdateHandler(event:VideoEvent):void{
      _frames++;
      trace(_frames);
      }

      Testing, only check the last _frames' value:

      1, set playheadUpdateInterval="1000"
      Actual Result: 20
      Expected Result: 19. (Okay, maybe some inaccuracy, like Math.round() )

      2, set playheadUpdateInterval="500"
      Actual Result: 39
      Expected Result: 38. (Okay, maybe some inaccuracy, like Math.round() )

      3, set playheadUpdateInterval="250"
      Actual Result: 71
      Expected Result: 57. (the inaccuracy is large)

      4, set playheadUpdateInterval="40"
      Actual Result: 219
      Expected Result: 25fps * 19s = 475. or 19s * 1000 / 40 (if 25 frames per sec, then 40 ms per frame)

      5, set playheadUpdateInterval="20"
      Actual Result: 244
      Expected Result: 475 * 2.

      6, set playheadUpdateInterval="1"
      Actual Result: 265
      Expected Result: 19 * 1000.

      If we allow some inaccuracy, why the Testing No.4, 5 and 6's actual results are so close and far away from expected result?!

      And another testing of playHeadTime:
      If we use trace(vidDis.playHeadTime) in vidPlayHeadUpdateHandler of every testings, the actual results are in a clutter!
      Not the expected results like playheadUpdateInterval / 1000 * (every times of event);
      Especially in Testing No. 4 and 5, the results sometimes could have the same value in 4 continuous cycles of vidPlayHeadUpdateHandler.

      So, how to explain it? the playheadUpdateInterval does NOT work as mentioned in document.
      Why? and how to fix it?

      Thanks!

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            adobejira Adobe JIRA

            Dates

              Created:
              Updated:

              Slack

                Issue deployment