【问题标题】:I got an error message during using libmms, what does that mean?我在使用 libmms 时收到错误消息,这是什么意思?
【发布时间】:2011-08-06 15:42:40
【问题描述】:

我是 libmms 的新手,我正在尝试制作流式传输 mms 收音机的 Iphone 应用程序。

但我收到一条错误消息,但还不知道原因。

Could not read packet header: Undefined error: 0
***LOG:*** -- libmms: failed to read mms packet header

这是我使用的代码。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSString *stringUri = @"mms://xxx.xxx.xx.xxx/2011-1/NOON/0506.wma";
    NSString *stringHost = @"xxx.xxx.xx.xxx";
    NSString *scheme = @"mms";
    id data;
    int bandwidth = 3000000;
    mmsx_connect (mms_io, &data, [stringUri UTF8String], [stringHost UTF8String],     [stringUri UTF8String], NULL, NULL,[scheme UTF8String] , bandwidth);

    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

不得不提的是,mmsx_connect的第一个参数的类型是mms_io_t,我只是做了interface not implimetation

这是mms_io_t类型的定义

typedef struct
{
  mms_io_select_func select;
  void *select_data;
  mms_io_read_func read;
  void *read_data;
  mms_io_write_func write;
  void *write_data;
  mms_io_tcp_connect_func connect;
  void *connect_data;
} mms_io_t;

请帮助我。我是 libmms 的新手,找不到关于它的有用文档。
欢迎任何评论和帮助。

提前致谢。

【问题讨论】:

    标签: iphone networking network-programming stream mms


    【解决方案1】:
    mmsx_connect (mms_io, &data, [stringUri UTF8String], [stringHost UTF8String],     [stringUri UTF8String], NULL, NULL,[scheme UTF8String] , bandwidth);
    

    您应该将参数传递给const char *uri(第五个参数)-> @"/2011-1/NOON/0506.wma"。
    不是[stringUri UTF8String]
    而且效果很好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-01
      相关资源
      最近更新 更多