Chapter 2 — Using the Filter Manager API
27
Events
3. The
End()
call requests that the encode terminate cleanly after completely
processing the current frame in the Mux component. In other words, the
encoding process will terminate only after the frame currently in the Mux
component 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 of
the error codes listed in Appendix C.
long End() –
This is an alternate and preferred method of stopping the encode. It
performs a “clean” stop, guaranteeing that the frame currently being processed
by the Mux component will be flushed through the storage and playback mod-
ules before the encode halts. See the discussion of stopping strategies, directly
above. 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 one
of two ways to cause the encode to pause. A series of pre-programmed pauses
can be set up prior to the start of the encode by defining more than one encode
segment in the VTR Registry table. You should
never
pause an encode if the
multi-stream encode option is turned on. The
Pause()
method returns a 0 if it is
successful, or an error code if it is not (see Appendix C),
long Resume().
Causes the encoding process to resume immediately after a
pause. If the pause was scheduled in advance by defining more than one
encode 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-time
playback is enabled when the encode resumes, the decoder will first play back
any buffered data from the segment encoded prior to the pause. You should
never
pause or resume an encode if the multi-stream encode option is turned
on. The
Pause()
method returns a 0 if it is successful, or an error code listed in
Appendix C.
long Reset().
Causes all of the encoder’s COM components to reset themselves in
preparation for the next encode. The Reset method should be called prior to
each Cue call. The
Reset()
method returns a 0 if it is successful, or an error
code listed in Appendix C if not.
Events
The Filter Manager uses the COM event mechanism to send messages to its client
through the outgoing interface. An
event
is a callback issued by Filter Manager in
response to a noteworthy occurrence or condition. Any client of Filter Manager