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

DVPipeTool Class Reference

Inheritance diagram for DVPipeTool:

Inheritance graph
[legend]
Collaboration diagram for DVPipeTool:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DVPipeTool (string command)
void load (string command)
bool execute (const string &normalisation, double length, int profile, const string &file, const string &docfile, int pass, const string &aspect)
bool output (Frame &frame)
void close ()

Static Public Member Functions

static bool compare (const DVPipeTool *x, const DVPipeTool *y)

Public Attributes

string m_command
string m_description
bool m_active
string m_flags
vector< string > m_profiles

Constructor & Destructor Documentation

DVPipeTool::DVPipeTool string  command  )  [inline]
 

Definition at line 57 of file page_export_pipe.cc.

References load().

00057                                  :
00058             m_command( command ),
00059             m_description( "" ),
00060             m_active( false )
00061     {
00062         load( command );
00063     }


Member Function Documentation

void DVPipeTool::close  )  [inline]
 

Definition at line 121 of file page_export_pipe.cc.

References RWPipe::stop().

Referenced by ExportPipe::doExport().

00122     {
00123         stop( );
00124     }

static bool DVPipeTool::compare const DVPipeTool x,
const DVPipeTool y
[inline, static]
 

Definition at line 126 of file page_export_pipe.cc.

References m_description.

Referenced by ExportPipe::loadTools().

00127     {
00128         return ( x->m_description < y->m_description );
00129     }

bool DVPipeTool::execute const string &  normalisation,
double  length,
int  profile,
const string &  file,
const string &  docfile,
int  pass,
const string &  aspect
[inline]
 

Definition at line 94 of file page_export_pipe.cc.

References m_command, StringUtils::replaceAll(), and RWPipe::run().

Referenced by ExportPipe::doExport().

00096     {
00097         gchar *command;
00098         bool result;
00099 
00100         // Construct the command
00101         command = g_strdup_printf( "\"%s\" %s %f %d \"%s\" \"%s\" %d \"%s\"", m_command.c_str( ),
00102                  normalisation.c_str( ),
00103                  length,
00104                  profile,
00105                  StringUtils::replaceAll( file, "\"", "\\\"" ).c_str( ),
00106                  docfile.c_str(),
00107                  pass,
00108                  aspect.c_str() );
00109 
00110         result = run( command );
00111         g_free( command );
00112         return result;
00113     }

void DVPipeTool::load string  command  )  [inline]
 

Definition at line 65 of file page_export_pipe.cc.

References m_active, m_description, m_flags, m_profiles, RWPipe::readLine(), RWPipe::run(), and RWPipe::stop().

Referenced by DVPipeTool().

00066     {
00067         if ( run( command ) )
00068         {
00069             char temp[ 10240 ];
00070             while ( readLine( temp, 10240 ) > 0 )
00071             {
00072                 char * ptr = strchr( temp, ':' );
00073                 if ( ptr != NULL )
00074                 {
00075                     *ptr = '\0';
00076                     ptr += 2;
00077 
00078                     if ( !strcmp( temp, "Title" ) )
00079                         m_description = ptr;
00080                     else if ( !strcmp( temp, "Status" ) )
00081                         m_active = !strcmp( ptr, "Active" );
00082                     else if ( !strcmp( temp, "Flags" ) )
00083                         m_flags = ptr;
00084                     else if ( !strcmp( temp, "Profile" ) )
00085                         m_profiles.push_back( ptr );
00086                     else
00087                         fprintf( stderr, "Unrecognised %s: %s\n", temp, ptr );
00088                 }
00089             }
00090             stop( );
00091         }
00092     }

bool DVPipeTool::output Frame frame  )  [inline]
 

Definition at line 115 of file page_export_pipe.cc.

References Frame::data, Frame::IsPAL(), and RWPipe::writeData().

Referenced by ExportPipe::doExport().

00116     {
00117         int size = frame.IsPAL( ) ? 144000 : 120000;
00118         return writeData( frame.data, size ) == size ;
00119     }


Member Data Documentation

bool DVPipeTool::m_active
 

Definition at line 53 of file page_export_pipe.cc.

Referenced by load(), and ExportPipe::loadTools().

string DVPipeTool::m_command
 

Definition at line 51 of file page_export_pipe.cc.

Referenced by execute().

string DVPipeTool::m_description
 

Definition at line 52 of file page_export_pipe.cc.

Referenced by compare(), and load().

string DVPipeTool::m_flags
 

Definition at line 54 of file page_export_pipe.cc.

Referenced by ExportPipe::doExport(), and load().

vector< string > DVPipeTool::m_profiles
 

Definition at line 55 of file page_export_pipe.cc.

Referenced by load().


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 22:12:48 2007 for Kino by  doxygen 1.4.2