diff --git a/.travis.yml b/.travis.yml index b79c8ede..ace69e0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,42 +13,16 @@ before_script: - make check -j3 > /dev/null - sudo make install >/dev/null - cd .. - #installing libconfig, needed for DHT_bootstrap_daemon - #- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null - #- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null - #- cd libconfig-1.4.9 - #- ./configure > /dev/null - #- make -j3 > /dev/null - #- sudo make install > /dev/null - #- cd .. + #installing yasm, needed for compiling vpx + - sudo apt-get install yasm > /dev/null #installing libopus, needed for audio encoding/decoding - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null - - tar xzvf opus-1.0.3.tar.gz > /dev/null + - tar xzf opus-1.0.3.tar.gz > /dev/null - cd opus-1.0.3 - ./configure > /dev/null - make -j3 > /dev/null - sudo make install > /dev/null - cd .. - #installing libsdl1.2, needed for displaying video frames - #- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null - #- tar -xvzf SDL-1.2.15.tar.gz > /dev/null - #- cd SDL-1.2.15 - #- ./configure > /dev/null - #- make -j3 /dev/null - #- sudo make install > /dev/null - #- cd .. - #installing libopenal, needed for audio capture/playback - #- sudo apt-get install libopenal-dev > /dev/null - #installing yasm, needed for compiling ffmpeg - - sudo apt-get install yasm > /dev/null - #installing ffmpeg, needed for capturing and encoding/decoding video - #- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null - #- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null - #- cd ffmpeg-2.0.2 - #- ./configure > /dev/null - #- make -j3 >/dev/null - #- sudo make install > /dev/null - #- cd .. #installing vpx - git clone http://git.chromium.org/webm/libvpx.git > /dev/null - cd libvpx diff --git a/INSTALL.md b/INSTALL.md index e7902149..a7805018 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -89,7 +89,7 @@ Then clone this repo and generate makefile: git clone git://github.com/irungentoo/ProjectTox-Core.git cd ProjectTox-Core autoreconf -i -./configure --with-dependency-search=`pwd`/../ffmpeg/install +./configure make sudo make install ``` @@ -321,7 +321,11 @@ cd .. You are now ready to compile with phone! - +Note: Don't forget to run core configure like so: +```bash +./configure --with-dependency-search=`pwd`/../ffmpeg/install +``` +before compiling the phone. diff --git a/toxav/msi.c b/toxav/msi.c index 6cc9cf12..fda0dd3e 100644 --- a/toxav/msi.c +++ b/toxav/msi.c @@ -84,7 +84,6 @@ GENERIC_HEADER ( Version ) GENERIC_HEADER ( Request ) GENERIC_HEADER ( Response ) GENERIC_HEADER ( CallType ) -GENERIC_HEADER ( UserAgent ) GENERIC_HEADER ( CallId ) GENERIC_HEADER ( Info ) GENERIC_HEADER ( Reason ) @@ -103,7 +102,6 @@ typedef struct _MSIMessage { MSIHeaderRequest request; MSIHeaderResponse response; MSIHeaderCallType calltype; - MSIHeaderUserAgent useragent; MSIHeaderInfo info; MSIHeaderReason reason; MSIHeaderCallId callid; @@ -128,7 +126,6 @@ static MSICallback callbacks[10] = {0}; #define INFO_FIELD "INFO" #define REASON_FIELD "Reason" #define CALLTYPE_FIELD "Call-type" -#define USERAGENT_FIELD "User-agent" #define CALLID_FIELD "Call-id" #define CRYPTOKEY_FIELD "Crypto-key" #define NONCE_FIELD "Nonce" @@ -277,10 +274,9 @@ int parse_raw_data ( MSIMessage *msg, const uint8_t *data, uint16_t length ) } break; - case 10: { /* User-agent, Crypto-key headers */ - if ON_HEADER ( _it, msg->useragent, USERAGENT_FIELD, 10 ) - else if ON_HEADER ( _it, msg->cryptokey, CRYPTOKEY_FIELD, 10 ) - } + case 10: { /* Crypto-key headers */ + if ON_HEADER ( _it, msg->cryptokey, CRYPTOKEY_FIELD, 10 ) + } break; default: @@ -315,7 +311,6 @@ void free_message ( MSIMessage *msg ) free ( msg->calltype.header_value ); free ( msg->request.header_value ); free ( msg->response.header_value ); - free ( msg->useragent.header_value ); free ( msg->version.header_value ); free ( msg->info.header_value ); free ( msg->cryptokey.header_value ); @@ -484,7 +479,6 @@ uint16_t message_to_string ( MSIMessage *msg, uint8_t *dest ) CLEAN_ASSIGN ( _size, _iterated, REQUEST_FIELD, msg->request ); CLEAN_ASSIGN ( _size, _iterated, RESPONSE_FIELD, msg->response ); CLEAN_ASSIGN ( _size, _iterated, CALLTYPE_FIELD, msg->calltype ); - CLEAN_ASSIGN ( _size, _iterated, USERAGENT_FIELD, msg->useragent ); CLEAN_ASSIGN ( _size, _iterated, INFO_FIELD, msg->info ); CLEAN_ASSIGN ( _size, _iterated, CALLID_FIELD, msg->callid ); CLEAN_ASSIGN ( _size, _iterated, REASON_FIELD, msg->reason ); @@ -505,7 +499,6 @@ void msi_msg_set_##header ( MSIMessage* _msg, const uint8_t* header_value, uint1 ALLOCATE_HEADER( _msg->header, header_value, _size )} GENERIC_SETTER_DEFINITION ( calltype ) -GENERIC_SETTER_DEFINITION ( useragent ) GENERIC_SETTER_DEFINITION ( reason ) GENERIC_SETTER_DEFINITION ( info ) GENERIC_SETTER_DEFINITION ( callid ) @@ -1191,14 +1184,13 @@ void msi_register_callback ( MSICallback callback, MSICallbackID id ) * @return MSISession* The created session. * @retval NULL Error occured. */ -MSISession *msi_init_session ( Messenger *messenger, const uint8_t *ua_name ) +MSISession *msi_init_session ( Messenger* messenger ) { assert ( messenger ); MSISession *_retu = calloc ( sizeof ( MSISession ), 1 ); assert ( _retu ); - _retu->ua_name = ua_name; _retu->messenger_handle = messenger; _retu->agent_handler = NULL; diff --git a/toxav/msi.h b/toxav/msi.h index 84a30f63..a70685f8 100644 --- a/toxav/msi.h +++ b/toxav/msi.h @@ -103,8 +103,6 @@ typedef struct _MSISession { int last_error_id; /* Determine the last error */ const uint8_t *last_error_str; - const uint8_t *ua_name; - void *agent_handler; /* Pointer to an object that is handling msi */ Messenger *messenger_handle; @@ -152,11 +150,10 @@ void msi_register_callback(MSICallback callback, MSICallbackID id); * @brief Start the control session. * * @param messenger Tox* object. - * @param user_agent User agent, i.e. 'Venom'; 'QT-gui' * @return MSISession* The created session. * @retval NULL Error occured. */ -MSISession *msi_init_session ( Messenger *messenger, const uint8_t *ua_name ); +MSISession *msi_init_session ( Messenger *messenger ); /** diff --git a/toxav/phone.c b/toxav/phone.c index ec7dd143..98e97873 100644 --- a/toxav/phone.c +++ b/toxav/phone.c @@ -1019,7 +1019,7 @@ av_session_t *av_init_session() fraddr_to_str( _byte_address, _retu->_my_public_id ); - _retu->av = toxav_new(_retu->_messenger, _retu, _USERAGENT, width, height); + _retu->av = toxav_new(_retu->_messenger, _retu, width, height); /* ------------------ */ diff --git a/toxav/toxav.c b/toxav/toxav.c index e0ddc731..977415dc 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -75,14 +75,13 @@ typedef struct _ToxAv { * it will result in undefined behaviour. * * @param messenger The messenger handle. - * @param useragent The agent handling A/V session (i.e. phone). - * @param ua_name Useragent name. + * @param userdata The agent handling A/V session (i.e. phone). * @param video_width Width of video frame. * @param video_height Height of video frame. * @return ToxAv* * @retval NULL On error. */ -ToxAv *toxav_new( Tox *messenger, void *useragent, const char *ua_name , uint16_t video_width, uint16_t video_height) +ToxAv *toxav_new( Tox *messenger, void *userdata, uint16_t video_width, uint16_t video_height) { ToxAv *av = calloc ( sizeof(ToxAv), 1); @@ -91,7 +90,7 @@ ToxAv *toxav_new( Tox *messenger, void *useragent, const char *ua_name , uint16_ av->messenger = (Messenger *)messenger; - av->msi_session = msi_init_session(av->messenger, (const unsigned char *) ua_name ); + av->msi_session = msi_init_session(av->messenger); av->msi_session->agent_handler = av; av->rtp_sessions[0] = av->rtp_sessions [1] = NULL; @@ -102,7 +101,7 @@ ToxAv *toxav_new( Tox *messenger, void *useragent, const char *ua_name , uint16_ av->cs = codec_init_session(AUDIO_BITRATE, AUDIO_FRAME_DURATION, AUDIO_SAMPLE_RATE, AUDIO_CHANNELS, video_width, video_height, VIDEO_BITRATE); - av->agent_handler = useragent; + av->agent_handler = userdata; return av; } diff --git a/toxav/toxav.h b/toxav/toxav.h index 40cd90db..df5acfc6 100644 --- a/toxav/toxav.h +++ b/toxav/toxav.h @@ -110,14 +110,13 @@ typedef enum { * it will result in undefined behaviour. * * @param messenger The messenger handle. - * @param useragent The agent handling A/V session (i.e. phone). - * @param ua_name Useragent name. + * @param userdata The agent handling A/V session (i.e. phone). * @param video_width Width of video frame. * @param video_height Height of video frame. * @return ToxAv* * @retval NULL On error. */ -ToxAv *toxav_new(Tox *messenger, void *useragent, const char *ua_name, uint16_t video_width, uint16_t video_height); +ToxAv *toxav_new(Tox *messenger, void *userdata, uint16_t video_width, uint16_t video_height); /** * @brief Remove A/V session.