On Mar 14, 2006, at 6:50 PM, Dave Wooldridge wrote:
Even though a movie's Duration can be obtained via an Editable Movie, that only works for writeable movies. When accessing a Read-Only movie (such as
on CD), there's currently no way to get the Duration from the
MoviePlayer.Movie.

While I agree that it might be nice to have this built-in, you can easily find the information yourself *today*. :-)

Here's some code (MachO required for this snippet, but it should work fine on all other QT-able RB platforms)

hth,
Erick

-------------------------------


  dim f as folderitem
  dim m as movie
  Dim i,n as Integer

Declare Function GetMovieDuration Lib "/System/Library/Frameworks/ QuickTime.framework/QuickTime" _
      (movie as integer) as integer

Declare Function GetMovieTimeScale Lib "/System/Library/ Frameworks/QuickTime.framework/QuickTime" _
      (movie as integer) as integer

  f = GetOpenFolderItem("any")
  if f<>nil then
    m = f.openasmovie
    i = GetMovieDuration(m.handle)
    n = GetMovieTimeScale(m.handle)
MsgBox "GetMovieDuration = "+str(i)+" TimeScale units"+chr(13) +"GetMovieTimeScale="+str(n)+chr(13)+"wristwatch time = "+str(i/n)+" sec."
  end if


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to