[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(rlet ((m (:pointer (:pointer :movierecord))))...)



I have two questions.

FIRST:

I wrote a simple MCL code to play movies.

_NEWMOVIEFROMFILE requires :pointer to :pointer to :movierecord as
it's first argument.

  _NEWMOVIEFROMFILE (m (:POINTER (:POINTER :MOVIERECORD))) 
  (resrefnum :SIGNED-INTEGER) (resid (:POINTER :SIGNED-INTEGER)) 
  (resname (:STRING 255)) (newmovieflags :SIGNED-INTEGER) 
  (datarefwaschanged (:POINTER :BOOLEAN))
  [trap ]
  Returns:  :SIGNED-INTEGER

rlet seems to accept such expression as follow, but it is not
documented in MCL2.0 Reference. 

(rlet ((m (:pointer (:pointer :movierecord)))...)
  ...
  (setq err (#_NewMovieFromFile
             m
             resrefnum
             resID
             (%null-ptr)
             #$newMovieActive
             was-changed))
  ...
  (setq movie (%get-ptr m))
  ...
  )

My code is working now, but is this right or not recommended? 

And where the :movierecord allocated? On the stack or else somewhere?
Should I (#_disposemovie movie)?

SECOND:

I used ccl::gestalt (It is not documented too) to determine whether
the movie toolbox is installed.

  (if (/= 0 (ccl::gestalt #$gestaltQuickTime))
      (#_EnterMovies)
      #$movieToolboxUnitialized)

Is this right or not recommended?

---
Best Regars, Masaya UEDA
Computer Systems Lab., SHARP Co.
2613-1, Ichinomoto, Tenri, Nara 632, JAPAN