试图解决编译错误

This commit is contained in:
Mike Solar
2025-06-18 20:42:45 +08:00
parent 5f9508434f
commit c04fceef9b
13 changed files with 42 additions and 35 deletions
@@ -23,7 +23,9 @@
#include <olive/core/core.h>
#include <QComboBox>
extern "C"{
#include <libavformat/avformat.h>
}
#include "ui/humanstrings.h"
namespace olive {
@@ -42,22 +44,24 @@ public:
QVariant::fromValue(ch_layout));
}
}
uint64_t GetChannelLayout() const
[[nodiscard]] AVChannelLayout GetChannelLayout() const
{
return this->currentData().toULongLong();
AVChannelLayout audio_channel_layout_;
av_channel_layout_from_mask(&audio_channel_layout_, this->currentData().toULongLong());
return audio_channel_layout_;
}
void SetChannelLayout(uint64_t ch)
void SetChannelLayout(std::shared_ptr<AVChannelLayout> &ch)
{
for (int i=0; i<this->count(); i++) {
if (this->itemData(i).toULongLong() == ch) {
if (this->itemData(i).toULongLong() == ch->u.mask) {
this->setCurrentIndex(i);
break;
}
}
}
public slots:
private:
};
}