我正在使用live555和ffmpeg库从服务器获取和解码RTP H264流; 视频流由ffmpeg编码,使用Baseline profile和
x264_param_default_preset(m_params, "veryfast", "zerolatency")
Run Code Online (Sandbox Code Playgroud)
我阅读了这个主题并在每帧中添加了SPS和PPS数据,这是我从网络收到的;
void ClientSink::NewFrameHandler(unsigned frameSize, unsigned numTruncatedBytes,
timeval presentationTime, unsigned durationInMicroseconds)
{
...
EncodedFrame tmp;
tmp.m_frame = std::vector<unsigned char>(m_tempBuffer.data(), m_tempBuffer.data() + frameSize);
tmp.m_duration = durationInMicroseconds;
tmp.m_pts = presentationTime;
//Add SPS and PPS data into the frame; TODO: some devices may send SPS and PPs data already into frame;
tmp.m_frame.insert(tmp.m_frame.begin(), m_spsPpsData.cbegin(), m_spsPpsData.cend());
emit newEncodedFrame( SharedEncodedFrame(tmp) );
m_frameCounter++;
this->continuePlaying();
}
Run Code Online (Sandbox Code Playgroud)
我在解码器中收到这些帧.
bool H264Decoder::decodeFrame(SharedEncodedFrame orig_frame)
{
...
while(m_packet.size > 0)
{
int got_picture;
int len …Run Code Online (Sandbox Code Playgroud) 我在调试应用程序时遇到一些问题-当我尝试从gdb shell调用parser :: extractString(...)时,它会返回
命名空间“解析器”中没有符号“ extractString”。
当我执行
信息函数extractString
我有这个输出
与正则表达式“ extractString”匹配的所有函数:
文件/home/dmitriy/Sources/transceiver/parser/json.cpp:std :: __ cxx11 :: string parser :: extractString [abi:cxx11](rapidjson :: GenericValue,parser :: MultithreadAllocator> const&);
非调试符号:0x0000000000506500解析器:: extractString [abi:cxx11](rapidjson :: GenericValue,解析器:: MultithreadAllocator> const&)@ plt 0x00007ffff77e3640解析器:: extractString [abi:cxx11](rapidjson :: GenericValue,解析器:: MultithreadAllocator > const&)@ plt
调用此函数有什么问题?函数extractString在静态库中定义,并且可以从应用程序中毫无问题地调用。