Debian Codegraph @

src/lib/tsreader/PacketSync.h

raw
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 #define TS_PACKET_SYNC 0x47
25 #define TS_PACKET_LEN 188
26
27 #include "os-dependent.h"
28
29 namespace MPTV
30 {
31 class CPacketSync
32 {
33 public:
34 CPacketSync(void);
35
36 public:
37 virtual ~CPacketSync(void);
38 void OnRawData(byte* pData, size_t nDataLen);
39 virtual void OnTsPacket(byte* tsPacket);
40 void Reset(void);
41
42 private:
43 byte m_tempBuffer[200];
44 ssize_t m_tempBufferPos;
45 };
46 }