2010-11-24 29 views
2

我正在尋找一個如何使用libmms和ffmpeg流式傳輸mms音頻的例子嗎?現在我已經將這兩個庫導入到了我的xcode項目中,並且我認爲首先要做的就是調用mms_connect(),但是我不知道要使用哪個參數。如何使用Libmms函數

非常感謝提前。

回答

0
  • 您可以使用:

mms_connect(NULL,NULL,g_tcUrl.av_val,g_hostname.av_val,g_playpath.av_val, 「」,g_port,128 * 1024)

注:

NSString* strTemp;  
strTemp = @"mms://123.30.49.85/htv2"; 
// strTemp = @"mms://212.58.251.92/wms/bbc_ami/radio1/radio1_bb_live_int_eq1_sl0"; 
g_tcUrl.av_val = new char[[strTemp length] + 1]; 
[strTemp getCString:g_tcUrl.av_val 
      maxLength:([strTemp length]+1) 
      encoding:NSUTF8StringEncoding]; 
g_tcUrl.av_len = strlen(g_tcUrl.av_val); 
//strTemp = @"212.58.251.92"; 
strTemp = @"123.30.49.85"; 
g_hostname.av_val = new char[[strTemp length]+1];  
[strTemp getCString:g_hostname.av_val 
      maxLength:([strTemp length]+1) 
      encoding:NSUTF8StringEncoding]; 
g_hostname.av_len = strlen(g_hostname.av_val); 
//strTemp = @"/wms/bbc_ami/radio1/radio1_bb_live_int_eq1_sl0"; 
strTemp = @"/htv2"; 
g_playpath.av_val = new char[[strTemp length] + 1];   
[strTemp getCString:g_playpath.av_val 
      maxLength:([strTemp length]+1) 
      encoding:NSUTF8StringEncoding]; 
g_playpath.av_len = strlen(g_playpath.av_val); 
g_port = 1755;