#ifndef FFMPEGPUSHSTREAM_H #define FFMPEGPUSHSTREAM_H #include "ffmpeginclude.h" #include #include class FFmpegPushStream : public QObject { Q_OBJECT public: explicit FFmpegPushStream(QObject *parent = nullptr); /** * @brief 设置推流地址 * @param url 远端推流地址 */ void setRemoteIP(QString url); signals: private: AVFormatContext *inputFormatCtx = nullptr; // AVFormatContext *outputFormatCtx = NULL; // AVCodecContext *encoderCtx = nullptr; // const AVCodec *encoder = nullptr; // 编码器 int videoIndex = -1; QString pushStreamIP; // 推流地址 bool mInitStatus = false; public slots: int pushStream(AVPacket *pkt, int frm_cnt); int openNetworkStream(AVFormatContext *inputFormatCtx); }; #endif // FFMPEGPUSHSTREAM_H