test pipe

This commit is contained in:
flykhan 2023-08-29 21:14:28 +08:00
parent 13aeecc6c3
commit 54d5f52e86
2 changed files with 10 additions and 0 deletions

View File

@ -49,3 +49,10 @@ void MainWindow::initMainWindow()
// slider->setSingleStep(1); // 设置步长 // slider->setSingleStep(1); // 设置步长
} }
void MainWindow::mplayerInit()
{
// 创建一个无名管道
int fd[2];
pipe(fd);
}

View File

@ -3,6 +3,8 @@
#include <QMainWindow> #include <QMainWindow>
#include <unistd.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; } namespace Ui { class MainWindow; }
QT_END_NAMESPACE QT_END_NAMESPACE
@ -17,6 +19,7 @@ public:
public: public:
void initMainWindow(); void initMainWindow();
void mplayerInit(); // 初始化 mplayer
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;