From 0560a8fce4c9d005655fce5025bc0fda8c58bff8 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 02 十二月 2019 16:15:47 +0800 Subject: [PATCH] update --- csrc/worker/stream.hpp | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/csrc/worker/stream.hpp b/csrc/worker/stream.hpp index 6c87ff6..8a0feec 100644 --- a/csrc/worker/stream.hpp +++ b/csrc/worker/stream.hpp @@ -5,23 +5,28 @@ #include <mutex> #include <memory> +#include "../common.hpp" + namespace ffwrapper{ - class CodedData; + class FormatIn; } namespace cffmpeg_wrap{ class stream { private: - std::list<std::shared_ptr<ffwrapper::CodedData> > list_avpkt_; + std::list<CPacket> list_pkt_; std::mutex mutex_avpkt_; + ffwrapper::FormatIn *streamRef_; const int max_size_; + bool audio_; public: - explicit stream(const int maxSize); + stream(ffwrapper::FormatIn *in, const int maxSize); ~stream(); - int SetPacket(std::shared_ptr<ffwrapper::CodedData> data); + int SetPacket(const CPacket &pkt); void GetPacket(unsigned char **pktData, int *size, int *key); + void AudioSwitch(const bool a){audio_ = a;} }; } -- Gitblit v1.8.0