mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Use Windows system default audio device and upgrade SimpleCaptureGraph with callbacks.
Upgrade SDK to master.
This commit is contained in:
parent
f285ce68de
commit
e960490220
8 changed files with 24 additions and 5 deletions
|
|
@ -26,7 +26,7 @@ variables:
|
|||
DEBIAN_9_QT_IMAGE_VERSION: 20230417_qtopen_gstreamer
|
||||
DEBIAN_10_IMAGE_VERSION: 20210217_python3
|
||||
UBUNTU_ROLLING_IMAGE_VERSION: 20211012_add_qtwebview
|
||||
UBUNTU_1804_IMAGE_VERSION: 20230315_qt
|
||||
UBUNTU_1804_IMAGE_VERSION: 20230706_add_deps_for_av1
|
||||
|
||||
|
||||
workflow:
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ QString ConferenceInfoModel::displayNamesToString()const{
|
|||
|
||||
QString ConferenceInfoModel::getUri() const{
|
||||
auto address = mConferenceInfo->getUri();
|
||||
return address->isValid() && !address->getDomain().empty() ? QString::fromStdString(address->asStringUriOnly()) : "";
|
||||
return address && address->isValid() && !address->getDomain().empty() ? QString::fromStdString(address->asStringUriOnly()) : "";
|
||||
}
|
||||
|
||||
bool ConferenceInfoModel::isScheduled() const{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "components/contact/VcardModel.hpp"
|
||||
#include "components/core/CoreManager.hpp"
|
||||
#include "components/friend/FriendListListener.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "ContactsListModel.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ shared_ptr<linphone::Address> AccountSettingsModel::getUsedSipAddress () const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void AccountSettingsModel::setUsedSipAddress (const shared_ptr<const linphone::Address> &address) {
|
||||
void AccountSettingsModel::setUsedSipAddress (const shared_ptr<linphone::Address> &address) {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
shared_ptr<linphone::Account> account = core->getDefaultAccount();
|
||||
if( account){
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public:
|
|||
|
||||
std::shared_ptr<linphone::Account> findAccount(std::shared_ptr<const linphone::Address> address) const ;
|
||||
|
||||
|
||||
QString getUsedSipAddressAsStringUriOnly () const;
|
||||
QString getUsedSipAddressAsString () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,13 +50,30 @@ SimpleCaptureGraph::~SimpleCaptureGraph()
|
|||
{
|
||||
destroy();
|
||||
}
|
||||
static void device_notify_cb(void *user_data, MSFilter *f, unsigned int event, void *eventdata) {
|
||||
if (event == MS_FILTER_OUTPUT_FMT_CHANGED) {
|
||||
SimpleCaptureGraph * graph = (SimpleCaptureGraph *)user_data;
|
||||
int captureRate, playbackRate, captureChannels, playbackChannels;
|
||||
ms_filter_call_method(graph->audioCapture,MS_FILTER_GET_SAMPLE_RATE,&captureRate);
|
||||
ms_filter_call_method(graph->audioSink,MS_FILTER_GET_SAMPLE_RATE,&playbackRate);
|
||||
ms_filter_call_method(graph->audioCapture,MS_FILTER_GET_NCHANNELS,&captureChannels);
|
||||
ms_filter_call_method(graph->audioSink,MS_FILTER_GET_NCHANNELS,&playbackChannels);
|
||||
|
||||
ms_filter_call_method(graph->resamplerFilter,MS_FILTER_SET_SAMPLE_RATE,&captureRate);
|
||||
ms_filter_call_method(graph->resamplerFilter,MS_FILTER_SET_OUTPUT_SAMPLE_RATE,&playbackRate);
|
||||
ms_filter_call_method(graph->resamplerFilter,MS_FILTER_SET_NCHANNELS,&captureChannels);
|
||||
ms_filter_call_method(graph->resamplerFilter,MS_FILTER_SET_OUTPUT_NCHANNELS,&playbackChannels);
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleCaptureGraph::init() {
|
||||
if (!audioCapture) {
|
||||
audioCapture = ms_snd_card_create_reader(captureCard);
|
||||
ms_filter_add_notify_callback(audioCapture, device_notify_cb,this,FALSE);
|
||||
}
|
||||
if (!audioSink) {
|
||||
audioSink = ms_snd_card_create_writer(playbackCard);
|
||||
ms_filter_add_notify_callback(audioSink, device_notify_cb,this,FALSE);
|
||||
}
|
||||
if (!captureVolumeFilter) {
|
||||
captureVolumeFilter = ms_factory_create_filter(msFactory, MS_VOLUME_ID);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace MediastreamerUtils {
|
|||
bool isRunning() const {
|
||||
return running;
|
||||
}
|
||||
protected:
|
||||
|
||||
void init();
|
||||
void destroy();
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 88c727d0c8cd2d93d8ddcca1a4bff4a2e2fd7e89
|
||||
Subproject commit 6b6f905377c2a07c3086be3049d8bb227848eed3
|
||||
Loading…
Add table
Reference in a new issue