meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
ssotc_2011:grp4:start [2011/08/19 12:12] grp4 [Screenshots] |
ssotc_2011:grp4:start [2011/08/19 12:40] grp4 |
||
---|---|---|---|
Line 6: | Line 6: | ||
Using phone as hearing aid for old people (and not so old). Using phone' | Using phone as hearing aid for old people (and not so old). Using phone' | ||
+ | |||
===== Result ===== | ===== Result ===== | ||
Line 11: | Line 12: | ||
We managed to do application which uses Gstreamer to stream straight from mic to ear plugs. It has also a compressor to make audio audible. Problem is just that volume or compressor is not controllable. Whole code would be needed to be rearranged to get buttons and knobs to do some thing. Propaply using gstreamers commandline version but that's other story | We managed to do application which uses Gstreamer to stream straight from mic to ear plugs. It has also a compressor to make audio audible. Problem is just that volume or compressor is not controllable. Whole code would be needed to be rearranged to get buttons and knobs to do some thing. Propaply using gstreamers commandline version but that's other story | ||
===== Screenshots ===== | ===== Screenshots ===== | ||
- | + | {{: | |
- | None yet | + | |
- | ===== Screenshots ===== | + | |
- | + | ||
- | None yet | + | |
===== Code ===== | ===== Code ===== | ||
Line 85: | Line 82: | ||
""" | """ | ||
@attention: this is important it initializes softfare playtrought (audioconvert is not nesesity) | @attention: this is important it initializes softfare playtrought (audioconvert is not nesesity) | ||
- | @summary: takes stream from mic to autosink | + | @summary: takes stream from mic to autosink |
""" | """ | ||
self.pipeline = gst.parse_launch(""" | self.pipeline = gst.parse_launch(""" | ||
Line 121: | Line 118: | ||
| | ||
self.audiosink = gst.element_factory_make(" | self.audiosink = gst.element_factory_make(" | ||
+ | """ | ||
+ | @attention: intance of record class is created here and gstreamer started. | ||
+ | """ | ||
self.recorder=Record(self.audiosink) | self.recorder=Record(self.audiosink) | ||
""" | """ | ||
Line 163: | Line 163: | ||
class MeHear(hildon.Program): | class MeHear(hildon.Program): | ||
def __init__(self): | def __init__(self): | ||
+ | """ | ||
+ | @summary: creates an intance of pleyer class and that why starts also gsteamer | ||
+ | """ | ||
self.pl= player() | self.pl= player() | ||
- | # def record_button_clicked(self, | + | |
- | # buttontext = button.get_label() | + | |
- | # text = buttontext | + | |
- | # if text == " | + | |
- | # label.set_text(text+" | + | |
- | # button.set_label(" | + | |
- | # print " | + | |
- | # | + | |
- | # if text == " | + | |
- | # button.set_label(" | + | |
- | # print "Stop button pressed" | + | |
def addvol_button_clicked(self, | def addvol_button_clicked(self, | ||
+ | #this changes the value of adjustment and thats why changes also progress bars value as it is linked to adjesment | ||
a=self.adjus.get_value() | a=self.adjus.get_value() | ||
self.adjus.set_value(a+10) | self.adjus.set_value(a+10) | ||
Line 182: | Line 177: | ||
print " | print " | ||
| | ||
- | |||
- | | ||
def decvol_button_clicked(self, | def decvol_button_clicked(self, | ||
+ | #this changes the value of adjustment and thats why changes also progress bars value as it is linked to adjesment | ||
a=self.adjus.get_value() | a=self.adjus.get_value() | ||
self.adjus.set_value(a-10) | self.adjus.set_value(a-10) | ||
Line 236: | Line 230: | ||
buttonGTK = gtk.ToggleButton(" | buttonGTK = gtk.ToggleButton(" | ||
buttonGTK.connect(" | buttonGTK.connect(" | ||
- | |||
- | |||
- | |||
- | | ||
- | #this changes the value of progres bar | ||
- | # | ||
- | |||
- | | ||
- | | ||
- | | ||
- | #a= gtk.CheckButton(" | ||
- | # | ||
- | | ||
- | #b= gtk.ToggleButton(" | ||
- | # | ||
- | | ||
- | #c = gtk.RadioButton(None, | ||
- | # | ||
- | | ||
- | #adjus = gtk.Adjustment(value=60, | ||
- | #d = gtk.SpinButton(adjustment= adjus, climb_rate=0.1, | ||
- | # | ||
- | #hscrollbar = gtk.HSscrollbar(adjustment) | ||
| | ||
self.ratiotext= gtk.Label(" | self.ratiotext= gtk.Label(" | ||
Line 274: | Line 245: | ||
| | ||
self.volumetext= gtk.Label(" | self.volumetext= gtk.Label(" | ||
- | # Create a centering alignment object | ||
- | #align = gtk.Alignment(0.5 ,0.5, 0, 0) | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
hbox3.pack_start(self.ratiotext, | hbox3.pack_start(self.ratiotext, | ||
hbox3.pack_start(combo, | hbox3.pack_start(combo, | ||
Line 304: | Line 269: | ||
| | ||
| | ||
- | if __name__ == " | + | if __name__ == " |
- | | + | |
app = MeHear() | app = MeHear() | ||
app.main() | app.main() | ||
+ | #EOF | ||
</ | </ | ||
+ | Uncleaned code whit some examples | ||
- | Upload and attach your project **source code** package here. | ||
- | * Clean up compiled binary files before making package | ||
- | * Use .zip format | ||
| | ||
+ | ===== Presentation===== | ||
+ | |||
+ | {{: | ||
+ | |||
===== Conclusion ===== | ===== Conclusion ===== | ||