﻿{"id":2376,"date":"2021-12-22T19:03:42","date_gmt":"2021-12-22T11:03:42","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=2376"},"modified":"2021-12-23T22:22:56","modified_gmt":"2021-12-23T14:22:56","slug":"live555%e4%ba%a4%e5%8f%89%e7%bc%96%e8%af%91ubuntu%e5%92%8c%e5%90%9b%e6%ad%a3%e5%b9%b3%e5%8f%b0","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/nocategory\/2376","title":{"rendered":"live555\u4ea4\u53c9\u7f16\u8bd1(ubuntu\u548c\u541b\u6b63\u5e73\u53f0)"},"content":{"rendered":"<p>\u4e00\u3001 \u7b80\u4ecb<\/p>\n<p>Live555 \u662f\u4e00\u4e2a\u4e3a\u6d41\u5a92\u4f53\u63d0\u4f9b\u89e3\u51b3\u65b9\u6848\u7684\u8de8\u5e73\u53f0\u7684C++\u5f00\u6e90\u9879\u76ee\uff0c\u5b83\u5b9e\u73b0\u4e86\u5bf9\u6807\u51c6\u6d41\u5a92\u4f53\u4f20\u8f93\u534f\u8bae\u5982RTP\/RTCP\u3001RTSP\u3001SIP\u7b49\u7684\u652f\u6301\u3002Live555\u5b9e\u73b0\u4e86\u5bf9\u591a\u79cd\u97f3\u89c6\u9891\u7f16\u7801\u683c\u5f0f\u7684\u97f3\u89c6\u9891\u6570\u636e\u7684\u6d41\u5316\u3001\u63a5\u6536\u548c\u5904\u7406\u7b49\u652f\u6301\uff0c\u5305\u62ecMPEG\u3001H.263+\u3001DV\u3001JPEG\u89c6\u9891\u548c\u591a\u79cd\u97f3\u9891\u7f16\u7801\u3002\u540c\u65f6\u7531\u4e8e\u826f\u597d\u7684\u8bbe\u8ba1\uff0cLive555\u975e\u5e38\u5bb9\u6613\u6269\u5c55\u5bf9\u5176\u4ed6\u683c\u5f0f\u7684\u652f\u6301\u3002\u76ee\u524d\uff0cLive555\u5df2\u7ecf\u88ab\u7528\u4e8e\u591a\u6b3e\u64ad\u653e\u5668\u7684\u6d41\u5a92\u4f53\u64ad\u653e\u529f\u80fd\u7684\u5b9e\u73b0\uff0c\u5982VLC(VideoLan)\u3001MPlayer\u3002<\/p>\n<p>\u8be5\u9879\u76ee\u7684\u6e90\u4ee3\u7801\u5305\u62ec\u56db\u4e2a\u57fa\u672c\u7684\u5e93\uff0c\u5404\u79cd\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u53caIVE555 Media Server\u3002\u56db\u4e2a\u57fa\u672c\u7684\u5e93\u5206\u522b\u662fUsageEnvironment\uff0cgroupsock\uff0cliveMedia\uff0cBasicUsageEnvironment\u3002<\/p>\n<p>\u4e8c\u3001 \u4e0b\u8f7d\n\u5b98\u7f51\uff1a<a href=\"http:\/\/www.live555.com\/\">http:\/\/www.live555.com\/<\/a>\n\u6e90\u7801\uff1a<a href=\"http:\/\/www.live555.com\/liveMedia\/public\/\">http:\/\/www.live555.com\/liveMedia\/public\/<\/a><\/p>\n<p>\u4e09\u3001 \u7f16\u8bd1\n1\u3001 \u541b\u6b63\u5e73\u53f0<\/p>\n<p>\u89e3\u538b\u538b\u7f29\u5305\uff0c\u5e76\u8fdb\u5165\u6e90\u7801\u76ee\u5f55\uff1b\ntar zxvf live555-latest.tar.gz\ncd live<\/p>\n<p>2) \u62f7\u8d1dconfig\u6587\u4ef6\uff0c\u6839\u636e\u81ea\u5df1\u4ea4\u53c9\u7f16\u8bd1\u5668\uff0c\u4fee\u6539\u540e\u7f00\u4e3a\u81ea\u5df1\u7684\uff1b<\/p>\n<p>cp config.armlinux config.mips-linux-uclibc-gnu<\/p>\n<p>3)\u4fee\u6539config.mips\u6587\u4ef6\uff0c\u5c06\u4ea4\u53c9\u7f16\u8bd1\u94fe\u8bbe\u7f6e\u4e3a\u81ea\u5df1\u7684\uff0cCOMPILE_OPTS\u9009\u9879\u4e2d\u6dfb\u52a0-DLOCALE_NOT_USED\u548c-fPIC\u53c2\u6570\uff1b\n\u7531\u4e8e\u5728\u5f00\u53d1\u677f\u4e0a\u4f7f\u7528\u7684uclibc\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\u7f16\u8bd1\uff0c\u5de5\u5177\u94fe\u4e2d\u7f3a\u5c11xlocale.h\u8fd9\u4e2a\u5934\u6587\u4ef6\uff0c\u800clive555\u4e2dliveMeida\/locale.hh\u4e2d\u8c03\u7528\u8be5\u5934\u6587\u4ef6\uff0c\u7f16\u8bd1\u65f6\u4f1a\u5bfc\u81f4\u9519\u8bef\uff0c\u901a\u8fc7\u6dfb\u52a0\u5b8f\uff1aLOCALE_NOT_USED\uff0c\u53ef\u4ee5\u5173\u95edlocale\u8fd9\u4e2a\u6a21\u5757\uff0c\u9632\u6b62\u7f16\u8bd1\u62a5\u9519\u3002<\/p>\n<p>CROSS_COMPILE?= mips-linux-uclibc-gnu-\nCOMPILE_OPTS = $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED\u00a0-fPIC\nC = c\nC_COMPILER = $(CROSS_COMPILE)gcc\nC_FLAGS = $(COMPILE_OPTS)\nCPP = cpp\nCPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++\nCPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1\nOBJ = o\nLINK = $(CROSS_COMPILE)g++ -o\nLINK_OPTS =\nCONSOLE_LINK_OPTS = $(LINK_OPTS)\nLIBRARY_LINK = $(CROSS_COMPILE)ar cr\nLIBRARY_LINK_OPTS = $(LINK_OPTS)\nLIB_SUFFIX = a\nLIBS_FOR_CONSOLE_APPLICATION =\nLIBS_FOR_GUI_APPLICATION =\nEXE =<\/p>\n<p>4) \u751f\u6210Makefile\uff0c\u5e76\u7f16\u8bd1\uff1b<\/p>\n<p>.\/genMakefiles mips\nmake<\/p>\n<p>\u7f16\u8bd1\u53d1\u751f\u9519\u8bef\u89e3\u51b3:<\/p>\n<ol>\n<li>\n<p>openssl\/ssl.h: No such file or directory\n<span class=\"s1\">sudo ln -s \/usr\/include\/openssl \/usr\/local\/include\/openssl<\/span><\/p>\n<\/li>\n<li>\n<p>openssl\/opensslconf.h: No such file or directory\nsudo ln -s \/usr\/include\/x86_64-linux-gnu\/openssl\/opensslconf.h \/usr\/include\/openssl\/opensslconf.h<\/p>\n<\/li>\n<\/ol>\n<p>3.cannot find -lssl\n\u5c06openssl\/lib\u4e0b\u7684.a .so\u6587\u4ef6\u62f7\u8d1d\u81f3\/opt\/mips-gcc472-glibc216-32bit\/lib\/gcc\/mips-linux-gnu\/4.7.2\/uclibc\/\n\u6216\u8005\u5728 config.mips \u52a0\u4e0a-DNO_OPENSSL=1 \u548c LIBS_FOR_CONSOLE_APPLICATION= \u540e\u9762\u7559\u7a7a<\/p>\n<p><strong>5.\u628a\u9759\u6001\u5e93\u641e\u51fa\u6765<\/strong>\nliveMedia\u9879\u76ee\u7684\u6e90\u4ee3\u7801\u5305\u62ec\u56db\u4e2a\u57fa\u672c\u7684\u5e93\uff0c\u5404\u79cd\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u53caIVE555 Media Server\u3002<\/p>\n<p>\u56db\u4e2a\u57fa\u672c\u7684\u5e93\u5206\u522b\u662fUsageEnvironment&#038;TaskScheduler\uff0cgroupsock\uff0cliveMedia\uff0cBasicUsageEnvironment\u3002<\/p>\n<p>\u76f4\u63a5\u6267\u884c\u811a\u672c<\/p>\n<p>#!\/bin\/sh<\/p>\n<p>rm -rf live555\/\nmkdir live555\nINSTALL_DIR_LIVE=\/home\/ky<\/p>\n<p>#create file\ncd live555\nmkdir lib\nmkdir include\ncd &#8211;<\/p>\n<p>cd live555\/include\nmkdir liveMedia\nmkdir BasicUsageEnvironment\nmkdir UsageEnvironment\nmkdir groupsock\ncd &#8211;<\/p>\n<p>#copy include\ncp -rf liveMedia\/include\/<em>.<\/em>h ${INSTALL_DIR_LIVE}\/live555\/include\/liveMedia\ncp -rf BasicUsageEnvironment\/include\/<em>.<\/em>h ${INSTALL_DIR_LIVE}\/live555\/include\/BasicUsageEnvironment\ncp -rf UsageEnvironment\/include\/<em>.<\/em>h ${INSTALL_DIR_LIVE}\/live555\/include\/UsageEnvironment\ncp -rf groupsock\/include\/<em>.<\/em>h ${INSTALL_DIR_LIVE}\/live555\/include\/groupsock<\/p>\n<p>#copy lib\ncp -rf liveMedia\/libliveMedia.a ${INSTALL_DIR_LIVE}\/live555\/lib\ncp -rf BasicUsageEnvironment\/libBasicUsageEnvironment.a ${INSTALL_DIR_LIVE}\/live555\/lib\ncp -rf UsageEnvironment\/libUsageEnvironment.a ${INSTALL_DIR_LIVE}\/live555\/lib\ncp -rf groupsock\/libgroupsock.a ${INSTALL_DIR_LIVE}\/live555\/lib<\/p>\n<p>echo &#8220;&#8212;&#8212;&#8212;&#8212;&#8211; install library done &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8220;<\/p>\n<center><\/center>","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001 \u7b80\u4ecb Live555 \u662f\u4e00\u4e2a\u4e3a\u6d41\u5a92\u4f53\u63d0\u4f9b\u89e3\u51b3\u65b9\u6848\u7684\u8de8\u5e73\u53f0\u7684C++\u5f00\u6e90\u9879\u76ee\uff0c\u5b83\u5b9e\u73b0\u4e86\u5bf9\u6807\u51c6\u6d41\u5a92\u4f53\u4f20\u8f93\u534f\u8bae\u5982RTP\/RTCP\u3001RTSP\u3001SIP\u7b49\u7684\u652f\u6301\u3002Live555\u5b9e\u73b0\u4e86\u5bf9\u591a\u79cd\u97f3\u89c6\u9891\u7f16\u7801\u683c\u5f0f\u7684\u97f3\u89c6&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[515,514,329],"class_list":["post-2376","post","type-post","status-publish","format-standard","hentry","category-nocategory","tag-live555","tag-514","tag-329"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=2376"}],"version-history":[{"count":6,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2376\/revisions"}],"predecessor-version":[{"id":2382,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2376\/revisions\/2382"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=2376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=2376"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=2376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}