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 | ||
ssotc_2011:grp4:start [2011/08/19 11:54] grp4 |
ssotc_2011:grp4:start [2011/08/22 02:23] (current) grp4 |
||
---|---|---|---|
Line 2: | Line 2: | ||
- Esa-Petri Tirkkonen | - Esa-Petri Tirkkonen | ||
- Hilmi Abdullah | - Hilmi Abdullah | ||
+ | |||
+ | | ||
+ | ===== Final Report===== | ||
+ | |||
+ | {{: | ||
+ | |||
===== Idea ===== | ===== Idea ===== | ||
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 18: | ||
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 | + | |
===== Code ===== | ===== Code ===== | ||
Line 82: | Line 88: | ||
""" | """ | ||
@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 118: | Line 124: | ||
| | ||
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 160: | Line 169: | ||
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 179: | Line 183: | ||
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 233: | Line 236: | ||
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 271: | Line 251: | ||
| | ||
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 301: | Line 275: | ||
| | ||
| | ||
- | if __name__ == " | + | if __name__ == " |
- | | + | |
app = MeHear() | app = MeHear() | ||
app.main() | app.main() | ||
+ | #EOF | ||
</ | </ | ||
- | + | Cleaned | |
- | Upload and attach your project **source | + | {{: |
- | * Clean up compiled binary files before making package | + | |
- | * Use .zip format | + | |
| | ||
+ | ===== Presentation===== | ||
+ | |||
+ | {{: | ||
+ | |||
===== Conclusion ===== | ===== Conclusion ===== | ||