Skip to content

Commit c2f8bfa

Browse files
committed
fix build
1 parent e30deb8 commit c2f8bfa

23 files changed

+172
-172
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ MESSAGE("VERSION = ${VERSION}")
198198
FILE(GLOB_RECURSE WEBRTJSONCPPCOBJS ${WEBRTCOBJS}/third_party/jsoncpp/jsoncpp/*${CMAKE_C_OUTPUT_EXTENSION} ${WEBRTCOBJS}/rtc_base/rtc_json/*${CMAKE_C_OUTPUT_EXTENSION})
199199
FILE(GLOB_RECURSE WEBRTP2POBJ ${WEBRTCOBJS}/p2p/p2p_server_utils/*${CMAKE_C_OUTPUT_EXTENSION})
200200
SET (WEBRTCEXTRAOBJS ${WEBRTJSONCPPCOBJS} ${WEBRTP2POBJ} ${WEBRTCCOMOBJ})
201-
FILE(GLOB SOURCE src/*.cpp)
201+
FILE(GLOB SOURCE src/*.cpp ${WEBRTCROOT}/src/rtc_base/third_party/base64/base64.cc)
202202
add_executable (${CMAKE_PROJECT_NAME} ${SOURCE} ${WEBRTCEXTRAOBJS})
203203
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE inc)
204204

inc/CapturerFactory.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
template<class T>
4141
class TrackSource : public webrtc::VideoTrackSource {
4242
public:
43-
static rtc::scoped_refptr<TrackSource> Create(const std::string & videourl, const std::map<std::string, std::string> & opts, std::unique_ptr<webrtc::VideoDecoderFactory>& videoDecoderFactory) {
43+
static webrtc::scoped_refptr<TrackSource> Create(const std::string & videourl, const std::map<std::string, std::string> & opts, std::unique_ptr<webrtc::VideoDecoderFactory>& videoDecoderFactory) {
4444
std::unique_ptr<T> capturer = absl::WrapUnique(T::Create(videourl, opts, videoDecoderFactory));
4545
if (!capturer) {
4646
return nullptr;
4747
}
48-
return rtc::make_ref_counted<TrackSource>(std::move(capturer));
48+
return webrtc::make_ref_counted<TrackSource>(std::move(capturer));
4949
}
5050

5151
virtual bool GetStats(Stats* stats) override {
@@ -69,7 +69,7 @@ class TrackSource : public webrtc::VideoTrackSource {
6969
}
7070

7171
private:
72-
rtc::VideoSourceInterface<webrtc::VideoFrame>* source() override {
72+
webrtc::VideoSourceInterface<webrtc::VideoFrame>* source() override {
7373
return m_capturer.get();
7474
}
7575
std::unique_ptr<T> m_capturer;
@@ -166,8 +166,8 @@ class CapturerFactory {
166166
return videoList;
167167
}
168168

169-
static rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource(const std::string & videourl, const std::map<std::string,std::string> & opts, const std::regex & publishFilter, rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory, std::unique_ptr<webrtc::VideoDecoderFactory>& videoDecoderFactory) {
170-
rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> videoSource;
169+
static webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource(const std::string & videourl, const std::map<std::string,std::string> & opts, const std::regex & publishFilter, webrtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory, std::unique_ptr<webrtc::VideoDecoderFactory>& videoDecoderFactory) {
170+
webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> videoSource;
171171
if ( ((videourl.find("rtsp://") == 0) || (videourl.find("rtsps://") == 0) ) && (std::regex_match("rtsp://", publishFilter))) {
172172
#ifdef HAVE_LIVE555
173173
videoSource = TrackSource<RTSPVideoCapturer>::Create(videourl,opts, videoDecoderFactory);
@@ -213,7 +213,7 @@ class CapturerFactory {
213213
return videoSource;
214214
}
215215

216-
static const std::list<std::string> GetAudioCaptureDeviceList(const std::regex & publishFilter, rtc::scoped_refptr<webrtc::AudioDeviceModule> audioDeviceModule) {
216+
static const std::list<std::string> GetAudioCaptureDeviceList(const std::regex & publishFilter, webrtc::scoped_refptr<webrtc::AudioDeviceModule> audioDeviceModule) {
217217
std::list<std::string> audioList;
218218
if (std::regex_match("audiocap://", publishFilter))
219219
{
@@ -237,7 +237,7 @@ class CapturerFactory {
237237
return audioList;
238238
}
239239

240-
static const std::list<std::string> GetAudioPlayoutDeviceList(const std::regex & publishFilter, rtc::scoped_refptr<webrtc::AudioDeviceModule> audioDeviceModule) {
240+
static const std::list<std::string> GetAudioPlayoutDeviceList(const std::regex & publishFilter, webrtc::scoped_refptr<webrtc::AudioDeviceModule> audioDeviceModule) {
241241
std::list<std::string> audioList;
242242
if (std::regex_match("audioplay://", publishFilter))
243243
{
@@ -261,13 +261,13 @@ class CapturerFactory {
261261
return audioList;
262262
}
263263

264-
static rtc::scoped_refptr<webrtc::AudioSourceInterface> CreateAudioSource(const std::string & audiourl,
264+
static webrtc::scoped_refptr<webrtc::AudioSourceInterface> CreateAudioSource(const std::string & audiourl,
265265
const std::map<std::string,std::string> & opts,
266266
const std::regex & publishFilter,
267-
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory,
268-
rtc::scoped_refptr<webrtc::AudioDecoderFactory> audioDecoderfactory,
269-
rtc::scoped_refptr<webrtc::AudioDeviceModule> audioDeviceModule) {
270-
rtc::scoped_refptr<webrtc::AudioSourceInterface> audioSource;
267+
webrtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> peer_connection_factory,
268+
webrtc::scoped_refptr<webrtc::AudioDecoderFactory> audioDecoderfactory,
269+
webrtc::scoped_refptr<webrtc::AudioDeviceModule> audioDeviceModule) {
270+
webrtc::scoped_refptr<webrtc::AudioSourceInterface> audioSource;
271271

272272
if ( (audiourl.find("rtsp://") == 0) && (std::regex_match("rtsp://",publishFilter)) )
273273
{
@@ -302,7 +302,7 @@ class CapturerFactory {
302302
if ( (idx_audioDevice >= 0) && (idx_audioDevice < num_audioDevices) )
303303
{
304304
audioDeviceModule->SetRecordingDevice(idx_audioDevice);
305-
cricket::AudioOptions opt;
305+
webrtc::AudioOptions opt;
306306
audioSource = peer_connection_factory->CreateAudioSource(opt);
307307
}
308308
}

inc/EncodedVideoFrameBuffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
class EncodedVideoFrameBuffer : public webrtc::VideoFrameBuffer
1818
{
1919
public:
20-
EncodedVideoFrameBuffer(int width, int height, const rtc::scoped_refptr<webrtc::EncodedImageBufferInterface> &encoded_data, webrtc::VideoFrameType frameType, const webrtc::SdpVideoFormat& format)
20+
EncodedVideoFrameBuffer(int width, int height, const webrtc::scoped_refptr<webrtc::EncodedImageBufferInterface> &encoded_data, webrtc::VideoFrameType frameType, const webrtc::SdpVideoFormat& format)
2121
: m_width(width), m_height(height), m_encoded_data(encoded_data), m_frameType(frameType), m_format(format) {}
2222
virtual Type type() const { return webrtc::VideoFrameBuffer::Type::kNative; }
23-
virtual rtc::scoped_refptr<webrtc::I420BufferInterface> ToI420() { return nullptr; }
23+
virtual webrtc::scoped_refptr<webrtc::I420BufferInterface> ToI420() { return nullptr; }
2424
virtual int width() const { return m_width; }
2525
virtual int height() const { return m_height; }
2626

@@ -38,7 +38,7 @@ class EncodedVideoFrameBuffer : public webrtc::VideoFrameBuffer
3838
private:
3939
const int m_width;
4040
const int m_height;
41-
rtc::scoped_refptr<webrtc::EncodedImageBufferInterface> m_encoded_data;
41+
webrtc::scoped_refptr<webrtc::EncodedImageBufferInterface> m_encoded_data;
4242
webrtc::VideoFrameType m_frameType;
4343
webrtc::SdpVideoFormat m_format;
4444
};

inc/NullDecoder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class NullDecoder : public webrtc::VideoDecoder {
3737
RTC_LOG(LS_WARNING) << "RegisterDecodeCompleteCallback() not called";
3838
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
3939
}
40-
rtc::scoped_refptr<webrtc::EncodedImageBufferInterface> encodedData = input_image.GetEncodedData();
41-
rtc::scoped_refptr<webrtc::VideoFrameBuffer> frameBuffer = rtc::make_ref_counted<EncodedVideoFrameBuffer>(m_settings.max_render_resolution().Width(), m_settings.max_render_resolution().Height(), encodedData, input_image.FrameType(), m_format);
40+
webrtc::scoped_refptr<webrtc::EncodedImageBufferInterface> encodedData = input_image.GetEncodedData();
41+
webrtc::scoped_refptr<webrtc::VideoFrameBuffer> frameBuffer = webrtc::make_ref_counted<EncodedVideoFrameBuffer>(m_settings.max_render_resolution().Width(), m_settings.max_render_resolution().Height(), encodedData, input_image.FrameType(), m_format);
4242

4343
webrtc::VideoFrame frame = webrtc::VideoFrame::Builder()
4444
.set_video_frame_buffer(frameBuffer)

inc/NullEncoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class NullEncoder : public webrtc::VideoEncoder {
4343
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
4444
}
4545

46-
rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer = frame.video_frame_buffer();
46+
webrtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer = frame.video_frame_buffer();
4747
if (buffer->type() != webrtc::VideoFrameBuffer::Type::kNative) {
4848
RTC_LOG(LS_ERROR) << "buffer type must be kNative";
4949
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;

0 commit comments

Comments
 (0)