具体代码如下:
child[0] = fork();
if( child[0] > 0 ) { /* parent, success */ msg_type = LIVE_MSG_TYPE9; video_type = VIDEO_TYPE_H264; rtspServerPortNum = 8557; H264VideoBitrate = 12000000; videoRTPPortNum = 6016; audioRTPPortNum = 6028; OverHTTPPortNum = 8304; streamingMode = STREAMING_UNICAST; } else if(child[0] == 0) { /* parent, success */ msg_type = LIVE_MSG_TYPE5; video_type = VIDEO_TYPE_H264; rtspServerPortNum = 8554;
H264VideoBitrate = 12000000; videoRTPPortNum = 6032; audioRTPPortNum = 6034; OverHTTPPortNum = 8304; streamingMode = STREAMING_MULTICAST_SSM; }