91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 515KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-06
  • 語言: 其他
  • 標簽: linux??Qt??mplayer??ubuntu??

資源簡介

在網(wǎng)上已有源碼基礎上修改為ubuntu下可用 源程序在windows下運行正常

資源截圖

代碼片段和文件信息

#include?
#include?“implayer.h“
#include?“ui_implayer.h“
#include?
#include
#include



IMplayer::IMplayer(QWidget?*parent)?:
????QMainWindow(parent)
????ui(new?Ui::IMplayer)
{
????isMute?=?0;
????isPlay?=?1;
????isLength?=?1;
????timePos?=?0;
????timeLength?=?0;

????ui->setupUi(this);
????ui->scheduleSlider->setRange(0999);
????ui->voiceSlider->setRange(0?99);

????mplayerProcess?=?new?QProcess(this);
????mplayerProcess->setProcessChannelMode(QProcess::MergedChannels);
????//mplayerProgram?=?tr(“D:/workstation/IMplayer/mplayer/mplayer.exe“);
????mplayerProgram?=?tr(“/usr/bin/mplayer“);
????timeClock?=?new?QTimer(this);

????connect(mplayerProcess?SIGNAL(readyReadStandardOutput())?this?SLOT(back_Message_slot()));
????connect(timeClock?SIGNAL(timeout())?this?SLOT(back_posMessage_slot()));

}

IMplayer::~IMplayer()
{
????delete?ui;
}

void?IMplayer::setUI()
{

}

void?IMplayer::play(QString?fileName)
{
????mplayerProcess->close();

????ui->posTimeLineEdit->setText(“00:00:00“);
????ui->lengthTimeLineEdit->setText(“00:00:00“);
????ui->scheduleSlider->setValue(0);
????ui->voiceSlider->setValue(99);
????ui->playPushButton->setEnabled(1);
????ui->pausePushButton->setEnabled(1);
????ui->stopPushButton->setEnabled(1);
????ui->stepPushButton->setEnabled(1);
????ui->backPushButton->setEnabled(1);
????ui->scheduleSlider->setEnabled(1);
????ui->voiceSlider->setEnabled(1);
????ui->quietPushButton->setEnabled(1);

????QStringList?args;
????args?<????args?<
#ifdef?Q_WS_WIN

????args?<widgetview->winId()));
????args?<????args?<#else
????args?<widgetview->winId()));
????args?<#endif

????args?<
????timePos?=?0;
????//ui->posTimeLineEdit->setText(“00:00:00“);
????timeLength?=?1;
????isLength?=?1;

????mplayerProcess->start(mplayerProgram?args);

????mplayerProcess->write(“get_time_length\n“);
}

void?IMplayer::on_playPushButton_clicked()
{

????if(isPlay?==?0)
????{
????????mplayerProcess->write(“pause\n“);
????????isPlay?=?1;
????????timeClock->start();
????}
}

void?IMplayer::on_pausePushButton_clicked()
{
????if(isPlay?==?1)
????{
????????mplayerProcess->write(“pause\n“);
????????//timeClock->isActive()=?false;
????????isPlay?=?0;
????????timeClock->stop();

????}
}

void?IMplayer::on_stopPushButton_clicked()
{
????timeClock->stop();
????mplayerProcess->write(“pausing_keep?stop\n“);

????ui->posTimeLineEdit->setText(“00:00:00“);
????ui->lengthTimeLineEdit->setText(“00:00:00“);
????ui->scheduleSlider->setValue(0);
????ui->voiceSlider->setValue(99);
????ui->playPushButton->setDisabled(1);
????ui->pausePushButton->setDisabled(1);
????ui->stopPushButton->setDisabled(1);
????ui->stepPushButton->setDisabled(1);
?

評論

共有 條評論