13
|
1 |
/** |
|
2 |
* Java RTP Library (jlibrtp) |
|
3 |
* Copyright (C) 2006 Arne Kepp |
|
4 |
* |
|
5 |
* This library is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU Lesser General Public |
|
7 |
* License as published by the Free Software Foundation; either |
|
8 |
* version 2.1 of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This library 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 GNU |
|
13 |
* Lesser General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU Lesser General Public |
|
16 |
* License along with this library; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
18 |
*/ |
|
19 |
package jlibrtp; |
|
20 |
|
|
21 |
/** |
|
22 |
* This is a four-directional data structures used for |
|
23 |
* the frame buffer, i.e. buffer for pkts that need |
|
24 |
* to be assimilated into complete frames. |
|
25 |
* |
|
26 |
* All the actual work is done by PktBuffer. |
|
27 |
* |
|
28 |
* @author Arne Kepp |
|
29 |
* |
|
30 |
*/ |
|
31 |
public class PktBufNode { |
|
32 |
/** The next node (RTP Timestamp), looking from the back -> next means older */ |
|
33 |
protected PktBufNode nextFrameQueueNode = null; |
|
34 |
/** The previous node (RTP Timestmap), looking from the back -> prev means newer */ |
|
35 |
protected PktBufNode prevFrameQueueNode = null; |
|
36 |
/** The next node within the frame, i.e. higher sequence number, same RTP timestamp */ |
|
37 |
protected PktBufNode nextFrameNode = null; |
|
38 |
/** Number of packets with the same RTP timestamp */ |
|
39 |
protected int pktCount; |
|
40 |
/** The RTP timeStamp associated with this node */ |
|
41 |
protected long timeStamp; |
|
42 |
/** The sequence number associated with this node */ |
|
43 |
protected int seqNum; |
|
44 |
/** The payload, a parsed RTP Packet */ |
|
45 |
protected RtpPkt pkt = null; |
|
46 |
|
|
47 |
/** |
|
48 |
* Create a new packet buffer node based on a packet |
|
49 |
* @param aPkt the packet |
|
50 |
*/ |
|
51 |
protected PktBufNode(RtpPkt aPkt) { |
|
52 |
pkt = aPkt; |
|
53 |
timeStamp = aPkt.getTimeStamp(); |
|
54 |
seqNum = aPkt.getSeqNumber(); |
|
55 |
pktCount = 1; |
|
56 |
} |
|
57 |
} |