FrameRateAdjust Class Reference
Adaptor class FrameRateAdjust adjusts the incoming framerate to a predefined outgoing framerate (both expressed by a timeIncrement) so either by-passing frames are dropped (eg. <short description="">. More...
#include <FrameRateAdjust.hpp>
Inheritance diagram for FrameRateAdjust:
Public Member Functions | |
FrameRateAdjust (ESInfo *esi, u32 newTimeIncrement) | |
list< Frame * > | adapt (Frame *frm) |
Accepts as input a frame, and checks if it can adapt the frame, If the frame is modified, a new Frame object is created and inserted into the return list. | |
Adaptor * | clone () |
Create a shallow copy of the Adaptor. | |
void | initialize () |
Initialize internal data structures. | |
list< Frame * > | close () |
Close and destroy an Adaptor. | |
void | setESInfo (ESInfo *esi) |
Sets a reference to an ESInfo object. | |
ESInfo * | getESInfo () |
u32 | getTranscodingCosts () const |
returns adaptation costs (CPU only) | |
Protected Attributes | |
ESInfo * | es |
u32 | timeInc |
u32 | oldTimeInc |
u32 | currentFrameNumber |
u32 | currentTicks |
Detailed Description
Adaptor class FrameRateAdjust adjusts the incoming framerate to a predefined outgoing framerate (both expressed by a timeIncrement) so either by-passing frames are dropped (eg. <short description="">.25fps -> 15fps) or doubly inserted (eg. 15 fps -:> 25fps) with the mpeg4-used ticksPerSecond, the base is always 90000 ticks 30 fps use a timeincrement of 3000 ticks/frame 25 fps use a timeincrement of 3600 ticks/frame 20 fps means 4500 ticks/frame 15 fps means 6000 ticks/frame 10 fps means 9000 ticks/frame
- Author:
- Michael Kropfberger
- Version:
- Id
- FrameRateAdjust.hpp,v 1.4 2006/01/20 15:37:17 mkropfbe Exp
Definition at line 72 of file FrameRateAdjust.hpp.
Member Function Documentation
|
Accepts as input a frame, and checks if it can adapt the frame, If the frame is modified, a new Frame object is created and inserted into the return list. This new frame is returned only, if the size of the payload is larger than zero. If the frame was not modified, it is also inserted into the list. For more complex adaptors, it will happen, that the adaptor caches up one complete GOP and returns the full GOP in network order. A caching adaptor has to create deep-copies for each frames. Never directly modify the payload of the input frm, always create copies!!!
Reimplemented from Adaptor. Definition at line 74 of file FrameRateAdjust.cpp. References Frame::getAU(), and ESInfo::getMediaTimeScale().
|
|
Create a shallow copy of the Adaptor. Creates an Adaptor with the same setup (without copying the current status).
Implements Adaptor. Definition at line 86 of file FrameRateAdjust.hpp.
|
|
Close and destroy an Adaptor. Releases all internally buffered frame objects, and deallocate all allocated memory. The Adaptor must not be used after calling the close method!!!
Reimplemented from Adaptor. Definition at line 90 of file FrameRateAdjust.hpp.
|
|
Initialize internal data structures.
Implements Adaptor. Definition at line 69 of file FrameRateAdjust.cpp.
|
|
Sets a reference to an ESInfo object. Adaptors are allowed to change ESInfo objects. If you don't want that, pass an es->clone() Reimplemented from Adaptor. Definition at line 99 of file FrameRateAdjust.hpp.
|
The documentation for this class was generated from the following files: