From 54d5f52e8611296a8a8112c18996bdb7208481b5 Mon Sep 17 00:00:00 2001 From: flykhan Date: Tue, 29 Aug 2023 21:14:28 +0800 Subject: [PATCH] test pipe --- mainwindow.cpp | 7 +++++++ mainwindow.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 65d2a57..ddc83bc 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -49,3 +49,10 @@ void MainWindow::initMainWindow() // slider->setSingleStep(1); // 设置步长 } + +void MainWindow::mplayerInit() +{ + // 创建一个无名管道 + int fd[2]; + pipe(fd); +} diff --git a/mainwindow.h b/mainwindow.h index c23167a..f27d0e3 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -3,6 +3,8 @@ #include +#include + QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE @@ -17,6 +19,7 @@ public: public: void initMainWindow(); + void mplayerInit(); // 初始化 mplayer private: Ui::MainWindow *ui;