【发布时间】: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