Hei All,

i have a problem related to "starting receiver/transmitter threads". I can't 
start a recorder thread(receiver), from my main procedure which lies in an 
other file(main class).

from main.cpp:

int main(int argc, char** argv){
//...

InetHostAddress* iha = filter_input(argv[2]);
AudioRecorder ar("/tmp/output",iha);

//....

// ar.start()    doesn't work have to call 'run'
ar.run();
}

For my test purposes, i set every kind of member in AudioRecorder class to 
publc, but i still 
can't call the AudioRecorder as thread.. Strange.  

Here is the declaration of Audiorecorder (AudioRecorder.h)

#ifndef _AUDIORECORDER_H_
#define _AUDIORECORDER_H_
    
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <ccrtp/rtp.h>
using namespace ost;
using namespace std;
   
#include "globals.h"
    
    
class AudioRecorder: public Thread, public TimerPort
{   
    
    public:
        char* client ;
        int rec_port ;
        InetHostAddress* local_ip ;
        RTPSession* rtp_socket ;
        ofstream* dump_file ;
                
    public:
        AudioRecorder(const char* filename, InetHostAddress* iha) ;
        virtual ~AudioRecorder() ;
        void run() ;
};              
                
                
#endif // _AUDIORECORDER_H_

To me from a point of oop, i create a recorder class which is an extension of 
Thread and start
it.  And that should work. I'd appriciate any hints.

Thanx in advance.

Cheers,









_______________________________________________
Ccrtp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccrtp-devel

Reply via email to