Thursday, 2013-07-18

*** tpb has joined #timvideos00:00
*** iiie0 has quit IRC01:24
*** mithro has joined #timvideos03:50
*** hyades_ has quit IRC03:51
*** mithro has quit IRC04:54
*** mithro-work has quit IRC05:13
*** mithro-work has joined #timvideos05:13
*** hyades has joined #timvideos05:20
*** iiie has joined #timvideos06:19
mithro-workSewar, ping?07:51
Sewarmithro-work: pong07:52
mithro-workSewar, so how are things going?07:52
mithro-workiiie, ping?07:52
Sewargood, working on unittests07:53
mithro-workare you and iiie having regular meetings?07:53
Sewarno07:55
mithro-workhyades, ping?07:55
mithro-workSewar, you and him should get on top of that07:55
mithro-workI'd recommend a minimum of 1 video call a week07:55
Sewarok07:56
SewarI will start working on edid_grabber after midterm evaluation07:57
mithro-workSo when can we put the website up?08:04
SewarI think it's ready now08:07
mithro-workso, how should we deploy it?08:10
Sewarhttps://github.com/sydney-linux-user-group/slug#production-deployment ?08:12
tpb<http://ln-s.net/-Vci> (at github.com)08:12
hyadesmithro-work: hey08:14
mithro-workhyades, you need to log a support request as your repository isn't showing up in search08:15
hyadessupport request?08:16
mithro-workGitHub08:17
hyadesso what i do so that shows up in search?08:19
mithro-workIf I search at https://github.com/search?q=gst-switch08:20
tpbTitle: Search · gst-switch · GitHub (at github.com)08:20
mithro-workyour repository doesn't show up08:20
hyadesthe repos forked from gst-switch will come?08:21
hyadeseven timvideos/gst-switch is not cmng08:22
mithro-workyes, I'm pretty sure they should show up....08:22
Sewarhttps://github.com/search?q=gst-switch+fork%3Atrue08:23
tpb<http://ln-s.net/-Vco> (at github.com)08:23
mithro-workwell08:24
mithro-worklooks like it works then :)08:24
mithro-workhyades, a bunch of things about your unittests08:24
hyadesya08:24
mithro-workand code in general08:24
mithro-workin python "private" variables are written as "self._blah"08:25
hyadesyes08:25
mithro-workyou should also look up properties08:25
mithro-workwe don't do setters/getters in python08:25
mithro-workso08:26
hyadesk..i  will remove them and convert all those variables to private08:26
mithro-workget_compose_port/set_compose_port08:26
mithro-workshould really be a property08:26
mithro-workIn Python we don't test for types either08:27
mithro-workwe just try and do something08:27
mithro-workand deal with the failure08:27
hyadesok08:27
mithro-work    def set_address(self, address):08:28
mithro-work        """Sets the bus address08:28
mithro-work        :param address: New bus address08:28
mithro-work        :returns: nothing08:28
mithro-work        """08:28
mithro-work        self.ADDRESS = address08:28
mithro-workwhy does this exist?08:28
mithro-workas well08:28
mithro-work    def __init__(self):08:28
mithro-work        super(DBus, self).__init__()08:28
mithro-workthat code does nothing08:28
*** shenki_ is now known as shenki08:29
hyadeshm08:30
hyadesi'll remove all code which "sets" and "gets"08:31
hyadesthe blank init thing will be solved once i remove the set methods08:36
hyadesthings like self.VIDEO_PORT should be private?08:41
hyadesi put them coz it will be easier to debug08:41
mithro-workSorry I was at dinner09:38
mithro-workVIDEO_PORT is use by anything apart from your code?09:38
mithro-workPython has no concept of private/protected09:38
mithro-worknothing stops you from accessing the _XXX variable except convention09:39
hyadesyeah09:40
hyadesdo i need private variables?09:45
mithro-workwhat do you mean?09:45
hyadesi am a bit confused now :\09:46
mithro-workin what way?09:46
hyadesi just set these variables in constructors?09:47
hyadesand should i do __VIDEO_PORT?09:48
mithro-workLooking at gst-switch / python-api / gstswitch / dbus.py09:49
mithro-workwhat does this actually do?09:49
mithro-workThe only useful function seems to be connect_dbus ?09:49
hyadesya09:49
hyadesi will dump that method into connection.py09:50
mithro-workSo Python has the following "conventions" when naming things09:50
mithro-workUPPERCASE == constant09:51
mithro-work_single_leading_underscore: weak "internal use" indicator.09:51
hyadesoh09:52
mithro-workAlmost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition.09:52
mithro-workhttp://www.python.org/dev/peps/pep-0008/#naming-conventions09:52
tpbTitle: PEP 8 -- Style Guide for Python Code (at www.python.org)09:52
mithro-workI highly recommend adding a Makefile which runs both pylint and pep8 over your code09:56
mithro-workmuch easier to pick up style issues automagically rather then manually09:57
mithro-work        with open(os.devnull, 'w') as tempf:09:58
mithro-work            process = subprocess.Popen(cmd.split(), stdout=tempf, stderr=tempf,  bufsize=-1, shell=False)09:58
mithro-workThat is not really a good use of with09:58
mithro-workJust use something like09:59
mithro-workdevnull = open(os.devnull, 'w')09:59
mithro-workdon't use bare "except:" - always specific what you are trying to catch09:59
hyadesk10:00
mithro-workThat is part of pep8 too10:00
hyadessomethings like10:00
hyadescreating a process10:00
hyadeswhich can fail due to many reasons10:00
hyadesi cannot catch what causes exception10:00
mithro-workeither10:02
hyadeshere should i just use like except RuntimeError10:02
mithro-workyou can deal with the error (and hence you know what type of error is occuring)10:02
mithro-workor you can't deal with the error10:02
mithro-workmake sense10:04
mithro-work?10:05
hyadesya10:05
hyadeshow do you find which exception can occur calling a function?10:05
hyadesfunction/pre-defined function10:06
mithro-worklook at the documentation10:07
mithro-workOnly real way10:07
hyadeshm10:07
hyadesindeed, I never saw that part in documentation :)10:09
hyadesbefore today10:10
mithro-workit's often forgotten10:12
*** bananadine has joined #timvideos11:19
mithro-workhello bananadine11:22
mithro-workbananadine, I'm about to head out11:26
bananadinehello11:26
mithro-workbananadine, could you give me a status update11:26
bananadinei just got on11:26
bananadinei'm using string instead of the structure stuff11:26
bananadinebecause the guys at #gstreamer said it would be better11:26
mithro-workbananadine, okay - I guess that is reasonable11:27
mithro-workbananadine, generally with strings you put all the parts in a list then ''.join(stringbits) together11:27
mithro-workbut I don't think it makes much difference in this case11:28
bananadineyes11:28
bananadinewell i forgot to put the last worker log (trace-back)11:28
bananadineon the blog11:28
bananadineso i'll edit my last nights post now11:29
bananadineand i'll change 'banana' to an adequate name11:30
mithro-workI left a whole bunch of comments on your commits11:30
bananadinei read them11:30
mithro-workbananadine, your looking up things in the gstreamer documentation right?11:30
mithro-workso you know what banana should be called right?11:30
bananadineright11:31
bananadinebtw11:31
mithro-workif you don't know what it should be "unknown" is probably a better name11:32
bananadineEVENT_BOTH sends downstream AND upstream11:32
mithro-workbananadine, so do you need to filter the incoming events in the callback now?11:32
bananadinei don't know, i had 3 choices11:32
bananadineupstream, downstream and both11:32
bananadinei didn't know how to see what did it use before11:33
bananadinethe event probe just had output reset event as an argument11:34
bananadineand that's not it, it's just a handler11:36
mithro-workso look at what the handler does11:38
mithro-workbananadine, so when working on this I expect you to have the following up11:39
mithro-worka) documentation for the old gstreamer bindings11:39
mithro-workb) documentation for the new gstreamer bindings11:39
mithro-workc) the old unmodified code11:39
mithro-workd) the code you are currently working on11:39
bananadinei do11:40
bananadinebtw11:40
mithro-workso then you compare a and b11:40
mithro-workand where the documentation is lacking11:40
mithro-workyou look at c11:40
bananadinei put banana in the method because i had an error in the worker output saying something like 'the function takes only 3 but it's given 4 arguments'11:41
mithro-workso you looked up the function in the documentation and found out what the forth argument was?11:41
mithro-workbtw your blog post from last night was pretty port11:42
bananadineit's a flumotion function11:42
mithro-works/port/poor/11:42
mithro-workbananadine, you understand what a callback is right?11:42
mithro-workbananadine, the gstreamer documentation will say "you give me a function which takes argument A, B, C, D"11:42
bananadineso11:43
bananadine'        encoder.get_static_pad('sink').add_probe(Gst.PadProbeType.EVENT_BOTH,self.handle_reset_event, None)'11:43
bananadinewhen this calls handle_reset_event11:43
mithro-workthe function prototype of handle_reset_event will be in the add_probe documentation11:43
bananadinehttp://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstPadProbeCallback11:45
tpb<http://ln-s.net/-Vgh> (at gstreamer.freedesktop.org)11:45
bananadineso banana is 'user data'11:45
bananadine...11:45
mithro-workcorrect11:45
mithro-workwhich you probably want to name something like11:45
mithro-workunused_user_data11:45
bananadinealright11:46
bananadineand i know that the blogposts from last night are poor11:48
bananadinei have that much of a critique for myself :D11:49
bananadinei was reaaally lazy11:49
bananadineforgot to write them in the day11:49
bananadinethen i got out and returned late11:49
mithro-workAs I mentioned multiple times, its best to have your blog post open in a text editor somewhere throughout the day and then put stuff in it as you come across it11:50
mithro-workthen at the end of the day it's much easier to see what you did11:50
mithro-workWe do this type of thing at work - except on a weekly cycle. Having it up as I work saves me so much time at the end of the week11:52
bananadineI've been doing that with some blogposts, need to make it my routine11:53
mithro-workbananadine, yeah - it's hard to get into a habit, but totally worth it when you do11:56
*** hyades has quit IRC11:56
bananadineyap, btw i want to ask you11:57
bananadinehttps://github.com/bananadine/flumotion/commit/98806c4809d2322fc1a320b6f01bb79c14a97f5a#L1R7511:57
bananadineis this fine?11:57
tpb<http://ln-s.net/-Vgz> (at github.com)11:57
bananadinei make it a Caps object11:57
mithro-workWhy do you ask?11:58
bananadinewell before11:58
bananadinefirst it was a string 'capsString'11:58
bananadine(i'm talking about the not ported flumotion)11:59
bananadinethen it changed into structure11:59
bananadineand then into Caps11:59
bananadinenow i'm going from all string to Caps11:59
bananadinebecause there's a method 'Gst.Caps.from_string'11:59
mithro-work yeah, that seems fine12:01
bananadineone more thing before you go, how do i trace a one line 'WARN' from the worker log which only refers to a line in the code where there's a exception/warning message?12:03
mithro-workwhat do you mean?12:03
bananadinefor instance i got 'WARN  [ 3776] "producer-video"                 feedcomponent     Jul 18 13:53:24      Could not parse pipeline: no element "None" (flumotion/component/feedcomponent.py:342)'12:03
bananadineand here's that line12:04
bananadinehttps://github.com/bananadine/flumotion/blob/98806c4809d2322fc1a320b6f01bb79c14a97f5a/flumotion/component/feedcomponent.py#L34212:04
tpb<http://ln-s.net/-VhA> (at github.com)12:04
mithro-workpipeline_string is None12:05
bananadineit can't be12:06
bananadinei printed it out12:06
bananadineit gave me the whole pipeline12:07
bananadinewith properties and stuff12:07
mithro-workoh12:07
mithro-worktake a look at12:08
mithro-workhttp://blog.tplus1.com/blog/2007/09/28/the-python-logging-module-is-much-better-than-print-statements/12:08
tpb<http://ln-s.net/-VhI> (at blog.tplus1.com)12:08
mithro-workor12:08
mithro-workimport traceback12:08
mithro-workimport sys12:08
mithro-worktry:12:08
mithro-work    do_stuff()12:08
mithro-workexcept Exception, err:12:08
mithro-work    print traceback.format_exc()12:08
mithro-work    #or12:08
mithro-workthat will let you see how it is being called12:08
bananadinei'll give it a try thanks12:08
bananadine'print traceback.format_exc()' didn't print anything :/12:16
bananadinebut i think i know where the problem is12:17
bananadineat least, what component12:17
bananadine'producer-video' , videotest.py12:17
bananadinebecause the WARN says  "producer-video"12:17
mithro-workThat is probably correct12:18
mithro-workanything else?12:25
bananadinei tried 'print 'hey' + capsString' in videotest12:26
bananadinehere: https://github.com/bananadine/flumotion/blob/master/flumotion/component/producers/videotest/videotest.py#L7412:26
tpb<http://ln-s.net/-Vha> (at github.com)12:26
bananadineright before line 7512:26
bananadineand12:27
bananadinei got nothing12:27
mithro-worknothing as in...12:27
mithro-worknothing printed?12:27
bananadineit didn't print12:27
bananadineyes12:27
mithro-workthe test runner is probably capturing stdout12:27
bananadinewhat's that?12:28
mithro-workwhat do you mean?12:29
mithro-workwhat is stdout12:29
mithro-workor the test runner12:29
mithro-workor?12:29
bananadinethe test runner12:30
*** hyades has joined #timvideos12:30
mithro-workhow are you running the tests?12:30
bananadineoh but this is not running tests12:31
bananadinei'm starting the manager and connecting the worker12:31
bananadineand reading the workers output12:31
mithro-worksomething may be redirecting stdout to the log files12:32
mithro-workdo prints in other parts work?12:33
bananadineyes12:34
bananadinethey do work12:34
mithro-workthen the code is probably not being called?12:34
bananadinethat's what i was afraid of12:34
bananadineoh12:35
bananadinei raised an exception at the same place12:36
bananadinelook what i got12:36
bananadineWARN  [ 5373] "producer-video"                 feedcomponent     Jul 18 14:35:26      Setup failed: failure <type 'exceptions.Exception'> at flumotion/component/producers/videotest/videotest.py:75: get_pipeline_string(): DAMN (flumotion/component/component.py:586)12:36
bananadinei wrote 'DAMN' in the exception12:36
bananadineheh12:36
bananadineso the code does get called12:36
mithro-workbut not the part which does the pring?12:37
bananadineyea12:38
bananadinei12:38
bananadinei12:38
bananadinell try print again12:38
mithro-workbtw - You still have to go back and figure out the GstNet issue12:38
bananadinenope, printing does't do anything tried print 'heyyy'12:39
bananadinewell as GstNet works like this now i'll leave it for later12:40
bananadinei want to fix these other issues now12:40
*** mithro has joined #timvideos12:50
bananadinei tried to print something in the audiotest producer12:53
bananadineand i saw the printed in the worker log12:53
bananadineso it's just videotest which doesn't print12:53
*** mithro has quit IRC12:55
*** bananadine has quit IRC13:52
*** CarlFK has quit IRC14:24
*** rihnapstor has joined #timvideos14:58
rihnapstorhello parx14:58
*** rihnapstor has quit IRC14:59
*** rihnapstor has joined #timvideos14:59
hyadesrun python in gdb15:44
hyadesany way?15:44
*** hyades has quit IRC15:58
*** hyades has joined #timvideos15:58
*** rihnapstor has quit IRC15:58
*** hyades_ has joined #timvideos16:04
*** hyades has quit IRC16:06
*** hyades_ is now known as hyades16:06
*** iiie0 has joined #timvideos16:11
*** hyades has quit IRC16:15
*** hyades has joined #timvideos16:29
*** hyades has joined #timvideos16:30
*** hyades has quit IRC16:37
*** hyades has joined #timvideos16:39
*** iiie0 has quit IRC16:40
*** hyades has quit IRC17:07
*** iiie0 has joined #timvideos17:28
*** hyades has joined #timvideos17:28
*** hyades has quit IRC18:04
*** hyades has joined #timvideos18:11
*** parx1 has joined #timvideos18:14
*** parx has quit IRC18:15
*** parx1 is now known as parx18:15
*** hyades has quit IRC18:37
*** hyades has joined #timvideos18:38
*** hyades_ has joined #timvideos18:41
*** hyades has quit IRC18:43
*** shenki has quit IRC18:47
*** shenki has joined #timvideos18:55
*** hyades_ has quit IRC21:25
*** hyades_ has joined #timvideos21:41
*** hyades_ has quit IRC21:46
*** hyades_ has joined #timvideos22:02

Generated by irclog2html.py 2.12.1 by Marius Gedminas - find it at mg.pov.lt!