Skip to content

Instantly share code, notes, and snippets.

@lubosz
lubosz / caps.py
Created March 23, 2014 14:29
Gst.Fraction cannot be set as a Gst.Structure value in Gst.Caps in python3
#!/usr/bin/python3
from gi.repository import Gst
Gst.init(None)
caps = Gst.Caps('video/x-raw,width=720,height=576,framerate=25/1')
caps.set_value("width", 123)
# Fails with RuntimeError: PyObject conversion to GValue failed
bmonkey@bstation:/run/media/bmonkey/Stuff/workspace/aur/gawk$ makepkg
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
awk: symbol lookup error: /usr/lib/libreadline.so.6: undefined symbol: UP
==> Making package: gawk 4.1.0-2 (Thu Apr 3 23:02:27 CEST 2014)
==> Checking runtime dependencies...
@lubosz
lubosz / weston-launch
Created April 4, 2014 00:19
Log of weston-launch, causes black screen and needs to be terminated.
Date: 2014-04-04 CEST
[02:15:40.456] weston 1.4.0
http://wayland.freedesktop.org/
Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.4.0
Build:
[02:15:40.456] OS: Linux, 3.14.0-2-ARCH, #1 SMP PREEMPT Wed Apr 2 20:55:49 CEST 2014, x86_64
[02:15:40.456] Starting with no config file.
[02:15:40.456] Loading module '/usr/lib/weston/drm-backend.so'
[02:15:40.457] initializing drm backend
[02:15:40.458] using /dev/dri/card0
bmonkey@bstation:~/workspace/gfx/kmscube (master)$ ./kmscube
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card1
drmOpenDevice: node name is /dev/dri/card2
drmOpenDevice: node name is /dev/dri/card3
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 3, (OK)
drmOpenDevice: node name is /dev/dri/card1
drmOpenDevice: node name is /dev/dri/card2
drmOpenDevice: node name is /dev/dri/card3
drmOpenDevice: node name is /dev/dri/card4
@lubosz
lubosz / sink.py
Created April 8, 2014 18:15
sink example
#!/usr/bin/python
from gi.repository import Gtk, Gst, Gdk, GdkX11, GstVideo, ClutterGst, GtkClutter, Clutter
from IPython import embed
class VideoWidget(GtkClutter.Embed):
def __init__(self):
#Gtk.DrawingArea.__init__(self)
GtkClutter.Embed.__init__(self)
self._stage = self.get_stage()
@lubosz
lubosz / gist:10497222
Created April 11, 2014 20:04
nosetests3 pitivi segfault
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8c14278 in ?? () from /usr/lib/libgtk-3.so.0
(gdb) bt
#0 0x00007fffe8c14278 in ?? () from /usr/lib/libgtk-3.so.0
#1 0x00007fffe8c2979d in ?? () from /usr/lib/libgtk-3.so.0
#2 0x00007ffff24eb3d8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3 0x00007ffff24fc577 in ?? () from /usr/lib/libgobject-2.0.so.0
#4 0x00007ffff2503c11 in g_signal_emitv () from /usr/lib/libgobject-2.0.so.0
#5 0x00007ffff2b77cfb in ?? () from /usr/lib/python3.4/site-packages/gi/_gi.cpython-34m.so
#6 0x00007ffff7a67a87 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffa020) at Python/ceval.c:4227
@lubosz
lubosz / cairo-sphinx.log
Created May 13, 2014 11:15
linker error
cairo-1.12.16/util/cairo-sphinx$ make
CCLD cairo-sphinx
/tmp/ccRCPk8c.ltrans0.ltrans.o: In function `main':
ccRCPk8c.ltrans0.o:(.text.startup+0x13d): undefined reference to `cairo_boilerplate_get_target_by_name'
ccRCPk8c.ltrans0.o:(.text.startup+0x191): undefined reference to `cairo_boilerplate_xmalloc'
ccRCPk8c.ltrans0.o:(.text.startup+0x26d): undefined reference to `cairo_boilerplate_xmalloc'
ccRCPk8c.ltrans0.o:(.text.startup+0x410): undefined reference to `cairo_boilerplate_xmalloc'
ccRCPk8c.ltrans0.o:(.text.startup+0x591): undefined reference to `cairo_boilerplate_xmalloc'
ccRCPk8c.ltrans0.o:(.text.startup+0x5f2): undefined reference to `cairo_boilerplate_xmalloc'
/tmp/ccRCPk8c.ltrans0.ltrans.o:ccRCPk8c.ltrans0.o:(.text.startup+0x673): more undefined references to `cairo_boilerplate_xmalloc' follow
#!/usr/bin/python2.7
import sys
import os
import getopt
from distutils import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
'ldflags', 'help']
@lubosz
lubosz / gist:5c96b3bb1c58f02252fc
Created May 14, 2014 09:24
mingw on windows python 2 gobject problems
Lubosz@bstation-win8 ~
$ python2-config --includes
-Ic:\Python27\include -Ic:\Python27\include
Lubosz@bstation-win8 ~
$ ls "c:\Python27\include\Python.h"
c:\Python27\include\Python.h
Lubosz@bstation-win8 ~
$ echo $PYTHON_INCLUDES