- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用 C++ 和 Qt 创建一个项目,将视频从 KIT armTiny6410 流式传输到笔记本电脑。我用live555来做。这是流式文件的线程。但我不知道我需要包括什么,因为当我编译时我得到这些错误:
error: 'TaskScheduler' was not declared in this scope error: 'scheduler' was not declared in this scope error: 'BasicTaskScheduler' has not been declared error: 'UsageEnvironment' was not declared in this scope error: 'env' was not declared in this scope error: 'BasicUsageEnvironment' has not been declared error: 'UserAuthenticationDatabase' was not declared in this scope error: 'authDB' was not declared in this scope error: 'RTSPServer' was not declared in this scope error: 'rtspServer' was not declared in this scope
void ThreadStream::run()
{
// Begin by setting up our usage environment:
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
UsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);
UserAuthenticationDatabase* authDB = NULL;
#ifdef ACCESS_CONTROL
// To implement client access control to the RTSP server, do the following:
authDB = new UserAuthenticationDatabase;
authDB->addUserRecord("username1", "password1"); // replace these with real strings
// Repeat the above with each <username>, <password> that you wish to allow
// access to the server.
#endif
// Create the RTSP server. Try first with the default port number (554),
// and then with the alternative port number (8888):
RTSPServer* rtspServer;
portNumBits rtspServerPortNum = 554;
rtspServer = DynamicRTSPServer::createNew(*env, rtspServerPortNum, authDB);
if (rtspServer == NULL) {
rtspServerPortNum = 8888;
rtspServer = DynamicRTSPServer::createNew(*env, rtspServerPortNum, authDB);
}
if (rtspServer == NULL) {
QString msg = "Failed to create RTSP server";
emit notifyMessage(msg);
exit(1);
}
QString msge = "LIVE555 Media Server\n";
char* urlPrefix = rtspServer->rtspURLPrefix();
msge += "Play streams from this server using the URL\n\t"
+ QString(urlPrefix) + "<filename>\nwhere <filename> is a file present in the current directory.\n"
+ "Each file's type is inferred from its name suffix:\n"
+ "\t\".264\" => a H.264 Video Elementary Stream file\n"
+ "\t\".aac\" => an AAC Audio (ADTS format) file\n"
+ "\t\".ac3\" => an AC-3 Audio file\n"
+ "\t\".amr\" => an AMR Audio file\n"
+ "\t\".dv\" => a DV Video file\n"
+ "\t\".m4e\" => a MPEG-4 Video Elementary Stream file\n"
+ "\t\".mkv\" => a Matroska audio+video+(optional)subtitles file\n"
+ "\t\".mp3\" => a MPEG-1 or 2 Audio file\n"
+ "\t\".mpg\" => a MPEG-1 or 2 Program Stream (audio+video) file\n"
+ "\t\".ts\" => a MPEG Transport Stream file\n"
+ "\t\t(a \".tsx\" index file - if present - provides server 'trick play' support)\n"
+ "\t\".wav\" => a WAV Audio file\n"
+ "\t\".webm\" => a WebM audio(Vorbis)+video(VP8) file\n";
emit notifyMessage(msge);
env->taskScheduler().doEventLoop(); // does not return
}
我的live555库在:/urs/lib/live请帮我!非常感谢!
最佳答案
您需要包含这三个文件,它们位于 liveMedia/include、BasicUsageEnvironment/include 和 groupsock/include 文件夹中源代码目录
#include <liveMedia.hh>
#include <BasicUsageEnvironment.hh>
#include <GroupsockHelper.hh>
关于c++ - 如何使用live555串流视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22264905/
我正在尝试创建一个程序,其中字符串的前三个字符重复给定次数,如下所示: foo('Chocolate', 3) # => 'ChoChoCho' foo('Abc', 3) # => 'AbcAbcA
我有以下字符串: std::string str = "Mode:AAA:val:101:id:A1"; 我想分离一个位于 "val:" 和 ":id" 之间的子字符串,这是我的方法: std::st
DNA 字符串可以是任意长度,包含 5 个字母(A、T、G、C、N)的任意组合。 压缩包含 5 个字母(A、T、G、C、N)的 DNA 字母串的有效方法是什么?不是考虑每个字母表 3 位,我们可以使用
是否有一种使用 levenstein 距离将一个特定字符串与第二个较长字符串中的任何区域进行匹配的好方法? 例子: str1='aaaaa' str2='bbbbbbaabaabbbb' if str
使用 OAuth 并使用以下函数使用我们称为“foo”(实际上是 OAuth token )的字符串加密 key public function encrypt( $text ) { // a
我是一名优秀的程序员,十分优秀!