Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

kino_extra.h

Go to the documentation of this file.
00001 /*
00002  * kino_extra.h -- FX Header File for Additional Plug-in functionality
00003  * Copyright (C) 2002 Charles Yates <charles.yates@pandora.be>
00004  * Copyright (C) 2002-2007 Dan Dennedy <dan@dennedy.org>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef _KINO_EXTRA_H_
00022 #define _KINO_EXTRA_H_
00023 
00024 #include <stdint.h>
00025 #include <gtk/gtk.h>
00026 
00027 // This is mandatory for plug-ins to be able to access the functionality here
00028 // and is mandatory throughout (in fact, the define should be dropped)
00029 #ifndef WITH_LIBDV
00030 #define WITH_LIBDV
00031 #endif
00032 
00033 // Forward declaration to playlist
00034 class PlayList;
00035 
00036 // Provide a means to obtain the current playlist
00037 extern PlayList &GetCurrentPlayList( );
00038 
00039 // Provide access to a selection of frames
00040 class SelectedFrames
00041 {
00042     public:
00043         virtual ~SelectedFrames( ) { }
00044         virtual int GetNumInputFrames( ) = 0;
00045         virtual int GetNumOutputFrames( ) = 0;
00046         virtual double GetPosition( int index ) = 0;
00047         virtual double GetFrameDelta( ) = 0;
00048         virtual bool IsEffectReversed( ) = 0;
00049         virtual double GetRealStart( ) = 0;
00050         virtual double GetRealEnd( ) = 0;
00051         virtual void GetImageA( double position, uint8_t *image, int width = 0, int height = 0 ) = 0;
00052         virtual void GetImageB( double position, uint8_t *image, int width = 0, int height = 0 ) = 0;
00053         virtual void GetAudioA( double position, int16_t **audio, short int &channels, int &frequency, int &samples ) = 0;
00054         virtual void GetAudioB( double position, int16_t **audio, short int &channels, int &frequency, int &samples ) = 0;
00055         virtual void Repaint( ) = 0;
00056         virtual bool IsRepainting() = 0;
00057         virtual int GetIndex( double position ) = 0;
00058         virtual bool IsPreviewing() = 0;
00059 };
00060 
00061 // Get the selected frames for FX
00062 extern SelectedFrames &GetSelectedFramesForFX( );
00063 extern GtkWindow* GetKinoWidgetWindow( );
00064 extern void Repaint( );
00065 
00066 class SelectionNotification
00067 {
00068     public:
00069         virtual ~SelectionNotification( ) { }
00070         virtual void OnSelectionChange( ) = 0;
00071 };
00072 
00076 class KeyFrameControllerClient
00077 {
00078     public:
00079         virtual ~KeyFrameControllerClient() { }
00080         // Called when the key button is changed to define/undefine a key frame
00081         virtual void OnControllerKeyChanged( double position, bool editable ) { } 
00082         // Called when the previous button is pressed
00083         virtual void OnControllerPrevKey( double position ) { }
00084         // Called when the next button is pressed
00085         virtual void OnControllerNextKey( double position ) { }
00086 };
00087 
00092 enum frame_type { FRAME = 0, KEY = 1, LOCKED_KEY = 2 };
00093 
00103 class KeyFrameController
00104 {
00105     public:
00106         virtual ~KeyFrameController() { }
00107         // Set the current feedback 
00108         virtual void ShowCurrentStatus( double position, frame_type type, bool hasPrev, bool hasNext ) = 0;
00109         // Get the current position
00110         virtual double GetCurrentPosition( ) = 0;
00111 };
00112 
00116 extern KeyFrameController *GetKeyFrameController( KeyFrameControllerClient *client );
00117 
00118 
00119 #endif

Generated on Sun Mar 11 22:11:46 2007 for Kino by  doxygen 1.4.2