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

A JPEG movie file consists of a header followed by a sequence of JPEG-compressed images followed by one or more sound tracks. It responds to a subset of the protocol for MPEGFile so that a JPEG movie can be played by MPEGDisplayMorph as if it were an MPEG movie.

instance methods
  audio
  audioPlayerForChannel:
hasAudio

  file ops
  closeFile
fileHandle
fileName
openFileNamed:

  initialization
  initialize

  private
  bytesForFrame:
readHeader
testPlay

  video
  hasVideo
videoDropFrames:stream:
videoFrameHeight:
videoFrameRate:
videoFrameWidth:
videoFrames:
videoGetFrame:
videoReadFrameInto:stream:
videoSetFrame:stream:

class methods
  movie conversion
  convertMPEGFileNamed:toJPEGMovieNamed:quality:
convertSqueakMovieNamed:toJPEGMovieNamed:quality:

  movie creation-private
  updateFrameOffsets:on:
updateSoundtrackOffsets:frameOffsets:on:
writeFrame:on:quality:displayFlag:
writeFramesFrom:on:quality:
writeHeaderExtent:frameRate:frameCount:soundtrackCount:on:
writeSoundTracksFrom:on:

  testing
  isJPEGMovieFile:

instance methods
  audio top  
 

audioPlayerForChannel:

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


 

hasAudio

Answer true if this movie has at least one sound track.


  file ops top  
 

closeFile

Close my file stream.


 

fileHandle

Answer my file, or nil if the file is not open.


 

fileName

Answer the name of my file.


 

openFileNamed:

Open the JPEG movie file with the given name.


  initialization top  
 

initialize


  private top  
 

bytesForFrame:

Answer a ByteArray containing the encoded bytes for the frame with the given index. Answer nil if the index is out of range or if my file is not open.


 

readHeader

Read a JPEG movie header file.


 

testPlay

Performance benchmark. Decompress and display all my frames. Answer the frame rate achieved in frames/second. No sound is played.


  video top  
 

hasVideo

Answer true if I have one or more frames.


 

videoDropFrames:stream:

Advance the index of the current frame by the given number of frames.


 

videoFrameHeight:

Answer the height of this movie.


 

videoFrameRate:

Answer the frame rate of this movie.


 

videoFrameWidth:

Answer the width of this movie.


 

videoFrames:

Answer the number of video frames in this movie.


 

videoGetFrame:

Answer the index of the current frame, or zero if the movie has no frames.


 

videoReadFrameInto:stream:

Read the next frame into the given 16-bit or 32-bit Form.


 

videoSetFrame:stream:

Set the index of the current frame.


class methods
  movie conversion top  
 

convertMPEGFileNamed:toJPEGMovieNamed:quality:

Convert the MPEG movie with the given file name into a JPEG movie with the given file name.


 

convertSqueakMovieNamed:toJPEGMovieNamed:quality:

Convert the Squeak movie with the given file name into a JPEG movie with the given file name.


  movie creation-private top  
 

updateFrameOffsets:on:

Update the JPEG movie file header on the given stream with the given collection of frame offsets.


 

updateSoundtrackOffsets:frameOffsets:on:

Update the JPEG movie file header on the given stream with the given sequence of sound track offsets.


 

writeFrame:on:quality:displayFlag:

Compress and the given Form on the given stream and answer its offset. If displayFlag is true, show the result of JPEG compression on the display.


 

writeFramesFrom:on:quality:

Write the frames of the given MPEG movie on the given stream at the given JPEG quality level. Answer a collection of frame offsets. The size of this collection is one larger than the number of frames; it's final entry is the stream position just after the final frame. The byte count for any frame can thus be computed as the difference between two adjacent offsets.


 

writeHeaderExtent:frameRate:frameCount:soundtrackCount:on:

Write a header on the given stream for a JPEG movie file with the given specifications. Leave the stream positioned at the start of the first movie frame.


 

writeSoundTracksFrom:on:

Convert and write the sound tracks from the given MPEG file to given stream. Answer a collection of sound track offsets.


  testing top  
 

isJPEGMovieFile:

Answer true if the file with the given name appears to be a JPEG movie file.