Changeset 204
- Timestamp:
- 01/04/08 12:08:38
(8 months ago)
- Author:
- sip
- Message:
Fixes last revision changes
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r202 |
r204 |
|
| 178 | 178 | flag.Clear(); |
|---|
| 179 | 179 | |
|---|
| | 180 | //Header clear |
|---|
| | 181 | header.Clear(); |
|---|
| | 182 | |
|---|
| 180 | 183 | //Change state |
|---|
| 181 | 184 | state = HEAD; |
|---|
| … | … | |
| 190 | 193 | return; |
|---|
| 191 | 194 | |
|---|
| 192 | | //Is the header correct? |
|---|
| 193 | | if (!header.IsValid()) |
|---|
| | 195 | //Is the header correct? And it's not stuffing ? |
|---|
| | 196 | if (!header.IsValid() || !header.mpl) |
|---|
| 194 | 197 | { |
|---|
| 195 | | //Clean the header |
|---|
| 196 | | header.Clear(); |
|---|
| 197 | 198 | //Reset state |
|---|
| 198 | 199 | state = NONE; |
|---|
| … | … | |
| 201 | 202 | } |
|---|
| 202 | 203 | |
|---|
| 203 | | //Append info |
|---|
| 204 | | if (header.mpl!=0) |
|---|
| 205 | | //Log header |
|---|
| 206 | | log->SetDemuxInfo(-6,"mc%.1dl%.2x",header.mc,header.mpl); |
|---|
| | 204 | //Log header |
|---|
| | 205 | log->SetDemuxInfo(-6,"mc%.1dl%.2x",header.mc,header.mpl); |
|---|
| 207 | 206 | |
|---|
| 208 | 207 | //We have a good header go for the pdu |
|---|
| … | … | |
| 226 | 225 | return; |
|---|
| 227 | 226 | |
|---|
| 228 | | //Set end PDU if not stuffing |
|---|
| 229 | | if(header.mpl) |
|---|
| 230 | | EndPDU(flag); |
|---|
| | 227 | //End the pdu |
|---|
| | 228 | EndPDU(flag); |
|---|
| 231 | 229 | |
|---|
| 232 | 230 | //If the flag is valid |
|---|
| r202 |
r204 |
|
| 38 | 38 | |
|---|
| 39 | 39 | //Calculate the golay code |
|---|
| 40 | | DWORD golay = buffer[2] << 16 | buffer[1] << 8 | buffer[0]; |
|---|
| | 40 | DWORD golay = ((DWORD)buffer[2] << 16 | (DWORD)buffer[1] << 8 | buffer[0]) & 0xFFF; |
|---|
| 41 | 41 | |
|---|
| 42 | 42 | //Decode it |
|---|
| … | … | |
| 50 | 50 | //Get the values |
|---|
| 51 | 51 | mc = code & 0x0F; |
|---|
| 52 | | mpl = code >> 4; |
|---|
| | 52 | mpl = (code >> 4 ) & 0xFF; |
|---|
| 53 | 53 | |
|---|
| 54 | 54 | //Good header |
|---|
| 55 | 55 | return 1; |
|---|
| 56 | | |
|---|
| 57 | 56 | } |
|---|
| 58 | 57 | |
|---|
| … | … | |
| 93 | 92 | buffer[0] = 0; |
|---|
| 94 | 93 | buffer[1] = 0; |
|---|
| | 94 | buffer[2] = 0; |
|---|
| 95 | 95 | |
|---|
| 96 | 96 | //And the length |
|---|
| r198 |
r204 |
|
| 3 | 3 | |
|---|
| 4 | 4 | #include <ptlib.h> |
|---|
| | 5 | #include <assert.h> |
|---|
| 5 | 6 | |
|---|
| 6 | 7 | #ifndef WIN32 |
|---|
| r201 |
r204 |
|
| 39 | 39 | Media.cpp \ |
|---|
| 40 | 40 | H245LogicalChannelRate.cpp \ |
|---|
| 41 | | H245ModeRequest.cpp |
|---|
| | 41 | H245ModeRequest.cpp |
|---|
| 42 | 42 | |
|---|
| 43 | 43 | |
|---|
| r71 |
r204 |
|
| 2 | 2 | LDFLAGS = `ptlib-config --libs` |
|---|
| 3 | 3 | |
|---|
| 4 | | all: h223dump reverse h223read h245test if2amr amr2if |
|---|
| | 4 | all: h223dump reverse h223read if2amr amr2if |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | h223read: h223read.o ../libh324m.a |
|---|
| … | … | |
| 10 | 10 | g++ -o h223dump h223dump.o ../libh324m.a $(LDFLAGS) |
|---|
| 11 | 11 | |
|---|
| 12 | | reverse: reverse.o ../bits.o |
|---|
| 13 | | g++ -o reverse reverse.o ../bits.o |
|---|
| | 12 | reverse: reverse.o |
|---|
| | 13 | g++ -o reverse reverse.o |
|---|
| 14 | 14 | |
|---|
| 15 | | if2amr: if2amr.o ../bits.o |
|---|
| 16 | | g++ -o if2amr if2amr.o ../bits.o |
|---|
| | 15 | if2amr: if2amr.o |
|---|
| | 16 | g++ -o if2amr if2amr.o |
|---|
| 17 | 17 | |
|---|
| 18 | | amr2if: amr2if.o ../bits.o |
|---|
| 19 | | g++ -o amr2if amr2if.o ../bits.o |
|---|
| 20 | | |
|---|
| 21 | | h245test: h245test.o |
|---|
| 22 | | g++ -o h245test h245test.o ../libh324m.a $(LDFLAGS) |
|---|
| | 18 | amr2if: amr2if.o |
|---|
| | 19 | g++ -o amr2if amr2if.o |
|---|
| 23 | 20 | |
|---|
| 24 | 21 | clean: |
|---|
| r76 |
r204 |
|
| 1 | | extern "C" { |
|---|
| 2 | | #include "../bits.h" |
|---|
| 3 | | } |
|---|
| 4 | 1 | #include <stdio.h> |
|---|
| 5 | 2 | #include <stdlib.h> |
|---|
| … | … | |
| 8 | 5 | #include <fcntl.h> |
|---|
| 9 | 6 | #include <unistd.h> |
|---|
| | 7 | #include "../../bits.c" |
|---|
| 10 | 8 | |
|---|
| 11 | 9 | static short blockSize[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, -1, -1, -1, -1, -1, -1, -1}; |
|---|
| r80 |
r204 |
|
| 1 | | extern "C" { |
|---|
| 2 | | #include "../bits.h" |
|---|
| 3 | | } |
|---|
| 4 | 1 | #include <stdio.h> |
|---|
| 5 | 2 | #include <stdlib.h> |
|---|
| … | … | |
| 8 | 5 | #include <fcntl.h> |
|---|
| 9 | 6 | #include <unistd.h> |
|---|
| | 7 | #include "../../bits.c" |
|---|
| 10 | 8 | |
|---|
| 11 | 9 | static short blockSize[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, -1, -1, -1, -1, -1, -1, -1}; |
|---|
| r13 |
r204 |
|
| 1 | | extern "C" { |
|---|
| 2 | | #include "../bits.h" |
|---|
| 3 | | } |
|---|
| 4 | 1 | #include <stdio.h> |
|---|
| 5 | 2 | #include <stdlib.h> |
|---|
| … | … | |
| 8 | 5 | #include <fcntl.h> |
|---|
| 9 | 6 | #include <unistd.h> |
|---|
| | 7 | #include "../../bits.c" |
|---|
| 10 | 8 | |
|---|
| 11 | 9 | int main(int argc, char** argv) |
|---|
Download in other formats:
|
|