【问题标题】:How to use Libmms functions如何使用 Libmms 函数
【发布时间】:2011-05-15 04:08:18
【问题描述】:

我正在寻找如何使用 libmms 和 ffmpeg 流式传输 mms 音频的示例?现在我已经在我的 xcode 项目中导入了这两个库,我认为要做的第一件事是调用 mms_connect(),但我不知道要使用什么参数。

非常感谢。

【问题讨论】:

    标签: iphone xcode stream ffmpeg mms


    【解决方案1】:
    • 您可以使用:

    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;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-21
      • 1970-01-01
      • 2019-03-27
      • 2021-12-02
      相关资源
      最近更新 更多