~ubuntu-branches/ubuntu/utopic/gpac/utopic-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
InitialObjectDescriptor {
 objectDescriptorID 1
 audioProfileLevelIndication 255
 visualProfileLevelIndication 254
 sceneProfileLevelIndication 1
 graphicsProfileLevelIndication 1
 ODProfileLevelIndication 1
 esDescr [
  ES_Descriptor {
   ES_ID 1
   decConfigDescr DecoderConfigDescriptor {
    streamType 3
    decSpecificInfo BIFSConfig {
     isCommandStream true
     pixelMetric true
     pixelWidth 400
     pixelHeight 300
    }
   }
  }
  ES_Descriptor {
   ES_ID 2
   decConfigDescr DecoderConfigDescriptor {
    streamType 1
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info [
    "This test shows usage of the InputSensor node to detect keys and trigger of events"
    "The InputSensor in this case has a url which points to a specific pseudo-media object. This object contains one stream, called interaction stream."
    "This stream is made of Device Data Frame whose content is specialized depending on the kind of input device."
    "The InputSensor node in the scene specifies how to dispatch the content of the DDF."
    "For each piece of information in the DDF, a REPLACE command is associated."
    "The value of the target property is replaced by the associated content from the DDF."
    "" 
    "If the configuration of the stream says 'StringSensor', like here, the input device is a keyboard and the DDF content is as follows:"
    "- the string being edited/input," 
    "and the previous string after final editing (return key)"
    "In this example, the target nodes are Text nodes which display the string being edited and the final one." 
    "" 
    "GPAC Regression Tests" "$Date: 2007/07/27 09:46:07 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "InputSensor Node for detecting string input (StringSensor)"
  }
  Transform2D {
   children [
    Shape {
     appearance DEF APP Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry Text {
      string ["StringSensor"]
      fontStyle FontStyle {
       justify ["MIDDLE" "MIDDLE"]
       size 30
      }
     }
    }
   ]
  }
  Transform2D {
   translation -50 -30
   children [
    Shape {
     appearance USE APP
     geometry Text {
      string ["enteredText"]
      fontStyle DEF FS FontStyle {
       justify ["MIDDLE" "MIDDLE"]
       size 20
      }
     }
    }
   ]
  }
  Transform2D {
   translation 90 -30
   children [
    Shape {
     appearance USE APP
     geometry DEF N3 Text {
      string [""]
      fontStyle USE FS
     }
    }
   ]
  }
  Transform2D {
   translation -50 -50
   children [
    Shape {
     appearance USE APP
     geometry Text {
      string ["finalText"]
      fontStyle USE FS
     }
    }
   ]
  }
  Transform2D {
   translation 90 -50
   children [
    Shape {
     appearance USE APP
     geometry DEF N2 Text {
      string [""]
      fontStyle USE FS
     }
    }
   ]
  }
  InputSensor {
   url [od:10]
   buffer {
    REPLACE N3.string[0] BY ""
    REPLACE N2.string[0] BY ""
   }
  }
 ]
}


AT 0 {
  UPDATE OD [
   ObjectDescriptor {
    objectDescriptorID 10
    esDescr [
     ES_Descriptor {
      ES_ID 5
      decConfigDescr DecoderConfigDescriptor {
       streamType 10
       decSpecificInfo UIConfig {
        deviceName "StringSensor"
       }
      }
     }
    ]
   }
  ]
}