提交 e4457888 编写于 作者: D DrKLO

Update to 3.10.0-dev

上级 ab221daf
......@@ -25,7 +25,7 @@ dependencies {
compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.google.firebase:firebase-config:21.0.0'
implementation 'com.google.firebase:firebase-config:21.0.1'
implementation 'com.google.firebase:firebase-datatransport:18.0.1'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.1'
......@@ -299,7 +299,7 @@ android {
}
}
defaultConfig.versionCode = 2390
defaultConfig.versionCode = 2397
applicationVariants.all { variant ->
variant.outputs.all { output ->
......@@ -318,7 +318,7 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionName "7.9.3"
versionName "7.10.0"
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
......
......@@ -918,7 +918,9 @@ add_library(tgcalls STATIC
voip/tgcalls/group/GroupNetworkManager.cpp
voip/tgcalls/group/GroupInstanceCustomImpl.cpp
voip/tgcalls/group/GroupJoinPayloadInternal.cpp
voip/tgcalls/group/StreamingPart.cpp
voip/tgcalls/group/AudioStreamingPart.cpp
voip/tgcalls/group/VideoStreamingPart.cpp
voip/tgcalls/group/StreamingMediaContext.cpp
voip/tgcalls/third-party/json11.cpp
voip/webrtc/rtc_base/async_invoker.cc
......
......@@ -76,10 +76,12 @@ class BroadcastPartTaskJava : public BroadcastPartTask {
public:
BroadcastPartTaskJava(std::shared_ptr<PlatformContext> platformContext,
std::function<void(BroadcastPart &&)> callback,
int64_t timestamp) :
int64_t timestamp, int32_t videoChannel, VideoChannelDescription::Quality quality) :
_platformContext(std::move(platformContext)),
_callback(std::move(callback)),
_timestamp(timestamp) {
_timestamp(timestamp),
_videoChannel(videoChannel),
_quality(quality) {
}
void call(int64_t ts, int64_t responseTs, BroadcastPart::Status status, uint8_t *data, int32_t len) {
......@@ -91,22 +93,37 @@ public:
part.responseTimestamp = responseTs / 1000.0;
part.status = status;
if (data != nullptr) {
part.oggData = std::vector<uint8_t>(data, data + len);
part.data = std::vector<uint8_t>(data, data + len);
}
_callback(std::move<>(part));
}
bool isValidTaskFor(int64_t timestamp, int32_t videoChannel, VideoChannelDescription::Quality quality) {
return _timestamp == timestamp && _videoChannel == videoChannel && _quality == quality;
}
private:
void cancel() override {
tgvoip::jni::DoWithJNI([&](JNIEnv *env) {
jobject globalRef = ((AndroidContext *) _platformContext.get())->getJavaInstance();
env->CallVoidMethod(globalRef, env->GetMethodID(NativeInstanceClass, "onCancelRequestBroadcastPart", "(J)V"), _timestamp);
auto context = (AndroidContext *) _platformContext.get();
jobject globalRef = context->getJavaInstance();
env->CallVoidMethod(globalRef, env->GetMethodID(NativeInstanceClass, "onCancelRequestBroadcastPart", "(JII)V"), _timestamp, _videoChannel, (jint) _quality);
if (_videoChannel != 0) {
for (auto videoTaskIter = context->videoStreamTasks.begin(); videoTaskIter != context->videoStreamTasks.end(); videoTaskIter++) {
if (((BroadcastPartTaskJava *) videoTaskIter->get())->isValidTaskFor(_timestamp, _videoChannel, _quality)) {
context->videoStreamTasks.erase(videoTaskIter);
break;
}
}
}
});
}
std::shared_ptr<PlatformContext> _platformContext;
std::function<void(BroadcastPart &&)> _callback;
int64_t _timestamp;
int32_t _videoChannel;
VideoChannelDescription::Quality _quality;
};
class JavaObject {
......@@ -399,12 +416,21 @@ JNIEXPORT jlong JNICALL Java_org_telegram_messenger_voip_NativeInstance_makeGrou
.platformContext = platformContext
};
if (!screencast) {
descriptor.requestBroadcastPart = [](std::shared_ptr<PlatformContext> platformContext, int64_t timestamp, int64_t duration, std::function<void(BroadcastPart &&)> callback) -> std::shared_ptr<BroadcastPartTask> {
std::shared_ptr<BroadcastPartTask> task = std::make_shared<BroadcastPartTaskJava>(platformContext, callback, timestamp);
((AndroidContext *) platformContext.get())->streamTask = task;
descriptor.requestAudioBroadcastPart = [](std::shared_ptr<PlatformContext> platformContext, int64_t timestamp, int64_t duration, std::function<void(BroadcastPart &&)> callback) -> std::shared_ptr<BroadcastPartTask> {
std::shared_ptr<BroadcastPartTask> task = std::make_shared<BroadcastPartTaskJava>(platformContext, callback, timestamp, 0, VideoChannelDescription::Quality::Full);
((AndroidContext *) platformContext.get())->audioStreamTask = task;
tgvoip::jni::DoWithJNI([platformContext, timestamp, duration, task](JNIEnv *env) {
jobject globalRef = ((AndroidContext *) platformContext.get())->getJavaInstance();
env->CallVoidMethod(globalRef, env->GetMethodID(NativeInstanceClass, "onRequestBroadcastPart", "(JJ)V"), timestamp, duration);
env->CallVoidMethod(globalRef, env->GetMethodID(NativeInstanceClass, "onRequestBroadcastPart", "(JJII)V"), timestamp, duration, 0, 0);
});
return task;
};
descriptor.requestVideoBroadcastPart = [](std::shared_ptr<PlatformContext> platformContext, int64_t timestamp, int64_t duration, int32_t video_channel, VideoChannelDescription::Quality quality, std::function<void(BroadcastPart &&)> callback) -> std::shared_ptr<BroadcastPartTask> {
std::shared_ptr<BroadcastPartTask> task = std::make_shared<BroadcastPartTaskJava>(platformContext, callback, timestamp, video_channel, quality);
((AndroidContext *) platformContext.get())->videoStreamTasks.push_back(task);
tgvoip::jni::DoWithJNI([platformContext, timestamp, duration, task, video_channel, quality](JNIEnv *env) {
jobject globalRef = ((AndroidContext *) platformContext.get())->getJavaInstance();
env->CallVoidMethod(globalRef, env->GetMethodID(NativeInstanceClass, "onRequestBroadcastPart", "(JJII)V"), timestamp, duration, video_channel, (jint) quality);
});
return task;
};
......@@ -812,20 +838,31 @@ JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_stopGroup
delete instance;
}
JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_onStreamPartAvailable(JNIEnv *env, jobject obj, jlong ts, jobject byteBuffer, jint size, jlong responseTs) {
JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_onStreamPartAvailable(JNIEnv *env, jobject obj, jlong ts, jobject byteBuffer, jint size, jlong responseTs, jint videoChannel, jint quality) {
InstanceHolder *instance = getInstanceHolder(env, obj);
if (instance->groupNativeInstance == nullptr) {
return;
}
auto context = (AndroidContext *) instance->_platformContext.get();
std::shared_ptr<BroadcastPartTask> streamTask = context->streamTask;
auto task = (BroadcastPartTaskJava *) streamTask.get();
std::shared_ptr<BroadcastPartTask> task;
if (videoChannel != 0) {
auto q = (VideoChannelDescription::Quality) quality;
for (auto videoTaskIter = context->videoStreamTasks.begin(); videoTaskIter != context->videoStreamTasks.end(); videoTaskIter++) {
if (((BroadcastPartTaskJava *) videoTaskIter->get())->isValidTaskFor(ts, videoChannel, q)) {
task = *videoTaskIter;
context->videoStreamTasks.erase(videoTaskIter);
break;
}
}
} else {
task = context->audioStreamTask;
}
if (task != nullptr) {
if (byteBuffer != nullptr) {
auto buf = (uint8_t *) env->GetDirectBufferAddress(byteBuffer);
task->call(ts, responseTs, BroadcastPart::Status::Success, buf, size);
((BroadcastPartTaskJava *) task.get())->call(ts, responseTs, BroadcastPart::Status::Success, buf, size);
} else {
task->call(ts, responseTs, size == 0 ? BroadcastPart::Status::NotReady : BroadcastPart::Status::ResyncNeeded, nullptr, 0);
((BroadcastPartTaskJava *) task.get())->call(ts, responseTs, size == 0 ? BroadcastPart::Status::NotReady : BroadcastPart::Status::ResyncNeeded, nullptr, 0);
}
}
}
......@@ -886,7 +923,7 @@ JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_destroyVi
JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_switchCameraCapturer(JNIEnv *env, jclass clazz, jlong videoCapturer, jboolean front) {
auto capturer = reinterpret_cast<VideoCaptureInterface *>(videoCapturer);
capturer->switchToDevice(front ? "front" : "back");
capturer->switchToDevice(front ? "front" : "back", false);
}
JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_setVideoStateCapturer(JNIEnv *env, jclass clazz, jlong videoCapturer, jint videoState) {
......@@ -899,7 +936,7 @@ JNIEXPORT void JNICALL Java_org_telegram_messenger_voip_NativeInstance_switchCam
if (instance->_videoCapture == nullptr) {
return;
}
instance->_videoCapture->switchToDevice(front ? "front" : "back");
instance->_videoCapture->switchToDevice(front ? "front" : "back", false);
}
JNIEXPORT jboolean JNICALL Java_org_telegram_messenger_voip_NativeInstance_hasVideoCapturer(JNIEnv *env, jobject obj) {
......
......@@ -204,6 +204,7 @@ public:
virtual void receiveSignalingData(const std::vector<uint8_t> &data) = 0;
virtual void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture) = 0;
virtual void sendVideoDeviceUpdated() = 0;
virtual void setRequestedVideoAspect(float aspect) = 0;
virtual void stop(std::function<void(FinalState)> completion) = 0;
......
......@@ -58,6 +58,12 @@ void InstanceImpl::setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoC
});
}
void InstanceImpl::sendVideoDeviceUpdated() {
_manager->perform(RTC_FROM_HERE, [](Manager *manager) {
manager->sendVideoDeviceUpdated();
});
}
void InstanceImpl::setRequestedVideoAspect(float aspect) {
_manager->perform(RTC_FROM_HERE, [aspect](Manager *manager) {
manager->setRequestedVideoAspect(aspect);
......
......@@ -21,6 +21,7 @@ public:
void receiveSignalingData(const std::vector<uint8_t> &data) override;
void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture) override;
void sendVideoDeviceUpdated() override;
void setRequestedVideoAspect(float aspect) override;
void setNetworkType(NetworkType networkType) override;
void setMuteMicrophone(bool muteMicrophone) override;
......
......@@ -316,6 +316,12 @@ void Manager::setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCaptur
});
}
void Manager::sendVideoDeviceUpdated() {
_mediaManager->perform(RTC_FROM_HERE, [](MediaManager *mediaManager) {
mediaManager->sendVideoDeviceUpdated();
});
}
void Manager::setRequestedVideoAspect(float aspect) {
_mediaManager->perform(RTC_FROM_HERE, [aspect](MediaManager *mediaManager) {
mediaManager->setRequestedVideoAspect(aspect);
......
......@@ -29,6 +29,7 @@ public:
void start();
void receiveSignalingData(const std::vector<uint8_t> &data);
void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture);
void sendVideoDeviceUpdated();
void setRequestedVideoAspect(float aspect);
void setMuteOutgoingAudio(bool mute);
void setIncomingVideoOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink);
......
......@@ -641,17 +641,18 @@ void MediaManager::setSendVideo(std::shared_ptr<VideoCaptureInterface> videoCapt
_videoCapture = videoCapture;
if (_videoCapture) {
_videoCapture->setPreferredAspectRatio(_preferredAspectRatio);
_isScreenCapture = _videoCapture->isScreenCapture();
const auto thread = _thread;
const auto weak = std::weak_ptr<MediaManager>(shared_from_this());
GetVideoCaptureAssumingSameThread(_videoCapture.get())->setStateUpdated([=](VideoState state) {
thread->PostTask(RTC_FROM_HERE, [=] {
if (const auto strong = weak.lock()) {
strong->setOutgoingVideoState(state);
}
});
});
const auto thread = _thread;
const auto weak = std::weak_ptr<MediaManager>(shared_from_this());
const auto object = GetVideoCaptureAssumingSameThread(_videoCapture.get());
_isScreenCapture = object->isScreenCapture();
object->setStateUpdated([=](VideoState state) {
thread->PostTask(RTC_FROM_HERE, [=] {
if (const auto strong = weak.lock()) {
strong->setOutgoingVideoState(state);
}
});
});
setOutgoingVideoState(VideoState::Active);
} else {
_isScreenCapture = false;
......@@ -681,6 +682,18 @@ void MediaManager::setSendVideo(std::shared_ptr<VideoCaptureInterface> videoCapt
checkIsReceivingVideoChanged(wasReceiving);
}
void MediaManager::sendVideoDeviceUpdated() {
if (!computeIsSendingVideo()) {
return;
}
const auto wasScreenCapture = _isScreenCapture;
const auto object = GetVideoCaptureAssumingSameThread(_videoCapture.get());
_isScreenCapture = object->isScreenCapture();
if (_isScreenCapture != wasScreenCapture) {
adjustBitratePreferences(true);
}
}
void MediaManager::setRequestedVideoAspect(float aspect) {
if (_localPreferredVideoAspectRatio != aspect) {
_localPreferredVideoAspectRatio = aspect;
......
......@@ -58,6 +58,7 @@ public:
void setIsConnected(bool isConnected);
void notifyPacketSent(const rtc::SentPacket &sentPacket);
void setSendVideo(std::shared_ptr<VideoCaptureInterface> videoCapture);
void sendVideoDeviceUpdated();
void setRequestedVideoAspect(float aspect);
void setMuteOutgoingAudio(bool mute);
void setIncomingVideoOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink);
......
......@@ -39,8 +39,7 @@ public:
virtual ~VideoCaptureInterface();
virtual bool isScreenCapture() = 0;
virtual void switchToDevice(std::string deviceId) = 0;
virtual void switchToDevice(std::string deviceId, bool isScreenCapture) = 0;
virtual void setState(VideoState state) = 0;
virtual void setPreferredAspectRatio(float aspectRatio) = 0;
virtual void setOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) = 0;
......
......@@ -9,11 +9,11 @@
namespace tgcalls {
VideoCaptureInterfaceObject::VideoCaptureInterfaceObject(std::string deviceId, std::shared_ptr<PlatformContext> platformContext, Threads &threads)
: _videoSource(PlatformInterface::SharedInstance()->makeVideoSource(threads.getMediaThread(), threads.getWorkerThread(), deviceId == "screen")) {
VideoCaptureInterfaceObject::VideoCaptureInterfaceObject(std::string deviceId, bool isScreenCapture, std::shared_ptr<PlatformContext> platformContext, Threads &threads)
: _videoSource(PlatformInterface::SharedInstance()->makeVideoSource(threads.getMediaThread(), threads.getWorkerThread(), isScreenCapture)) {
_platformContext = platformContext;
switchToDevice(deviceId);
switchToDevice(deviceId, isScreenCapture);
}
VideoCaptureInterfaceObject::~VideoCaptureInterfaceObject() {
......@@ -34,13 +34,18 @@ int VideoCaptureInterfaceObject::getRotation() {
}
}
void VideoCaptureInterfaceObject::switchToDevice(std::string deviceId) {
if (_videoCapturer && _currentUncroppedSink != nullptr) {
bool VideoCaptureInterfaceObject::isScreenCapture() {
return _isScreenCapture;
}
void VideoCaptureInterfaceObject::switchToDevice(std::string deviceId, bool isScreenCapture) {
if (_videoCapturer) {
_videoCapturer->setUncroppedOutput(nullptr);
}
_isScreenCapture = isScreenCapture;
if (_videoSource) {
//this should outlive the capturer
_videoCapturer = NULL;
_videoCapturer = nullptr;
_videoCapturer = PlatformInterface::SharedInstance()->makeVideoCapturer(_videoSource, deviceId, [this](VideoState state) {
if (this->_stateUpdated) {
this->_stateUpdated(state);
......@@ -164,23 +169,19 @@ void VideoCaptureInterfaceObject::setRotationUpdated(std::function<void(int)> ro
VideoCaptureInterfaceImpl::VideoCaptureInterfaceImpl(std::string deviceId, bool isScreenCapture, std::shared_ptr<PlatformContext> platformContext, std::shared_ptr<Threads> threads) :
_platformContext(platformContext),
_impl(threads->getMediaThread(), [deviceId, platformContext, threads]() {
return new VideoCaptureInterfaceObject(deviceId, platformContext, *threads);
}), _isScreenCapture(isScreenCapture) {
_impl(threads->getMediaThread(), [deviceId, isScreenCapture, platformContext, threads]() {
return new VideoCaptureInterfaceObject(deviceId, isScreenCapture, platformContext, *threads);
}) {
}
VideoCaptureInterfaceImpl::~VideoCaptureInterfaceImpl() = default;
void VideoCaptureInterfaceImpl::switchToDevice(std::string deviceId) {
_impl.perform(RTC_FROM_HERE, [deviceId](VideoCaptureInterfaceObject *impl) {
impl->switchToDevice(deviceId);
void VideoCaptureInterfaceImpl::switchToDevice(std::string deviceId, bool isScreenCapture) {
_impl.perform(RTC_FROM_HERE, [deviceId, isScreenCapture](VideoCaptureInterfaceObject *impl) {
impl->switchToDevice(deviceId, isScreenCapture);
});
}
bool VideoCaptureInterfaceImpl::isScreenCapture() {
return _isScreenCapture;
}
void VideoCaptureInterfaceImpl::withNativeImplementation(std::function<void(void *)> completion) {
_impl.perform(RTC_FROM_HERE, [completion](VideoCaptureInterfaceObject *impl) {
impl->withNativeImplementation(completion);
......
......@@ -14,10 +14,10 @@ class Threads;
class VideoCaptureInterfaceObject {
public:
VideoCaptureInterfaceObject(std::string deviceId, std::shared_ptr<PlatformContext> platformContext, Threads &threads);
VideoCaptureInterfaceObject(std::string deviceId, bool isScreenCapture, std::shared_ptr<PlatformContext> platformContext, Threads &threads);
~VideoCaptureInterfaceObject();
void switchToDevice(std::string deviceId);
void switchToDevice(std::string deviceId, bool isScreenCapture);
void withNativeImplementation(std::function<void(void *)> completion);
void setState(VideoState state);
void setPreferredAspectRatio(float aspectRatio);
......@@ -29,10 +29,11 @@ public:
void setOnIsActiveUpdated(std::function<void(bool)> onIsActiveUpdated);
webrtc::VideoTrackSourceInterface *source();
int getRotation();
bool isScreenCapture();
private:
void updateAspectRateAdaptation();
rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> _videoSource;
std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> _currentUncroppedSink;
std::shared_ptr<PlatformContext> _platformContext;
......@@ -46,6 +47,7 @@ private:
VideoState _state = VideoState::Active;
float _preferredAspectRatio = 0.0f;
bool _shouldBeAdaptedToReceiverAspectRate = true;
bool _isScreenCapture = false;
};
class VideoCaptureInterfaceImpl : public VideoCaptureInterface {
......@@ -53,8 +55,7 @@ public:
VideoCaptureInterfaceImpl(std::string deviceId, bool isScreenCapture, std::shared_ptr<PlatformContext> platformContext, std::shared_ptr<Threads> threads);
virtual ~VideoCaptureInterfaceImpl();
bool isScreenCapture() override;
void switchToDevice(std::string deviceId) override;
void switchToDevice(std::string deviceId, bool isScreenCapture) override;
void withNativeImplementation(std::function<void(void *)> completion) override;
void setState(VideoState state) override;
void setPreferredAspectRatio(float aspectRatio) override;
......@@ -68,8 +69,6 @@ public:
private:
ThreadLocalObject<VideoCaptureInterfaceObject> _impl;
bool _isScreenCapture = false;
std::shared_ptr<PlatformContext> _platformContext;
......
#include "StreamingPart.h"
#include "AudioStreamingPart.h"
#include "rtc_base/logging.h"
#include "rtc_base/third_party/base64/base64.h"
......@@ -17,6 +17,13 @@ namespace tgcalls {
namespace {
static uint32_t stringToUInt32(std::string const &string) {
std::stringstream stringStream(string);
uint32_t value = 0;
stringStream >> value;
return value;
}
static absl::optional<uint32_t> readInt32(std::string const &data, int &offset) {
if (offset + 4 > data.length()) {
return absl::nullopt;
......@@ -139,9 +146,9 @@ struct ReadPcmResult {
int numChannels = 0;
};
class StreamingPartInternal {
class AudioStreamingPartInternal {
public:
StreamingPartInternal(std::vector<uint8_t> &&fileData) :
AudioStreamingPartInternal(std::vector<uint8_t> &&fileData) :
_avIoContext(std::move(fileData)) {
int ret = 0;
......@@ -201,6 +208,12 @@ public:
_channelUpdates = parseChannelUpdates(result, offset);
}
}
entry = av_dict_get(inStream->metadata, "ACTIVE_MASK", nullptr, 0);
if (entry && entry->value) {
std::string sourceString = (const char *)entry->value;
_videoChannelMask = stringToUInt32(sourceString);
}
}
break;
......@@ -233,7 +246,7 @@ public:
}
}
~StreamingPartInternal() {
~AudioStreamingPartInternal() {
if (_frame) {
av_frame_unref(_frame);
}
......@@ -287,6 +300,10 @@ public:
return _channelUpdates;
}
uint32_t getVideoChannelMask() const {
return _videoChannelMask;
}
private:
static int16_t sampleFloatToInt16(float sample) {
return av_clip_int16 (static_cast<int32_t>(lrint(sample*32767)));
......@@ -399,13 +416,14 @@ private:
int _channelCount = 0;
std::vector<ChannelUpdate> _channelUpdates;
uint32_t _videoChannelMask = 0;
std::vector<int16_t> _pcmBuffer;
int _pcmBufferSampleOffset = 0;
int _pcmBufferSampleSize = 0;
};
class StreamingPartState {
class AudioStreamingPartState {
struct ChannelMapping {
uint32_t ssrc = 0;
int channelIndex = 0;
......@@ -416,7 +434,7 @@ class StreamingPartState {
};
public:
StreamingPartState(std::vector<uint8_t> &&data) :
AudioStreamingPartState(std::vector<uint8_t> &&data) :
_parsedPart(std::move(data)) {
if (_parsedPart.getChannelUpdates().size() == 0) {
_didReadToEnd = true;
......@@ -431,14 +449,18 @@ public:
}
}
~StreamingPartState() {
~AudioStreamingPartState() {
}
uint32_t getVideoChannelMask() const {
return _parsedPart.getVideoChannelMask();
}
int getRemainingMilliseconds() const {
return _remainingMilliseconds;
}
std::vector<StreamingPart::StreamingPartChannel> get10msPerChannel() {
std::vector<AudioStreamingPart::StreamingPartChannel> get10msPerChannel() {
if (_didReadToEnd) {
return {};
}
......@@ -455,9 +477,9 @@ public:
return {};
}
std::vector<StreamingPart::StreamingPartChannel> resultChannels;
std::vector<AudioStreamingPart::StreamingPartChannel> resultChannels;
for (const auto ssrc : _allSsrcs) {
StreamingPart::StreamingPartChannel emptyPart;
AudioStreamingPart::StreamingPartChannel emptyPart;
emptyPart.ssrc = ssrc;
resultChannels.push_back(emptyPart);
}
......@@ -509,7 +531,7 @@ private:
}
private:
StreamingPartInternal _parsedPart;
AudioStreamingPartInternal _parsedPart;
std::set<uint32_t> _allSsrcs;
std::vector<int16_t> _pcm10ms;
......@@ -520,26 +542,30 @@ private:
bool _didReadToEnd = false;