我正在尝试将 udp src 动态添加到正在运行的管道中。例如
void addAudioSource(std::string const ip, int const port, int const payloadtype)
{
std::string description = "autoaudiosrc ! queue ! audioconvert ! audio/x-raw,rate=16000 ! avenc_g722 ! rtpg722pay";
audiosrc = Gst::Parse::create_bin(description, true);
pipeline->add(audiosrc);
{
auto srcpad = audiosrc->get_static_pad("src");
auto sinkpad = rtpbin->get_request_pad("send_rtp_sink_1");
srcpad->link(sinkpad);
}
rtpudpsinkAudio->set_property("host", ip);
rtpudpsinkAudio->set_property("port", port);
rtpudpsinkAudio->set_property("sync",true);
rtpudpsinkAudio->set_property("async",false);
pipeline->add(rtpudpsinkAudio);
{
auto srcpad = rtpbin->get_static_pad("send_rtp_src_1");
auto sinkpad = rtpudpsinkAudio->get_static_pad("sink");
srcpad->link(sinkpad);
}
pipeline->set_state(Gst::State::STATE_PLAYING);
}
Run Code Online (Sandbox Code Playgroud)
- - 和 - -
void addAudioSink(std::string const ip, int const port, int const payloadtype) …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用以下内容构建webrtc版本62
1.git checkout -b branch62 refs/remotes/branch-heads/62
2.gn gen out_release_62/x64/Debug --args="rtc_include_tests=false rtc_use_h264=false use_rtti=true is_component_build=false enable_iterator_debugging=false enable_nacl=false target_os=\"linux\" target_cpu=\"x64\" is_debug=true"
3.ninja -C out_release_62/x64/Debug
Run Code Online (Sandbox Code Playgroud)
我正在链接到libwebrtc.a和libwebrtc_common.a
但无论我在哪里尝试使用RTC_CHECK_EQ或RTC_DCHECK_LT,我都会收到以下错误
undefined reference to `rtc::FatalMessage::FatalMessage(char const*, int, std::string*)'
Run Code Online (Sandbox Code Playgroud)
和
out_release_62/include/webrtc/rtc_base/checks.h:176: undefined reference to `std::string* rtc::MakeCheckOpString<int, int>(int const&, int const&, char const*)'
./src/testwebrtc.o: In function `rtc::CheckLtImpl(int, int, char const*)':
Run Code Online (Sandbox Code Playgroud)
我没有构建分支头60的问题,我尝试链接到librtc_base.a和librtc_base_approved.a但没有运气.产生此错误的示例程序是
#include <iostream>
#include <string>
#include <webrtc/rtc_base/checks.h>
#include <webrtc/rtc_base/ssladapter.h>
#include <webrtc/rtc_base/logging.h>
#include <webrtc/api/peerconnectioninterface.h>
using namespace std;
int main() {
cout << "!!!Hello World!!!" << endl; // …Run Code Online (Sandbox Code Playgroud)