| 1 |
/* |
| 2 |
* Copyright (C) 2006-2008 Team MediaPortal |
| 3 |
* http://www.team-mediaportal.com |
| 4 |
* |
| 5 |
* This Program is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2, or (at your option) |
| 8 |
* any later version. |
| 9 |
* |
| 10 |
* This Program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with GNU Make; see the file COPYING. If not, write to |
| 17 |
* the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, |
| 18 |
* MA 02110-1335 USA |
| 19 |
* http://www.gnu.org/copyleft/gpl.html |
| 20 |
* |
| 21 |
*/ |
| 22 |
#pragma once |
| 23 |
|
| 24 |
namespace MPTV |
| 25 |
{ |
| 26 |
class CTsHeader |
| 27 |
{ |
| 28 |
public: |
| 29 |
CTsHeader(); |
| 30 |
CTsHeader(byte* tsPacket); |
| 31 |
virtual ~CTsHeader(void); |
| 32 |
void Decode(byte *data); |
| 33 |
void LogHeader(); |
| 34 |
bool PayLoadOnly(); |
| 35 |
bool AdaptionFieldOnly(); |
| 36 |
bool AdaptionFieldAndPayLoad(); |
| 37 |
|
| 38 |
byte SyncByte; |
| 39 |
bool TransportError; |
| 40 |
bool PayloadUnitStart; |
| 41 |
bool TransportPriority; |
| 42 |
unsigned short Pid; |
| 43 |
byte TScrambling; |
| 44 |
byte AdaptionControl; |
| 45 |
byte ContinuityCounter; |
| 46 |
byte AdaptionFieldLength; |
| 47 |
byte PayLoadStart; |
| 48 |
bool HasAdaptionField; |
| 49 |
bool HasPayload; |
| 50 |
private: |
| 51 |
byte* m_packet; |
| 52 |
}; |
| 53 |
} |
| 54 |
|