Changeset 204

Show
Ignore:
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
  • libh324m/src/H223Demuxer.cpp

    r202 r204  
    178178                        flag.Clear(); 
    179179 
     180                        //Header clear 
     181                        header.Clear(); 
     182 
    180183                        //Change state 
    181184                        state = HEAD; 
     
    190193                                return; 
    191194         
    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
    194197                        { 
    195                                 //Clean the header 
    196                                 header.Clear(); 
    197198                                //Reset state 
    198199                                state = NONE; 
     
    201202                        } 
    202203 
    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); 
    207206 
    208207                        //We have a good header go for the pdu 
     
    226225                                return; 
    227226 
    228                         //Set end PDU if not stuffing 
    229                         if(header.mpl) 
    230                                 EndPDU(flag); 
     227                        //End the pdu 
     228                        EndPDU(flag); 
    231229 
    232230                        //If the flag is valid 
  • libh324m/src/H223Header.cpp

    r202 r204  
    3838 
    3939        //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
    4141 
    4242        //Decode it 
     
    5050        //Get the values 
    5151        mc  = code & 0x0F; 
    52         mpl = code >> 4
     52        mpl = (code >> 4 ) & 0xFF
    5353 
    5454        //Good header 
    5555        return 1; 
    56  
    5756} 
    5857 
     
    9392        buffer[0] = 0; 
    9493        buffer[1] = 0; 
     94        buffer[2] = 0; 
    9595 
    9696        //And the length 
  • libh324m/src/H324MConfig.h

    r198 r204  
    33 
    44#include <ptlib.h> 
     5#include <assert.h> 
    56 
    67#ifndef WIN32 
  • libh324m/src/Makefile

    r201 r204  
    3939        Media.cpp \ 
    4040        H245LogicalChannelRate.cpp \ 
    41         H245ModeRequest.cpp 
     41        H245ModeRequest.cpp  
    4242         
    4343 
  • libh324m/src/test/Makefile

    r71 r204  
    22LDFLAGS = `ptlib-config --libs` 
    33 
    4 all: h223dump reverse h223read h245test if2amr amr2if 
     4all: h223dump reverse h223read if2amr amr2if 
    55 
    66h223read: h223read.o ../libh324m.a 
     
    1010        g++ -o h223dump h223dump.o ../libh324m.a $(LDFLAGS) 
    1111 
    12 reverse: reverse.o ../bits.o 
    13         g++ -o reverse reverse.o ../bits.o 
     12reverse: reverse.o  
     13        g++ -o reverse reverse.o  
    1414 
    15 if2amr: if2amr.o ../bits.o 
    16         g++ -o if2amr if2amr.o ../bits.o 
     15if2amr: if2amr.o  
     16        g++ -o if2amr if2amr.o  
    1717 
    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) 
     18amr2if: amr2if.o 
     19        g++ -o amr2if amr2if.o 
    2320 
    2421clean: 
  • libh324m/src/test/amr2if.cpp

    r76 r204  
    1 extern "C" { 
    2         #include "../bits.h" 
    3 } 
    41#include <stdio.h> 
    52#include <stdlib.h> 
     
    85#include <fcntl.h> 
    96#include <unistd.h> 
     7#include "../../bits.c" 
    108 
    119static short blockSize[16] = { 12, 13, 15, 17, 19, 20, 26, 31,  5, -1, -1, -1, -1, -1, -1, -1}; 
  • libh324m/src/test/if2amr.cpp

    r80 r204  
    1 extern "C" { 
    2         #include "../bits.h" 
    3 } 
    41#include <stdio.h> 
    52#include <stdlib.h> 
     
    85#include <fcntl.h> 
    96#include <unistd.h> 
     7#include "../../bits.c" 
    108 
    119static short blockSize[16] = { 12, 13, 15, 17, 19, 20, 26, 31,  5, -1, -1, -1, -1, -1, -1, -1}; 
  • libh324m/src/test/reverse.cpp

    r13 r204  
    1 extern "C" { 
    2         #include "../bits.h" 
    3 } 
    41#include <stdio.h> 
    52#include <stdlib.h> 
     
    85#include <fcntl.h> 
    96#include <unistd.h> 
     7#include "../../bits.c" 
    108 
    119int main(int argc, char** argv)  
Copyright 2006 - Sergio García Murillo
Powered by Trac - Edgewall Software