| 1 |
/* |
| 2 |
* Copyright (C) 2013-2021 Jean-Luc Barrière |
| 3 |
* Copyright (C) 2005-2014 Team Kodi (https://kodi.tv) |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSE.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef ES_MPEGVIDEO_H |
| 10 |
#define ES_MPEGVIDEO_H |
| 11 |
|
| 12 |
#include "elementaryStream.h" |
| 13 |
|
| 14 |
namespace TSDemux |
| 15 |
{ |
| 16 |
class ES_MPEG2Video : public ElementaryStream |
| 17 |
{ |
| 18 |
private: |
| 19 |
uint32_t m_StartCode; |
| 20 |
bool m_NeedIFrame; |
| 21 |
bool m_NeedSPS; |
| 22 |
int m_FrameDuration; |
| 23 |
int m_vbvDelay; /* -1 if CBR */ |
| 24 |
int m_vbvSize; /* Video buffer size (in bytes) */ |
| 25 |
int m_Width; |
| 26 |
int m_Height; |
| 27 |
float m_Dar; |
| 28 |
int64_t m_DTS; |
| 29 |
int64_t m_PTS; |
| 30 |
int64_t m_AuDTS, m_AuPTS, m_AuPrevDTS; |
| 31 |
int m_TemporalReference; |
| 32 |
int m_TrLastTime; |
| 33 |
int m_PicNumber; |
| 34 |
int m_FpsScale; |
| 35 |
|
| 36 |
int Parse_MPEG2Video(uint32_t startcode, int buf_ptr, bool &complete); |
| 37 |
bool Parse_MPEG2Video_SeqStart(uint8_t *buf); |
| 38 |
bool Parse_MPEG2Video_PicStart(uint8_t *buf); |
| 39 |
|
| 40 |
public: |
| 41 |
ES_MPEG2Video(uint16_t pid); |
| 42 |
virtual ~ES_MPEG2Video(); |
| 43 |
|
| 44 |
virtual void Parse(STREAM_PKT* pkt); |
| 45 |
virtual void Reset(); |
| 46 |
}; |
| 47 |
} |
| 48 |
|
| 49 |
#endif /* ES_MPEGVIDEO_H */ |