19 #ifndef DATVIDEORENDER_H 20 #define DATVIDEORENDER_H 32 #include "libavcodec/avcodec.h" 33 #include "libavformat/avformat.h" 35 #include <libavutil/channel_layout.h> 36 #include <libavutil/common.h> 37 #include <libavutil/imgutils.h> 38 #include <libavutil/mathematics.h> 39 #include <libavutil/opt.h> 40 #include <libavutil/samplefmt.h> 42 #include "libswscale/swscale.h" 77 CodecDescription =
"";
80 OK_TransportStream =
false;
81 OK_VideoStream =
false;
93 void SetFullScreen(
bool blnFullScreen);
97 bool CloseStream(QIODevice *objDevice);
105 void setAudioVolume(
int audioVolume);
131 static const int m_audioFifoBufferSize = 16000;
132 int16_t m_audioFifoBuffer[m_audioFifoBufferSize*2];
140 int m_pintDecodedLineSize[4];
152 bool InitializeFFMPEG();
153 bool PreprocessStream();
154 void ResetMetaData();
156 int new_decode(AVCodecContext *avctx, AVFrame *frame,
int *got_frame, AVPacket *pkt);
160 virtual bool eventFilter(QObject *obj, QEvent *event);
172 m_renderer =
nullptr;
174 m_renderingVideo =
false;
179 m_renderer = renderer;
181 m_renderingVideo =
false;
186 m_renderer = renderer;
188 m_renderingVideo =
false;
193 if (m_renderingVideo)
198 if ((m_renderer ==
nullptr) || (m_stream ==
nullptr))
203 m_renderingVideo = m_renderer->OpenStream(m_stream);
205 if (!m_renderingVideo)
210 while ((m_renderer->RenderStream()) && (m_renderingVideo ==
true))
214 m_renderer->CloseStream(m_stream);
215 m_renderingVideo =
false;
220 m_renderingVideo =
false;
229 #endif // DATVIDEORENDER_H
bool m_isFFMPEGInitialized
int m_currentRenderHeight
AVCodecContext * m_videoDecoderCtx
bool m_updateAudioResampler
int getVideoStreamIndex() const
bool getAudioDecodeOK() const
DATVideoRender * m_renderer
AVCodecContext * m_audioDecoderCtx
void setAudioMute(bool audioMute)
Qt::WindowFlags m_originalWindowFlags
int m_audioFifoBufferIndex
void setAudioFIFO(AudioFifo *fifo)
bool getVideoDecodeOK() const
void setVideoMute(bool videoMute)
DATVideoRenderThread(DATVideoRender *renderer, DATVideostream *stream)
void setStreamAndRenderer(DATVideoRender *renderer, DATVideostream *stream)
AVFormatContext * m_formatCtx
DATVideostream * m_stream
struct SwrContext * m_audioSWR
int getAudioStreamIndex() const