# AP4_Processor Class Reference

`#include <Ap4Processor.h>`

Inheritance diagram for AP4_Processor:

List of all members.

## Public Member Functions
virtual | ~AP4_Processor ()
| Default destructor.
AP4_Result | Process (AP4_ByteStream &input, AP4_ByteStream &output, ProgressListener *listener=NULL, AP4_AtomFactory &atom_factory=AP4_DefaultAtomFactory::Instance)
| Process the input stream into an output stream.
virtual AP4_Result | Initialize (AP4_AtomParent &top_level, AP4_ByteStream &stream, ProgressListener *listener=NULL)
| This method can be overridden by concrete subclasses.
virtual AP4_Result | Finalize (AP4_AtomParent &top_level, ProgressListener *listener=NULL)
| This method can be overridden by concrete subclasses.
virtual TrackHandler * | CreateTrackHandler (AP4_TrakAtom *trak)
| This method can be overridden by concrete subclasses.
## Classes
class | ProgressListener
| Abstract class that defines the interface implemented by progress listeners. More...
class | TrackHandler
| Abstract class that defines the interface implemented by concrete track handlers. More...

## Detailed Description

Definition at line 52 of file Ap4Processor.h.

## Constructor & Destructor Documentation

virtual AP4_Processor::~AP4_Processor | ( |  | ) | `[inline, virtual]`

Default destructor.

Definition at line 115 of file Ap4Processor.h.

## Member Function Documentation

AP4_Result AP4_Processor::Process | ( | AP4_ByteStream & | input,
|  | AP4_ByteStream & | output,
|  | ProgressListener * | listener = `NULL`,
|  | AP4_AtomFactory & | atom_factory = `AP4_DefaultAtomFactory::Instance` |
| ) |  |  |

Process the input stream into an output stream.

Parameters:

  | input | Reference to the file to process.
  | output | Output stream to which the processed input will be written.
  | listener | Pointer to a listener, or NULL. The listener will be called one or more times before this method returns, with progress information.

virtual AP4_Result AP4_Processor::Initialize | ( | AP4_AtomParent & | top_level,
|  | AP4_ByteStream & | stream,
|  | ProgressListener * | listener = `NULL` |
| ) |  |  | `[virtual]`

This method can be overridden by concrete subclasses.

It is called just after the input stream has been parsed into an atom tree, before the processing of the tracks.

Parameters:

  | top_level | Container atom containing all the atoms parsed from the input stream. Note that this atom does not actually exist in the file; it is a synthetised container created for the purpose of holding together all the input's top-level atoms.

Reimplemented in AP4_MarlinDecryptingProcessor, AP4_OmaDcfDecryptingProcessor, and AP4_OmaDcfEncryptingProcessor.

virtual AP4_Result AP4_Processor::Finalize | ( | AP4_AtomParent & | top_level,
|  | ProgressListener * | listener = `NULL` |
| ) |  |  | `[virtual]`

This method can be overridden by concrete subclasses.

It is called just after the tracks have been processed.

virtual TrackHandler* AP4_Processor::CreateTrackHandler | ( | AP4_TrakAtom * | trak | ) | `[virtual]`

This method can be overridden by concrete subclasses.

It is called once for each track in the input file.

Parameters:

  | track | Pointer to the track for which a handler should be created.

Returns:
  A pointer to a track handler, or NULL if not handler needs to be created for that track.

Reimplemented in AP4_IsmaEncryptingProcessor, AP4_MarlinDecryptingProcessor, AP4_OmaDcfEncryptingProcessor, and AP4_StandardDecryptingProcessor.

The documentation for this class was generated from the following file:

- Ap4Processor.h