编译失败
Closed this issue · 1 comments
longack commented
按照README的方法编译
media-server/src/http_streaming_service.cpp: In member function ‘virtual void ProxyHttp::Run()’:
media-server/src/http_streaming_service.cpp:584:54: error: cannot convert ‘butil::intrusive_ptr<brpc::ProgressiveAttachment>’ to ‘brpc::ProgressiveAttachment*’ in initialization
584 | _server_cntl->CreateProgressiveAttachment(brpc::FORCE_STOP);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
| |
| butil::intrusive_ptr<brpc::ProgressiveAttachment>
media-server/src/http_streaming_service.cpp:866:46: error: cannot convert ‘butil::intrusive_ptr<brpc::ProgressiveAttachment>’ to ‘brpc::ProgressiveAttachment*’ in initialization
866 | cntl->CreateProgressiveAttachment(brpc::FORCE_STOP);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
| |
| butil::intrusive_ptr<brpc::ProgressiveAttachment>
make[2]: *** [src/CMakeFiles/media_server.dir/build.make:155: src/CMakeFiles/media_server.dir/http_streaming_service.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:140: src/CMakeFiles/media_server.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
longack commented
将 http_streaming_service.cpp 中
brpc::ProgressiveAttachment* pa =
_server_cntl->CreateProgressiveAttachment(brpc::FORCE_STOP);
改为
butil::intrusive_ptr<brpc::ProgressiveAttachment> pa =
_server_cntl->CreateProgressiveAttachment(brpc::FORCE_STOP);
再将报错中的pa
改为 pa.get()
可以解决