linux.conf.au-2015-Part-1

January 28, 2015 - 4 minute read -
gst-switch lca-2015 auckland

docker, ddd

For almost half of the starting of this month I was in Auckland to attend Timvideos Sprints and Linux.conf.au 2015. The aim was to hack on gst-switch and get it ready for the conference.

There were 9 people in total for the sprints - Me (hyades) ;), Tim(mithro) , Carl(CarlFK), Ryan(xfxf), Ajit(tija), David(deeprave), Rohit(rohitksingh), Michael(micolous), Leon(techman83), Joel(shenki) and Jan(thaytan).

I was flying from Chennai to Auckland via Hong Kong on an endless 22 hour flight. I arrived in Auckland on 3rd Jan, met Carl, Ajit and Rohit and then slept for a whole day, my first experience of a jet lag! By the next day almost the rest of the guys came in.

I will be mentioning a lot about foood a lot in this post. The very first day, we had a dinner, and then mithro and carl rushed to the supermarket to get bacon!! I never had bacon before. Next morning, we wake up to find mithro cooking lots of bacon. Then carl cooked some eggs in the "bacon oil"!, and repeated the process again and again in the same oil till we all got bacon and eggs! Well, it had to taste super great!

So we were supposed to hack at Catalyst. So me, carl, ryan and david put in catalyst in google maps and reach Catalyst! The people at Catalyst got no idea who we are! Carl tries to convince them, but they seriously got no clue whats going on. After some 15 mins, we realize that this Catalyst is not even a software company, and we have reached the wrong place! So we finally head off to the other Catalyst. This time though we reach the correct place. Yay! So we reach Catalyst. We enter. Carl finds Tim sitting in front, and shouts out - hey Tim, only to realize that its not Tim! After our little adventure we finally see Tim in a room with Ajit and Rohit, both opening up their tones of boxes. So one corner for hardware, and one corner for laptops. The power sockets in New Zealand are the Australian type, which are very very strange looking. So carrying a universal convertor came in handy. Tim brought with him a cool set of PTZ cameras. Ryan quickly hooked them up to his pc and was controlling them with a PS joystick and zooming around on everyone in the room!

So we init the sprints. So gst-switch was in an untested state before the sprints. Audio was a major problem which needed an immidiate solution. The server crashed multiple times giving out segmentation faults.

The main problem with gst-switch was that its internal gstreamer pipelines needed modifications. David worked on making unit tests for the C code of gst-switch. I managed to fix the travis build, only to find it broken by some pipeline changes a few hours later. I also had a deep look into the C code of gst-switch, inorder to debug the segmentation faults gst-switch was producing. I have limited knowledge in the C world. Debugging C code was new to me. I had used gdb before, but only knew how to run the bt command to find out where the code was going wrong. In short it was negligible! The gdb stack trace showed all the function parameters as optimised-out by the compiler. Thus, compiler optimisations had to be turned off. The --debug option while doing autogen was added for turning off optimisations. The bt showed that the segmentation fault happened at glib end. Thus, mithro helped me compile a local version of glib using a link of the chromium project! Thanks to mithro, I managed to learn how to debug properly using ddd, which is a visual gui over gdb. As the internal pipelines of gst-switch changed, some issues were resolved and other arose. The default resolution was changed to 1280x720(720p), instead of the regular 300x200. A frame by frame analysis of the video produced by gst-switch revealed that gst-switch tends to drop certain frames. This was revealed by a custom gstreamer videotestsrc which generated alternate Red, Green and Blue frames. Thus if a frame is dropped, while doing a frame by frame analysis, we would see that the pattern of RGBRGBRGB... is destroyed. Another source with a timeoverlay revealed the frames that were dropped when a switch happened, i.e. equal mode to pip mode, preview mode etc. On my laptop where I was running ubuntu in a VM, the effect was more pronounced. On an individual machine however, the drop rate was observed only when the I ran 8 cpuburn processes to utilize all the 8 cores of the processer. Thus in ideal scenarios the frames are in order and behave perfectly, but when system resources are limited, then the behavious

Comments Section

Feel free to comment on the post but keep it clean and on topic.

blog comments powered by Disqus