Home | History | Annotate | Download | only in JetCreator
      1 """
      2  File:  
      3  JetDebug.py
      4  
      5  Contents and purpose:
      6  Dumps info from various jet file structures for debugging
      7  
      8  Copyright (c) 2008 Android Open Source Project
      9  
     10  Licensed under the Apache License, Version 2.0 (the "License");
     11  you may not use this file except in compliance with the License.
     12  You may obtain a copy of the License at
     13  
     14       http://www.apache.org/licenses/LICENSE-2.0
     15  
     16  Unless required by applicable law or agreed to in writing, software
     17  distributed under the License is distributed on an "AS IS" BASIS,
     18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     19  See the License for the specific language governing permissions and
     20  limitations under the License.
     21 """
     22 
     23 from JetUtils import *
     24 
     25 def DumpEvent(evt):
     26     print("event_name: %s" % evt.event_name)
     27     print("event_type: %s" % evt.event_type)
     28     print("event_id: %d" % evt.event_id)
     29     print("track_num: %d" % evt.track_num)
     30     print("channel_num: %d" % evt.channel_num)
     31     print("event_start: %s" % evt.event_start)
     32     print("event_end: %s" % evt.event_end)
     33     
     34 def DumpQueueSeg(queueSeg):
     35     print("name: %s" % queueSeg.name)
     36     print("userID: %d" % queueSeg.userID)
     37     print("seg_num: %d" % queueSeg.seg_num)
     38     print("dls_num: %d" % queueSeg.dls_num)
     39     print("repeat: %d" % queueSeg.repeat)
     40     print("transpose: %d" % queueSeg.transpose)
     41     print("mute_flags: %d" % queueSeg.mute_flags)
     42 
     43 def DumpSegments1(segments): 
     44     for segment in segments:
     45         DumpSegment(segment)
     46         
     47 def DumpSegment(segment):
     48         print("userID: %d" % segment.userID)
     49         print("name: %s" % segment.name)
     50         print("seg_num: %d" % segment.seg_num)
     51         print("dls_num: %d" % segment.dls_num)
     52         print("repeat: %d" % segment.repeat)
     53         print("transpose: %d" % segment.transpose)
     54         print("mute_flags: %d" % segment.mute_flags)
     55     
     56 def DumpSegments(segments): 
     57     for segment in segments:
     58         DumpSegment1(segment)
     59         
     60 def DumpSegment1(segment):
     61     print(segment.segname)
     62     print(segment.filename)
     63     print(segment.start)
     64     print(segment.end)
     65     print(segment.length)
     66     print(segment.output)
     67     print(segment.quantize)
     68     print(segment.dlsfile)
     69     print(segment.dump_file)
     70 
     71      
     72