1 # sources should contains a list of ip address patterns for the sources
2 # that we are interested in.
3
4 sources *
5
6 # Maximum number of source
7
8 max_num_of_sources 2
9
10 # This is the session we are interested in
11
12 input_session 224.4.5.6/4444/16
13
14 # This is the description of the program
15
16 description {A transcoder that transcode a source into H261 formats}
17
18 # These are the variables that hooks the input video to the dali program
19
20 input_frame {in inW inH}
21 output_frame {out outW outH}
22
23 # Specifies the output format of the degas program. Can be either H261/JPEG
24
25 output_format {JPEG}
26
27 # Specifies the output size of the output video. Can be either "QCIF", "CIF",
28 # "SCIF", "PAL", "1/4 PAL", "1/16 PAL", "NTSC", "1/4 NTSC", "1/16 NTSC".
29
30 output_size {1/16 NTSC}
31
32 # Output rate
33
34 output_fps {5}
35
36 # A unique string that helps identify the source. For example if there are
37 # more than one source, we can use an array of frames, indexed by the
38 # source_id.
39
40 source_id {src}
41
42 # For server to check if they are eligible to provide service.
43
44 precondition { }
45 server_responds { }
46
47 # List of Dali packages required by this program
48
49 packages {DvmByteGeom}
50
51 # All the following are dali programs
52
53 init_callback {
54 set num_of_source 0
55 set src_list {}
56 set clip [frame_clip $out 8 8 80 60]
57 }
58
59 output_resize_callback {
60 puts "output resized!"
61 frame_free clip
62 set clip [frame_clip $out 8 8 [expr $outW/4] [expr $outH/4]]
63 }
64
65 output_grayed_callback {
66 puts "output grayed!"
67 frame_free clip
68 set clip [frame_clip $out 8 8 [expr $outW/4] [expr $outH/4]]
69 }
70
71 new_source_callback {
72 puts stderr "New source $src detected"
73 incr num_of_source
74 lappend src_list $src
75 set sw [frame_get_w_subsample $in($src)]
76 set sh [frame_get_h_subsample $in($src)]
77 set f($src) [frame_new $inW($src) $inH($src) $sw $sh]
78 }
79
80 del_source_callback {
81 frame_free f($src)
82 }
83
84 recv_frame_callback {
85 if {$num_of_source == 1} {
86 frame_scale in($src) out
87 } else {
88 frame_copy in($src) f($src)
89 set s1 [lindex $src_list 0]
90 set s2 [lindex $src_list 1]
91 frame_scale f($s1) out
92 frame_scale f($s2) clip
93 }
94 }
95
96 mouse_click_callback {
97 set s1 [lindex $src_list 0]
98 set s2 [lindex $src_list 1]
99 set src_list [lreplace $src_list 0 0 $s2]
100 set src_list [lreplace $src_list 1 1 $s1]
101 }
102
103 destroy_callback {
104 frame_free clip
105 }
106
107 # The following is not supported yet.
108 input_resize_callback {
109 puts "input $src resize : $inW($src) x $inH($src)"
110 }
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.