Results 1 to 5 of 5

Thread: [2005] Any likely difference between these two time/performance wise?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    [2005] Any likely difference between these two time/performance wise?

    I'm in the middle of writing an app to control an eye-tracker using the SDK from the manufacturer. I have a form with a windows media player control on it.

    What needs to happen is that there's a countdown (displayed on a label) as to when the video will play. On zero the video should start playing the avi file and the eye tracker should begin collecting gaze data.

    My questions are, which of these would be better to use (or are they both the same performance wise) and secondly, is the slight pause as the video file loads in media player avoidable so that it starts right on zero?

    VB Code:
    1. Private Sub MediaPlayer_StateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) _
    2.     Handles mPlayer.PlayStateChange
    3.  
    4.         If mPlayer.playState = WMPLib.WMPPlayState.wmppsPlaying Then
    5.             'Begin eye tracking here???
    6.  
    7.         End If
    8.  
    9.     End Sub

    Or:

    VB Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.  
    3.         intCount -= 1
    4.  
    5.         If Not intCount = 0 Then
    6.             Me.lblCount.Text = "Showing in: " & intCount.ToString
    7.         Else
    8.             Timer1.Enabled = False
    9.             Me.lblCount.Visible = False
    10.             'Show video:
    11.             mPlayer.URL = Application.StartupPath & "\Cases\JEPIFWEJ_LKL003.avi"
    12.             'Or begin eye tracking here ???
    13.  
    14.         End If
    15.  
    16.     End Sub
    Last edited by stimbo; Jan 24th, 2007 at 09:49 AM.
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width