Skip to content

Commit

Permalink
会议模块设置分辨率
Browse files Browse the repository at this point in the history
  • Loading branch information
Joy1024 committed Feb 4, 2025
1 parent 72b5159 commit 07c720d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
10 changes: 10 additions & 0 deletions src/lib/backend/BaseService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,14 @@ BaseService::BaseService(const QString& baseUrl, QObject* parent) //

BaseService::~BaseService() {}

void BaseService::setHeader(const QString& k, const QString& v)
{
http->setHeader(k, v);
}

void BaseService::setLanguage(const QString &lang)
{
http->setLanguage(lang);
}

} // namespace lib::backend
10 changes: 5 additions & 5 deletions src/lib/backend/BaseService.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <QString>
#include <QList>

#include "BaseService.h"
#include "base/basic_types.h"
#include "base/r.h"

namespace lib::network {
Expand Down Expand Up @@ -179,13 +179,13 @@ class BaseService : public QObject {

[[maybe_unused]] inline const QString& baseUrl() const { return _baseUrl; }

inline void setHeader(QString k, QString v) { http->setHeader(k, v); }
void setHeader(const QString &k, const QString &v);

inline void setLanguage(const QString& lang) { http->setLanguage(lang); }
void setLanguage(const QString& lang) ;

protected:
QString _baseUrl;
std::unique_ptr<lib::network::NetworkHttp> http;
std::unique_ptr<network::NetworkHttp> http;
};

} // namespace ok::backend
} // namespace lib::backend
3 changes: 2 additions & 1 deletion src/lib/backend/OkCloudService.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

#include <QObject>

#include <lib/backend/BaseService.h>
#include "BaseService.h"
#include "lib/network/NetworkHttp.h"
#include "base/jsons.h"

namespace lib::backend {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/backend/PassportService.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <memory>
#include <string>

#include <base/basic_types.h>

#include <lib/backend/BaseService.h>
#include "base/basic_types.h"
#include "lib/network/NetworkHttp.h"
#include "BaseService.h"

namespace lib::backend {

Expand Down
11 changes: 6 additions & 5 deletions src/modules/meet/src/MeetingOptionWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,6 @@ void CameraVideoOutputWidget::render(const lib::video::VideoDevice& device) {

if(!_camera){
_camera = lib::video::CameraSource::CreateInstance(device);
modes = _camera->getVideoModes();

for(auto &m : modes){
qDebug() << "mode" << m.toString().c_str();
}

connect(_camera.get(), &lib::video::CameraSource::frameAvailable, this,
[this](std::shared_ptr<lib::video::VideoFrame> frame) {
Expand All @@ -319,6 +314,12 @@ void CameraVideoOutputWidget::render(const lib::video::VideoDevice& device) {
}
// todo: 既然是单例,怎么保证多个订阅方选不同设备
// lib::video::VideoMode mode{200, 400, 0, 0, 30};

modes = _camera->getVideoModes();
for(auto &m : modes){
qDebug() << "mode:" << m.toString().c_str();
}
_camera->setup(modes.front());
_camera->openDevice();
// _camera->subscribe();
}
Expand Down
3 changes: 2 additions & 1 deletion src/modules/platform/src/Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
//
#pragma once

#include <base/jsons.h>
#include <QObject>
#include "base/jsons.h"
#include "lib/network/NetworkHttp.h"
#include "lib/backend/BaseService.h"

namespace module::platform {
Expand Down

0 comments on commit 07c720d

Please sign in to comment.