Squeak Class Documentation category index | class index  
 
MPEGFile
  category: MPEG3-Kernel
  superclass: Object
  subclasses:

* An interface to LibMPEG3
* Author: Adam Williams <broadcast@earthling.net>
* Page: heroine.linuxbox.com
*
* Changed for Squeak to work with Squeak and to work on the Macintosh
* Sept 2000, by John M McIntosh johnmci@smalltalkconsulting.com
* The smalltalk code and the C code it produces is released under the
* Squeak licence. The libmpeg3 C code is co-licenced under either the Squeak licence or
* the GNU LGPL

instance methods
  access
  endianness
fileHandle
fileName
getPercentage
getTOC:doStreams:
getTimeCode
seekPercentage:
setMMX:

  audio
  audioChannels:
audioGetSample:
audioPlayerForChannel:
audioReReadBuffer:stream:channel:
audioReReadBuffer:stream:channel:samples:
audioReadBuffer:stream:channel:
audioReadBuffer:stream:channel:samples:
audioSampleRate:
audioSamples:
audioSetSample:stream:
endOfAudio:
hasAudio
totalAudioStreams

  file ops
  finalize

  initialize-release
  closeFile
initialize
openFile:

  primitives
  primAudioChannels:stream:
primAudioReReadBuffer:buffer:channel:samples:stream:
primAudioReadBuffer:buffer:channel:samples:stream:
primAudioSamples:stream:
primDropFrame:frame:stream:
primEndOfAudio:stream:
primEndOfVideo:stream:
primFileClose:
primFileOpen:
primFrameRate:stream:
primGenerateToc:useSearch:doStreams:buffer:
primGetFrame:stream:
primGetPercentage:
primGetSample:stream:
primGetTime:
primHasAudio:
primHasVideo:
primPreviousFrame:stream:
primSampleRate:stream:
primSeekPercentage:percentage:
primSetCPUs:number:
primSetFrame:frame:stream:
primSetMMX:useMMX:
primSetSample:sample:stream:
primTotalAudioStreams:
primTotalVideoStreams:
primVideoFrames:stream:
primVideoHeight:stream:
primVideoReadNextFrameFor:into:x:y:width:height:outWidth:outHeight:colorModel:stream:bytesPerRow:
primVideoWidth:stream:

  private
  register
unregister

  video
  endOfVideo:
hasVideo
totalVideoStreams
videoDropFrames:stream:
videoFrameHeight:
videoFrameRate:
videoFrameWidth:
videoFrames:
videoGetFrame:
videoPreviousFrame:
videoReadFrameInto:stream:
videoReadNextFrameInto:x:y:width:height:outWidth:outHeight:colorModel:stream:bytesPerRow:
videoSetCPUs:
videoSetFrame:stream:

class methods
  instance creation
  openFile:

  primitives
  primFileValidMPEG:

  registry
  register:
registry
unregister:

  testing
  isFileValidMPEG:

instance methods
  access top  
 

endianness


 

fileHandle


 

fileName


 

getPercentage

Return current location by percentage, 0.0-1.0


 

getTOC:doStreams:


 

getTimeCode

Return time code, (float)


 

seekPercentage:


 

setMMX:

true is set, false is off. May not be supported


  audio top  
 

audioChannels:

Returns -1 if error, otherwise returns audioChannels for stream aStream


 

audioGetSample:

Returns number of current sample, or -1 if error


 

audioPlayerForChannel:

Answer a streaming sound for playing the audio channel with the given index.


 

audioReReadBuffer:stream:channel:

Used to read other channels after first ReadBuffer
Returns -1 if error, otherwise 0


 

audioReReadBuffer:stream:channel:samples:

Used to read other channels after first ReadBuffer
Returns -1 if error, otherwise 0
Note this call requires passing in the samples to read, ensure you get the number right


 

audioReadBuffer:stream:channel:

Returns -1 if error, otherwise 0


 

audioReadBuffer:stream:channel:samples:

Returns -1 if error, otherwise 0
Note this call requires passing in the samples to read, ensure you get the number right


 

audioSampleRate:

Returns sample rate, or -1 if error


 

audioSamples:

Returns -1 if error,
otherwise returns audioSamples for stream aStream


 

audioSetSample:stream:

Set number of targeted sample, returns 0 if ok, -1 if failure


 

endOfAudio:

Returns true if end of Audio


 

hasAudio

Returns true if file has audio


 

totalAudioStreams

Returns total number of audio streams


  file ops top  
 

finalize

Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.


  initialize-release top  
 

closeFile


 

initialize


 

openFile:


  primitives top  
 

primAudioChannels:stream:


 

primAudioReReadBuffer:buffer:channel:samples:stream:


 

primAudioReadBuffer:buffer:channel:samples:stream:


 

primAudioSamples:stream:


 

primDropFrame:frame:stream:


 

primEndOfAudio:stream:


 

primEndOfVideo:stream:


 

primFileClose:

Close the file


 

primFileOpen:

Open the file


 

primFrameRate:stream:


 

primGenerateToc:useSearch:doStreams:buffer:


 

primGetFrame:stream:


 

primGetPercentage:


 

primGetSample:stream:


 

primGetTime:


 

primHasAudio:


 

primHasVideo:


 

primPreviousFrame:stream:


 

primSampleRate:stream:


 

primSeekPercentage:percentage:


 

primSetCPUs:number:

Not support on the macintosh below OS X


 

primSetFrame:frame:stream:


 

primSetMMX:useMMX:


 

primSetSample:sample:stream:


 

primTotalAudioStreams:


 

primTotalVideoStreams:


 

primVideoFrames:stream:


 

primVideoHeight:stream:


 

primVideoReadNextFrameFor:into:x:y:width:height:outWidth:outHeight:colorModel:stream:bytesPerRow:


 

primVideoWidth:stream:


  private top  
 

register


 

unregister


  video top  
 

endOfVideo:

Returns true if end of video


 

hasVideo

Returns true if file has video


 

totalVideoStreams

Returns total number of video streams


 

videoDropFrames:stream:

Returns -1 if setFrame failed


 

videoFrameHeight:

Returns video frame height, -1 if error


 

videoFrameRate:

Returns video frame rate (float), -1 if error


 

videoFrameWidth:

Returns video frame width, -1 if error


 

videoFrames:

Total number of frames


 

videoGetFrame:

Returns frame number, or -1 if error


 

videoPreviousFrame:

Returns 0 if ok


 

videoReadFrameInto:stream:

Read the next video frame from the given stream into the given 16- or 32-bit Form. The movie frame will be scaled to fit the Form if necessary.


 

videoReadNextFrameInto:x:y:width:height:outWidth:outHeight:colorModel:stream:bytesPerRow:

return nonZero if failure


 

videoSetCPUs:


 

videoSetFrame:stream:

Returns -1 if setFrame failed


class methods
  instance creation top  
 

openFile:


  primitives top  
 

primFileValidMPEG:

Check to see if the file is valid


  registry top  
 

register:


 

registry


 

unregister:


  testing top  
 

isFileValidMPEG: