1 # almclient-transcoder.tcl --
2 #
3 # FIXME: This file needs a description here.
4 #
5 # Copyright (c) 1998-2002 The Regents of the University of California.
6 # All rights reserved.
7 #
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are met:
10 #
11 # A. Redistributions of source code must retain the above copyright notice,
12 # this list of conditions and the following disclaimer.
13 # B. Redistributions in binary form must reproduce the above copyright notice,
14 # this list of conditions and the following disclaimer in the documentation
15 # and/or other materials provided with the distribution.
16 # C. Neither the names of the copyright holders nor the names of its
17 # contributors may be used to endorse or promote products derived from this
18 # software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
24 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 import AnnounceListenManager/AS/Client
32
33 Class AnnounceListenManager/AS/Client/Transcoder/Video -superclass \
34 AnnounceListenManager/AS/Client
35
36
37
38 AnnounceListenManager/AS/Client/Transcoder/Video instproc \
39 init {agent megactrl {srv_loc {}} {bw 500} } {
40 $self instvar m_agent
41 $self instvar service_instance_
42
43 if { $srv_loc == {} } {
44 set srv_loc "static:transcoder"
45 }
46
47 $self next $megactrl $bw $srv_loc
48
49 set service_instance_ "[pid]:[localaddr]:transcoder"
50 set m_agent $agent
51 }
52
53
54 AnnounceListenManager/AS/Client/Transcoder/Video instproc service_name {} {
55 #puts "service_name"
56 return Transcoder/Video
57 }
58
59 AnnounceListenManager/AS/Client/Transcoder/Video instproc service_instance {} {
60 $self instvar service_instance_
61 return $service_instance_
62 }
63
64 AnnounceListenManager/AS/Client/Transcoder/Video instproc agent_data {} {
65 #puts "agent_data"
66 $self instvar ssd_
67
68 set aTranscoderInfo(InputSession) "224.24.24.24/24242"
69 set aTranscoderInfo(OutputSession) "225.25.25.25/25252"
70
71 set aTranscoderInfo(SourceList) ""
72 set aTranscoderInfo(Default) "128000 H261"
73
74 set msg [list [array get aTranscoderInfo]]
75
76 # append msg "Seqno $ssd_(seqno)\n"
77 # append msg "Filename $ssd_(filename)\n"
78 # append msg "Offset $ssd_(offset)\n"
79 # append msg "ClientAddr $ssd_(localaddr)\n"
80 # append msg "UnicastPort $ssd_(unicast_port)\n"
81
82 return $msg
83 }
84
85
86
87 AnnounceListenManager/AS/Client/Transcoder/Video instproc register { atype aspec addr \
88 srv_name srv_inst msg } {
89 }
90
91
92 AnnounceListenManager/AS/Client/Transcoder/Video instproc unregister { atype aspec addr \
93 srv_name srv_inst msg } {
94 }
95
96
97 AnnounceListenManager/AS/Client/Transcoder/Video instproc recv_msg { atype aspec addr srv_name srv_loc srv_inst ssg_port msg } {
98 puts "alm/client/transcoder:recv_msg-$msg"
99
100 $self instvar m_agent
101 $self instvar service_instance_
102
103 if {$srv_inst != $service_instance_} {
104 return
105 }
106
107 if {[string length $msg] > 0} {
108 $m_agent ReceiveMessage $msg
109 }
110
111 }
112
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.