*** tpb has joined #timvideos | 00:00 | |
*** iiie0 has quit IRC | 01:24 | |
*** mithro has joined #timvideos | 03:50 | |
*** hyades_ has quit IRC | 03:51 | |
*** mithro has quit IRC | 04:54 | |
*** mithro-work has quit IRC | 05:13 | |
*** mithro-work has joined #timvideos | 05:13 | |
*** hyades has joined #timvideos | 05:20 | |
*** iiie has joined #timvideos | 06:19 | |
mithro-work | Sewar, ping? | 07:51 |
---|---|---|
Sewar | mithro-work: pong | 07:52 |
mithro-work | Sewar, so how are things going? | 07:52 |
mithro-work | iiie, ping? | 07:52 |
Sewar | good, working on unittests | 07:53 |
mithro-work | are you and iiie having regular meetings? | 07:53 |
Sewar | no | 07:55 |
mithro-work | hyades, ping? | 07:55 |
mithro-work | Sewar, you and him should get on top of that | 07:55 |
mithro-work | I'd recommend a minimum of 1 video call a week | 07:55 |
Sewar | ok | 07:56 |
Sewar | I will start working on edid_grabber after midterm evaluation | 07:57 |
mithro-work | So when can we put the website up? | 08:04 |
Sewar | I think it's ready now | 08:07 |
mithro-work | so, how should we deploy it? | 08:10 |
Sewar | https://github.com/sydney-linux-user-group/slug#production-deployment ? | 08:12 |
tpb | <http://ln-s.net/-Vci> (at github.com) | 08:12 |
hyades | mithro-work: hey | 08:14 |
mithro-work | hyades, you need to log a support request as your repository isn't showing up in search | 08:15 |
hyades | support request? | 08:16 |
mithro-work | GitHub | 08:17 |
hyades | so what i do so that shows up in search? | 08:19 |
mithro-work | If I search at https://github.com/search?q=gst-switch | 08:20 |
tpb | Title: Search · gst-switch · GitHub (at github.com) | 08:20 |
mithro-work | your repository doesn't show up | 08:20 |
hyades | the repos forked from gst-switch will come? | 08:21 |
hyades | even timvideos/gst-switch is not cmng | 08:22 |
mithro-work | yes, I'm pretty sure they should show up.... | 08:22 |
Sewar | https://github.com/search?q=gst-switch+fork%3Atrue | 08:23 |
tpb | <http://ln-s.net/-Vco> (at github.com) | 08:23 |
mithro-work | well | 08:24 |
mithro-work | looks like it works then :) | 08:24 |
mithro-work | hyades, a bunch of things about your unittests | 08:24 |
hyades | ya | 08:24 |
mithro-work | and code in general | 08:24 |
mithro-work | in python "private" variables are written as "self._blah" | 08:25 |
hyades | yes | 08:25 |
mithro-work | you should also look up properties | 08:25 |
mithro-work | we don't do setters/getters in python | 08:25 |
mithro-work | so | 08:26 |
hyades | k..i will remove them and convert all those variables to private | 08:26 |
mithro-work | get_compose_port/set_compose_port | 08:26 |
mithro-work | should really be a property | 08:26 |
mithro-work | In Python we don't test for types either | 08:27 |
mithro-work | we just try and do something | 08:27 |
mithro-work | and deal with the failure | 08:27 |
hyades | ok | 08:27 |
mithro-work | def set_address(self, address): | 08:28 |
mithro-work | """Sets the bus address | 08:28 |
mithro-work | :param address: New bus address | 08:28 |
mithro-work | :returns: nothing | 08:28 |
mithro-work | """ | 08:28 |
mithro-work | self.ADDRESS = address | 08:28 |
mithro-work | why does this exist? | 08:28 |
mithro-work | as well | 08:28 |
mithro-work | def __init__(self): | 08:28 |
mithro-work | super(DBus, self).__init__() | 08:28 |
mithro-work | that code does nothing | 08:28 |
*** shenki_ is now known as shenki | 08:29 | |
hyades | hm | 08:30 |
hyades | i'll remove all code which "sets" and "gets" | 08:31 |
hyades | the blank init thing will be solved once i remove the set methods | 08:36 |
hyades | things like self.VIDEO_PORT should be private? | 08:41 |
hyades | i put them coz it will be easier to debug | 08:41 |
mithro-work | Sorry I was at dinner | 09:38 |
mithro-work | VIDEO_PORT is use by anything apart from your code? | 09:38 |
mithro-work | Python has no concept of private/protected | 09:38 |
mithro-work | nothing stops you from accessing the _XXX variable except convention | 09:39 |
hyades | yeah | 09:40 |
hyades | do i need private variables? | 09:45 |
mithro-work | what do you mean? | 09:45 |
hyades | i am a bit confused now :\ | 09:46 |
mithro-work | in what way? | 09:46 |
hyades | i just set these variables in constructors? | 09:47 |
hyades | and should i do __VIDEO_PORT? | 09:48 |
mithro-work | Looking at gst-switch / python-api / gstswitch / dbus.py | 09:49 |
mithro-work | what does this actually do? | 09:49 |
mithro-work | The only useful function seems to be connect_dbus ? | 09:49 |
hyades | ya | 09:49 |
hyades | i will dump that method into connection.py | 09:50 |
mithro-work | So Python has the following "conventions" when naming things | 09:50 |
mithro-work | UPPERCASE == constant | 09:51 |
mithro-work | _single_leading_underscore: weak "internal use" indicator. | 09:51 |
hyades | oh | 09:52 |
mithro-work | Almost without exception, class names use the CapWords convention. Classes for internal use have a leading underscore in addition. | 09:52 |
mithro-work | http://www.python.org/dev/peps/pep-0008/#naming-conventions | 09:52 |
tpb | Title: PEP 8 -- Style Guide for Python Code (at www.python.org) | 09:52 |
mithro-work | I highly recommend adding a Makefile which runs both pylint and pep8 over your code | 09:56 |
mithro-work | much easier to pick up style issues automagically rather then manually | 09: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-work | That is not really a good use of with | 09:58 |
mithro-work | Just use something like | 09:59 |
mithro-work | devnull = open(os.devnull, 'w') | 09:59 |
mithro-work | don't use bare "except:" - always specific what you are trying to catch | 09:59 |
hyades | k | 10:00 |
mithro-work | That is part of pep8 too | 10:00 |
hyades | somethings like | 10:00 |
hyades | creating a process | 10:00 |
hyades | which can fail due to many reasons | 10:00 |
hyades | i cannot catch what causes exception | 10:00 |
mithro-work | either | 10:02 |
hyades | here should i just use like except RuntimeError | 10:02 |
mithro-work | you can deal with the error (and hence you know what type of error is occuring) | 10:02 |
mithro-work | or you can't deal with the error | 10:02 |
mithro-work | make sense | 10:04 |
mithro-work | ? | 10:05 |
hyades | ya | 10:05 |
hyades | how do you find which exception can occur calling a function? | 10:05 |
hyades | function/pre-defined function | 10:06 |
mithro-work | look at the documentation | 10:07 |
mithro-work | Only real way | 10:07 |
hyades | hm | 10:07 |
hyades | indeed, I never saw that part in documentation :) | 10:09 |
hyades | before today | 10:10 |
mithro-work | it's often forgotten | 10:12 |
*** bananadine has joined #timvideos | 11:19 | |
mithro-work | hello bananadine | 11:22 |
mithro-work | bananadine, I'm about to head out | 11:26 |
bananadine | hello | 11:26 |
mithro-work | bananadine, could you give me a status update | 11:26 |
bananadine | i just got on | 11:26 |
bananadine | i'm using string instead of the structure stuff | 11:26 |
bananadine | because the guys at #gstreamer said it would be better | 11:26 |
mithro-work | bananadine, okay - I guess that is reasonable | 11:27 |
mithro-work | bananadine, generally with strings you put all the parts in a list then ''.join(stringbits) together | 11:27 |
mithro-work | but I don't think it makes much difference in this case | 11:28 |
bananadine | yes | 11:28 |
bananadine | well i forgot to put the last worker log (trace-back) | 11:28 |
bananadine | on the blog | 11:28 |
bananadine | so i'll edit my last nights post now | 11:29 |
bananadine | and i'll change 'banana' to an adequate name | 11:30 |
mithro-work | I left a whole bunch of comments on your commits | 11:30 |
bananadine | i read them | 11:30 |
mithro-work | bananadine, your looking up things in the gstreamer documentation right? | 11:30 |
mithro-work | so you know what banana should be called right? | 11:30 |
bananadine | right | 11:31 |
bananadine | btw | 11:31 |
mithro-work | if you don't know what it should be "unknown" is probably a better name | 11:32 |
bananadine | EVENT_BOTH sends downstream AND upstream | 11:32 |
mithro-work | bananadine, so do you need to filter the incoming events in the callback now? | 11:32 |
bananadine | i don't know, i had 3 choices | 11:32 |
bananadine | upstream, downstream and both | 11:32 |
bananadine | i didn't know how to see what did it use before | 11:33 |
bananadine | the event probe just had output reset event as an argument | 11:34 |
bananadine | and that's not it, it's just a handler | 11:36 |
mithro-work | so look at what the handler does | 11:38 |
mithro-work | bananadine, so when working on this I expect you to have the following up | 11:39 |
mithro-work | a) documentation for the old gstreamer bindings | 11:39 |
mithro-work | b) documentation for the new gstreamer bindings | 11:39 |
mithro-work | c) the old unmodified code | 11:39 |
mithro-work | d) the code you are currently working on | 11:39 |
bananadine | i do | 11:40 |
bananadine | btw | 11:40 |
mithro-work | so then you compare a and b | 11:40 |
mithro-work | and where the documentation is lacking | 11:40 |
mithro-work | you look at c | 11:40 |
bananadine | i 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-work | so you looked up the function in the documentation and found out what the forth argument was? | 11:41 |
mithro-work | btw your blog post from last night was pretty port | 11:42 |
bananadine | it's a flumotion function | 11:42 |
mithro-work | s/port/poor/ | 11:42 |
mithro-work | bananadine, you understand what a callback is right? | 11:42 |
mithro-work | bananadine, the gstreamer documentation will say "you give me a function which takes argument A, B, C, D" | 11:42 |
bananadine | so | 11:43 |
bananadine | ' encoder.get_static_pad('sink').add_probe(Gst.PadProbeType.EVENT_BOTH,self.handle_reset_event, None)' | 11:43 |
bananadine | when this calls handle_reset_event | 11:43 |
mithro-work | the function prototype of handle_reset_event will be in the add_probe documentation | 11:43 |
bananadine | http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstPadProbeCallback | 11:45 |
tpb | <http://ln-s.net/-Vgh> (at gstreamer.freedesktop.org) | 11:45 |
bananadine | so banana is 'user data' | 11:45 |
bananadine | ... | 11:45 |
mithro-work | correct | 11:45 |
mithro-work | which you probably want to name something like | 11:45 |
mithro-work | unused_user_data | 11:45 |
bananadine | alright | 11:46 |
bananadine | and i know that the blogposts from last night are poor | 11:48 |
bananadine | i have that much of a critique for myself :D | 11:49 |
bananadine | i was reaaally lazy | 11:49 |
bananadine | forgot to write them in the day | 11:49 |
bananadine | then i got out and returned late | 11:49 |
mithro-work | As 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 it | 11:50 |
mithro-work | then at the end of the day it's much easier to see what you did | 11:50 |
mithro-work | We 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 week | 11:52 |
bananadine | I've been doing that with some blogposts, need to make it my routine | 11:53 |
mithro-work | bananadine, yeah - it's hard to get into a habit, but totally worth it when you do | 11:56 |
*** hyades has quit IRC | 11:56 | |
bananadine | yap, btw i want to ask you | 11:57 |
bananadine | https://github.com/bananadine/flumotion/commit/98806c4809d2322fc1a320b6f01bb79c14a97f5a#L1R75 | 11:57 |
bananadine | is this fine? | 11:57 |
tpb | <http://ln-s.net/-Vgz> (at github.com) | 11:57 |
bananadine | i make it a Caps object | 11:57 |
mithro-work | Why do you ask? | 11:58 |
bananadine | well before | 11:58 |
bananadine | first it was a string 'capsString' | 11:58 |
bananadine | (i'm talking about the not ported flumotion) | 11:59 |
bananadine | then it changed into structure | 11:59 |
bananadine | and then into Caps | 11:59 |
bananadine | now i'm going from all string to Caps | 11:59 |
bananadine | because there's a method 'Gst.Caps.from_string' | 11:59 |
mithro-work | yeah, that seems fine | 12:01 |
bananadine | one 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-work | what do you mean? | 12:03 |
bananadine | for 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 |
bananadine | and here's that line | 12:04 |
bananadine | https://github.com/bananadine/flumotion/blob/98806c4809d2322fc1a320b6f01bb79c14a97f5a/flumotion/component/feedcomponent.py#L342 | 12:04 |
tpb | <http://ln-s.net/-VhA> (at github.com) | 12:04 |
mithro-work | pipeline_string is None | 12:05 |
bananadine | it can't be | 12:06 |
bananadine | i printed it out | 12:06 |
bananadine | it gave me the whole pipeline | 12:07 |
bananadine | with properties and stuff | 12:07 |
mithro-work | oh | 12:07 |
mithro-work | take a look at | 12:08 |
mithro-work | http://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-work | or | 12:08 |
mithro-work | import traceback | 12:08 |
mithro-work | import sys | 12:08 |
mithro-work | try: | 12:08 |
mithro-work | do_stuff() | 12:08 |
mithro-work | except Exception, err: | 12:08 |
mithro-work | print traceback.format_exc() | 12:08 |
mithro-work | #or | 12:08 |
mithro-work | that will let you see how it is being called | 12:08 |
bananadine | i'll give it a try thanks | 12:08 |
bananadine | 'print traceback.format_exc()' didn't print anything :/ | 12:16 |
bananadine | but i think i know where the problem is | 12:17 |
bananadine | at least, what component | 12:17 |
bananadine | 'producer-video' , videotest.py | 12:17 |
bananadine | because the WARN says "producer-video" | 12:17 |
mithro-work | That is probably correct | 12:18 |
mithro-work | anything else? | 12:25 |
bananadine | i tried 'print 'hey' + capsString' in videotest | 12:26 |
bananadine | here: https://github.com/bananadine/flumotion/blob/master/flumotion/component/producers/videotest/videotest.py#L74 | 12:26 |
tpb | <http://ln-s.net/-Vha> (at github.com) | 12:26 |
bananadine | right before line 75 | 12:26 |
bananadine | and | 12:27 |
bananadine | i got nothing | 12:27 |
mithro-work | nothing as in... | 12:27 |
mithro-work | nothing printed? | 12:27 |
bananadine | it didn't print | 12:27 |
bananadine | yes | 12:27 |
mithro-work | the test runner is probably capturing stdout | 12:27 |
bananadine | what's that? | 12:28 |
mithro-work | what do you mean? | 12:29 |
mithro-work | what is stdout | 12:29 |
mithro-work | or the test runner | 12:29 |
mithro-work | or? | 12:29 |
bananadine | the test runner | 12:30 |
*** hyades has joined #timvideos | 12:30 | |
mithro-work | how are you running the tests? | 12:30 |
bananadine | oh but this is not running tests | 12:31 |
bananadine | i'm starting the manager and connecting the worker | 12:31 |
bananadine | and reading the workers output | 12:31 |
mithro-work | something may be redirecting stdout to the log files | 12:32 |
mithro-work | do prints in other parts work? | 12:33 |
bananadine | yes | 12:34 |
bananadine | they do work | 12:34 |
mithro-work | then the code is probably not being called? | 12:34 |
bananadine | that's what i was afraid of | 12:34 |
bananadine | oh | 12:35 |
bananadine | i raised an exception at the same place | 12:36 |
bananadine | look what i got | 12:36 |
bananadine | WARN [ 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 |
bananadine | i wrote 'DAMN' in the exception | 12:36 |
bananadine | heh | 12:36 |
bananadine | so the code does get called | 12:36 |
mithro-work | but not the part which does the pring? | 12:37 |
bananadine | yea | 12:38 |
bananadine | i | 12:38 |
bananadine | i | 12:38 |
bananadine | ll try print again | 12:38 |
mithro-work | btw - You still have to go back and figure out the GstNet issue | 12:38 |
bananadine | nope, printing does't do anything tried print 'heyyy' | 12:39 |
bananadine | well as GstNet works like this now i'll leave it for later | 12:40 |
bananadine | i want to fix these other issues now | 12:40 |
*** mithro has joined #timvideos | 12:50 | |
bananadine | i tried to print something in the audiotest producer | 12:53 |
bananadine | and i saw the printed in the worker log | 12:53 |
bananadine | so it's just videotest which doesn't print | 12:53 |
*** mithro has quit IRC | 12:55 | |
*** bananadine has quit IRC | 13:52 | |
*** CarlFK has quit IRC | 14:24 | |
*** rihnapstor has joined #timvideos | 14:58 | |
rihnapstor | hello parx | 14:58 |
*** rihnapstor has quit IRC | 14:59 | |
*** rihnapstor has joined #timvideos | 14:59 | |
hyades | run python in gdb | 15:44 |
hyades | any way? | 15:44 |
*** hyades has quit IRC | 15:58 | |
*** hyades has joined #timvideos | 15:58 | |
*** rihnapstor has quit IRC | 15:58 | |
*** hyades_ has joined #timvideos | 16:04 | |
*** hyades has quit IRC | 16:06 | |
*** hyades_ is now known as hyades | 16:06 | |
*** iiie0 has joined #timvideos | 16:11 | |
*** hyades has quit IRC | 16:15 | |
*** hyades has joined #timvideos | 16:29 | |
*** hyades has joined #timvideos | 16:30 | |
*** hyades has quit IRC | 16:37 | |
*** hyades has joined #timvideos | 16:39 | |
*** iiie0 has quit IRC | 16:40 | |
*** hyades has quit IRC | 17:07 | |
*** iiie0 has joined #timvideos | 17:28 | |
*** hyades has joined #timvideos | 17:28 | |
*** hyades has quit IRC | 18:04 | |
*** hyades has joined #timvideos | 18:11 | |
*** parx1 has joined #timvideos | 18:14 | |
*** parx has quit IRC | 18:15 | |
*** parx1 is now known as parx | 18:15 | |
*** hyades has quit IRC | 18:37 | |
*** hyades has joined #timvideos | 18:38 | |
*** hyades_ has joined #timvideos | 18:41 | |
*** hyades has quit IRC | 18:43 | |
*** shenki has quit IRC | 18:47 | |
*** shenki has joined #timvideos | 18:55 | |
*** hyades_ has quit IRC | 21:25 | |
*** hyades_ has joined #timvideos | 21:41 | |
*** hyades_ has quit IRC | 21:46 | |
*** hyades_ has joined #timvideos | 22:02 |
Generated by irclog2html.py 2.12.1 by Marius Gedminas - find it at mg.pov.lt!