Changeset 2083 for pjproject/trunk


Ignore:
Timestamp:
Jun 27, 2008 10:47:33 PM (16 years ago)
Author:
nanang
Message:

Removed userdata param in callback funcs of mod_media_playrec.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/test-pjsua/mod_media_playrec.py

    r2078 r2083  
    3131 
    3232# Test body function 
    33 def test_func(t, ud): 
     33def test_func(t): 
    3434        global input_filename 
    3535        global output_filename 
     
    3838         
    3939        # Get input file name 
    40         ud.input_filename = re.compile(const.MEDIA_PLAY_FILE).search(endpt.inst_param.arg).group(1) 
    41         endpt.trace("Input file = " + ud.input_filename) 
     40        input_filename = re.compile(const.MEDIA_PLAY_FILE).search(endpt.inst_param.arg).group(1) 
     41        endpt.trace("Input file = " + input_filename) 
    4242 
    4343        # Get output file name 
    44         ud.output_filename = re.compile(const.MEDIA_REC_FILE).search(endpt.inst_param.arg).group(1) 
    45         endpt.trace("Output file = " + ud.output_filename) 
     44        output_filename = re.compile(const.MEDIA_REC_FILE).search(endpt.inst_param.arg).group(1) 
     45        endpt.trace("Output file = " + output_filename) 
    4646 
    4747        # Find appropriate clock rate for the input file 
    48         clock_rate = re.compile(".+(\.\d+\.wav)$").match(ud.output_filename).group(1) 
     48        clock_rate = re.compile(".+(\.\d+\.wav)$").match(output_filename).group(1) 
    4949        if (clock_rate==None): 
    5050                endpt.trace("Cannot compare input & output, incorrect output filename format") 
    5151                return 
    52         ud.input_filename = re.sub("\.\d+\.wav$", clock_rate, ud.input_filename) 
    53         endpt.trace("WAV file to be compared with output = " + ud.input_filename) 
     52        input_filename = re.sub("\.\d+\.wav$", clock_rate, input_filename) 
     53        endpt.trace("WAV file to be compared with output = " + input_filename) 
    5454 
    5555        # Connect input-output file 
     
    7070 
    7171# Post body function 
    72 def post_func(t, ud): 
     72def post_func(t): 
    7373        global input_filename 
    7474        global output_filename 
     
    7777 
    7878        # Check WAV similarity 
    79         fullcmd = COMPARE_WAV_EXE + " " + ud.input_filename + " " + ud.output_filename + " " + "3000" 
     79        fullcmd = COMPARE_WAV_EXE + " " + input_filename + " " + output_filename + " " + "3000" 
    8080        endpt.trace("Popen " + fullcmd) 
    8181        cmp_proc = subprocess.Popen(fullcmd, stdout=subprocess.PIPE, universal_newlines=True) 
Note: See TracChangeset for help on using the changeset viewer.