

Public Member Functions | |
| PipeImport () | |
| virtual | ~PipeImport () |
| bool | Open (char *input) |
| int | GetChannels () |
| int | GetFrequency () |
| int | GetBytesPerSample () |
| long | GetNumberOfSamples () |
| bool | Seek (off_t offset) |
| bool | Get (int16_t *data, int length) |
| bool | Close () |
Private Attributes | |
| RWPipe | m_pipe |
| string | m_file |
| int16_t | m_buffer [4 *DV_AUDIO_MAX_SAMPLES] |
| char * | m_command |
|
|
Definition at line 285 of file kino_av_pipe.cc. 00286 : m_command( 0 ) 00287 { 00288 }
|
|
|
Definition at line 289 of file kino_av_pipe.cc. References m_command, m_pipe, and RWPipe::stop().
|
|
|
Implements KinoAudioInput. Definition at line 355 of file kino_av_pipe.cc. References m_pipe, and RWPipe::stop().
|
|
||||||||||||
|
Implements KinoAudioInput. Definition at line 351 of file kino_av_pipe.cc. References m_pipe, and RWPipe::readData().
|
|
|
Implements KinoAudioInput. Definition at line 339 of file kino_av_pipe.cc. 00340 {
00341 return 2;
00342 }
|
|
|
Implements KinoAudioInput. Definition at line 331 of file kino_av_pipe.cc. 00332 {
00333 return 2;
00334 }
|
|
|
Implements KinoAudioInput. Definition at line 335 of file kino_av_pipe.cc. 00336 {
00337 return 44100;
00338 }
|
|
|
Implements KinoAudioInput. Definition at line 343 of file kino_av_pipe.cc. 00344 {
00345 return -1;
00346 }
|
|
|
Implements KinoAudioInput. Definition at line 294 of file kino_av_pipe.cc. References m_command, m_pipe, RWPipe::readData(), StringUtils::replaceAll(), RWPipe::run(), and RWPipe::stop(). 00295 {
00296 bool result = false;
00297 char *kinoHome = getenv("KINO_HOME");
00298 string homeFile, script;
00299 int testHomeFile = 0;
00300
00301 // Allow a script in home directory to override
00302 if ( kinoHome )
00303 homeFile = string( kinoHome ) + string( "/import/audio.sh" );
00304 else
00305 homeFile = string( getenv( "HOME" ) ) + string( "/kino/import/audio.sh" );
00306 testHomeFile = open( homeFile.c_str(), O_RDONLY );
00307 if ( testHomeFile > -1 )
00308 {
00309 close( testHomeFile );
00310 script = homeFile;
00311 }
00312 else
00313 {
00314 script = string( DATADIR "/kino/scripts/import/audio.sh" );
00315 }
00316
00317 delete m_command;
00318 string inputFilename = StringUtils::replaceAll( input, "\"", "\\\"" );
00319 m_command = g_strdup_printf( "%s \"%s\"", script.c_str(), inputFilename.c_str() );
00320 m_pipe.stop();
00321 if ( m_pipe.run( m_command ) )
00322 {
00323 char temp[ 10 ];
00324 result = ( m_pipe.readData( temp, 10 ) == 10 );
00325 m_pipe.stop();
00326 if ( result )
00327 return m_pipe.run( m_command );
00328 }
00329 return result;
00330 }
|
|
|
Implements KinoAudioInput. Definition at line 347 of file kino_av_pipe.cc. 00348 {
00349 return false;
00350 }
|
|
|
Definition at line 282 of file kino_av_pipe.cc. |
|
|
Definition at line 283 of file kino_av_pipe.cc. Referenced by Open(), and ~PipeImport(). |
|
|
Definition at line 281 of file kino_av_pipe.cc. |
|
|
Definition at line 280 of file kino_av_pipe.cc. Referenced by Close(), Get(), Open(), and ~PipeImport(). |
1.4.2