我是iPhone应用开发的新手,我想通过我的应用在iPhone上进行直播。请建议我如何在iPhone / iPad上开发视频流。目前,我在iPhone中集成了用于rtsp视频流的dropcam库,但在我的项目中集成了Live555,DecoderWrapper,ffmpeg和libswscale库之后,我得到了15个错误:
Undefined symbols for architecture i386:
"_av_register_all", referenced from:
+[VideoDecoder staticInitialize] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_init", referenced from:
+[VideoDecoder staticInitialize] in libDecoderWrapper.a(VideoDecoder.o)
"_av_log_set_callback", referenced from:
+[VideoDecoder registerLogCallback:] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_find_decoder", referenced from:
-[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_alloc_context", referenced from:
-[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)
"_av_malloc", referenced from:
-[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)
-[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_alloc_frame", referenced from:
-[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_open", referenced from:
-[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_decode_video2", referenced from:
-[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)
"_avpicture_get_size", referenced from:
-[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)
"_avpicture_fill", referenced from:
-[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)
"_sws_getContext", referenced from:
-[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)
"_sws_scale", referenced from:
-[VideoDecoder getDecodedFrame] in libDecoderWrapper.a(VideoDecoder.o)
"_av_free", referenced from:
-[VideoDecoder dealloc] in libDecoderWrapper.a(VideoDecoder.o)
"_avcodec_close", referenced from:
-[VideoDecoder dealloc] in libDecoderWrapper.a(VideoDecoder.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
请帮我解决这些错误,或者告诉我如何在iPhone / iPad上播放视频流。
答案 0 :(得分:0)
选择您的项目>构建阶段> expand Compile Sources>按+>添加libDecoderWrapper.m
或者删除库并重新添加到Xcode,同时确保"添加到目标"选中复选框以自动将所有内容添加到编译源阶段,Xcode 4.3存在一个错误,使得该复选框无法选中。