Chapter 2 — Using the Filter Manager API 27Events3. The End() call requests that the encode terminate cleanly after completelyprocessing the current frame in the Mux component. In other words, theencoding process will terminate only after the frame currently in the Muxcomponent is muxed, then flushed through the playback and storage compo-nents. The Stop() method returns 0 if it is successful. If not, it returns one ofthe error codes listed in Appendix C.long End() – This is an alternate and preferred method of stopping the encode. Itperforms a “clean” stop, guaranteeing that the frame currently being processedby the Mux component will be flushed through the storage and playback mod-ules before the encode halts. See the discussion of stopping strategies, directlyabove. The End() method returns a 0 if it is successful. It returns an error code(listed in Appendix C) if it encounters an error.long Pause(). Causes the encoding process to pause immediately. This is just oneof two ways to cause the encode to pause. A series of pre-programmed pausescan be set up prior to the start of the encode by defining more than one encodesegment in the VTR Registry table. You should never pause an encode if themulti-stream encode option is turned on. The Pause() method returns a 0 if it issuccessful, or an error code if it is not (see Appendix C),long Resume(). Causes the encoding process to resume immediately after apause. If the pause was scheduled in advance by defining more than oneencode segment in the VTR Registry table, the encode will resume automati-cally after the tape has rolled to the requested mark-in for the next segment;there is no need in that case to call the Resume method. Note that if real-timeplayback is enabled when the encode resumes, the decoder will first play backany buffered data from the segment encoded prior to the pause. You shouldnever pause or resume an encode if the multi-stream encode option is turnedon. The Pause() method returns a 0 if it is successful, or an error code listed inAppendix C.long Reset(). Causes all of the encoder’s COM components to reset themselves inpreparation for the next encode. The Reset method should be called prior toeach Cue call. The Reset() method returns a 0 if it is successful, or an errorcode listed in Appendix C if not.EventsThe Filter Manager uses the COM event mechanism to send messages to its clientthrough the outgoing interface. An event is a callback issued by Filter Manager inresponse to a noteworthy occurrence or condition. Any client of Filter Manager