Exemple #1
0
/* Set the RTCP session description  */
void MastTool::set_source_sdes()
{
	char cname[ STR_BUF_SIZE ];
	char tool[ STR_BUF_SIZE ];
	char *hostname=NULL;

	hostname = this->get_hostname();
	snprintf( cname, STR_BUF_SIZE, "%s@%s", PACKAGE_NAME, hostname );
	snprintf( tool, STR_BUF_SIZE, "%s (%s/%s)", this->get_tool_name(), PACKAGE_NAME, PACKAGE_VERSION );
	free( hostname );
	
	rtp_session_set_source_description(
		this->session,		// RtpSession*
		cname,				// CNAME
		NULL,				// name
		NULL,				// email
		NULL,				// phone
		NULL,				// loc
		tool,				// tool
		NULL				// note
	);

}
Exemple #2
0
RtpSession *rtp_send_createSession(
        const char *clientIP, const int clientPort,
        const char *remoteIP, const int remotePort) {
    RtpSession *rtpsession = rtp_session_new(RTP_SESSION_SENDONLY);
    assert(rtpsession != NULL);

    rtp_session_set_scheduling_mode(rtpsession, 1);
    rtp_session_set_blocking_mode(rtpsession, 0);
    rtp_session_set_connected_mode(rtpsession, 1);  // 1 means TRUE;
    // rtp_session_set_local_addr(rtpsession,
    // clientIP, clientPort, clientPort+1);
    rtp_session_set_remote_addr(rtpsession, remoteIP, remotePort);

    rtp_session_set_symmetric_rtp(rtpsession, 1);

    rtp_session_set_source_description(
            rtpsession,
            "cname",  /*cname*/
            "name",   /*name*/
            "*****@*****.**",  /*email*/
            "110",   /*phone number*/
            "loc",   /*loc*/
            "tool",  /*tool*/
            "note:rtp_send test");

    rtp_session_enable_rtcp(rtpsession, 1);  // 1 means TRUE;

    // set payload type to H264 (96);
    rtp_session_set_payload_type(rtpsession, PAYLOAD_TYPE_H264);

    char *ssrc = getenv("SSRC");
    if (ssrc != NULL) {
        rtp_session_set_ssrc(rtpsession, atoi(ssrc));
    }

    return rtpsession;
}
Exemple #3
0
void media_stream_set_rtcp_information(MediaStream *stream, const char *cname, const char *tool) {
	if (stream->sessions.rtp_session != NULL) {
		rtp_session_set_source_description(stream->sessions.rtp_session, cname, NULL, NULL, NULL, NULL, tool, NULL);
	}
}
Exemple #4
0
void video_stream_set_rtcp_information(VideoStream *st, const char *cname, const char *tool){
	if (st->session!=NULL){
		rtp_session_set_source_description(st->session,cname,NULL,NULL,NULL,NULL,tool,
											"This is free software (GPL) !");
	}
}