Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

piave_base.hh File Reference

contains the declarations of all the very basic PIAVE classes, elementary structures, and constants. More...

#include <unistd.h>
#include <stdint.h>
#include <errno.h>
#include <iostream>
#include <string>

Go to the source code of this file.

Namespaces

namespace  PIAVE


Detailed Description

contains the declarations of all the very basic PIAVE classes, elementary structures, and constants.

It also contains ppmacros used throughout PIAVE. It depends on no other piave files.

Here a short idea of how I do things in piave:

I store the render setup in a single tree. This tree is made up of "MediaElements". There are two Kinds of MediaElements: Nodes and Leaves. All kinds of audio and video data is a Leave. E.g. a DV file , or a JPEG image, or an audiofile. There are two kind of nodes: unary and binary nodes. A unary node consists of an UnaryOperator and a single MediaElement. A BinaryNode has a BinaryOp and two MediaElements. You can already guess that a UnaryOp can take a Frame and modify it, eg. deinterlace, chroma adjust, invert, draw a ColorFrame around, etc. and a binary node can take two frames and do somehting like transitions or picture in picture or whatever. You can easily verify, that you can build _any_ kind of structure with this scheme. No limit of "number of video tracks" or other stupid things. You can also stack many BinaryOps on top of each other and have many source Frames for a single output frame. The only place where this scheme reaches a limit is if you e.g. want to project three frames on the three dimensinal picture of a dice. Then you need all three source Frames in a single Operator. Of course it is a non-issue to implement a TrinaryOp (or N-Op or whatever). Every MediaElement has a local coordinate system (local time) which starts at 0 and a starting time relative to its parents local time. This way, you can rearrange nodes without bothering where in te tree they end up. This is very similar to local coordinates in Qt I guess? The length of a node is defined as the union of the length of the children.

time 0________________________100_______________________200_____ _ _ _

node1 __________________________________________________________ _ _ _

Clear? Questions? ;-)

Now PropertyPath: Every Operator needs a set of parameters which define its behaviour. There are static operators which have a single set of parameters and DynamicOperators. A dynamic operator owns a ProprtyPath, which is a vector of Properties. Example: binOp1 from above. In it's parents localtime it ranges from let's say 95 to 108. His own local time is from 0 to 13. The PropertyPath has at least one node (that would qualify as a static op). If it has two nodes, the first node must be at 0 and the second at 13. Let's say binOp1 is AlphaBlendOp, i.e. the operator which can blend clip1 and clip2 with a certain alpha value, from 0 (opaque) to 1 (transparent). If you use a propery path with two propery-nodes, the first would have alpha=1 the second alpha=0. Then all intermediate values will be interpolated (linear only at the moment). This system is _very_ flexible. You can build all kinds of effects with a minimal set of building blocks.

Example: long sequence (clip1) , blend in a second scene (clip1) for a short time in the upper right. Make node (node1) with AlphaBlendOp. make four property nodes time=0;alpha=1 time=10;alpha=0.2 time=20;alpha=0.2 time=30;alpha=1 . Make second node with clip1 and node1 and a PicInPicOp. Your Done. The small picture will fade in stay almost opaque for 10 Frames and fade out again.

This can be used to animate every kind of property an Operator might have, coordinates of the PicInPic, Color of a Frame, size of a scaling, speed of motion, direction e.g. kooridnates of FlyIn or ShiftIn transitions...

In the timeline these property-nodes must be visible. You must be able to insert new nodes, delete old nodes and popup a window to edit the values for a node.


Define Documentation

#define ABORT_IF C,
 
 

Value:

{ if ( C ) { std::cerr << __FILE__ << ":" << __LINE__ \
                      << " ERROR: (" << #C <<"): "<< S << std::endl; abort(); }}

#define INFO  
 

Value:

{ if ( PIAVE::Global::verbose && ! PIAVE::Global::quiet  ) \
                      std::cout << __FILE__ << ":" << __LINE__ << " INFO: " << S << std::endl; }

#define INFO_IF C,
 
 

Value:

{ if ( PIAVE::Global::verbose && ! PIAVE::Global::quiet  ) \
                      if ( C ) { std::cout << __FILE__ << ":" << __LINE__ \
                      << " INFO: (" << #C <<"): " << S << std::endl; }}

#define WARN  
 

Value:

{ if ( ! PIAVE::Global::quiet ) \
                      std::cerr << __FILE__ << ":" << __LINE__ << " WARNING: " << S << std::endl; }

#define WARN_IF C,
 
 

Value:

{ if ( ! PIAVE::Global::quiet ) \
                      if ( C ) { std::cerr << __FILE__ << ":" << __LINE__ \
                      << " WARNING: (" << #C <<"): " << S << std::endl; }}


Generated on Tue Oct 14 20:45:37 2003 for piave by doxygen1.2.18