Wednesday, July 31, 2013

TypeError: unknown type GstIntRange "FIXED"

What i did

Until i apply a patch for gst-python, the line where it gave me 'TypeError: unknown type GstIntRange' will be like this -> [commit]

There was an error i got for 'self.pipeline.set_start_time(Gst.CLOCK_TIME_NONE)' sayng -1 (the value of GST_CLOCK_TIME_NONE) is out of range, but the equivalent to that (2**64-1) works. I reported the bug to introspection. [commit]

Other changes i did, here -> [commit]

What needs to be done

Here's the current worker output -> http://pastebin.com/Du4wbviZ

Everything works great until the muxer shows up, then i get an internal flow error. My guess is that this is due to the probes.
In GStreamer 1.0 add_probe and remove_probe replace a lot of functions from GStreamer 0.10 and i had to save the return values of add_probe to use them for removing the probes. The code i wrote is messy and i'm sure it contains a lot of mistakes, but that's because i get confused by all those probes.

TO DO:

Fix the internal flow error, get a working stream.
I don't think i can fix this on my own, i'll make a new post if i get this working.

Monday, July 29, 2013

Progress

The video test producer's caps could not be parsed because of the formatting. I fixed that with correct placement of commas -> [7c12ca0]
Other changes -> [5a1ac72]

Checklist:
1.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/gstreamer.py", line 51, in verbose_deep_notify_cb
  3.     value = orig.get_property(pspec.name)
  4. AttributeError: 'NoneType' object has no attribute 'name'

Printing the arguments in verbose_deep_notify_cb in gstreamer.py gives the following:
'print object' prints <Pipeline object at 0x9cb0c34 (GstPipeline at 0x9ce6c38)>
'print orig' prints <__main__.GstMultiFdSink object at 0x9868c0c (GstMultiFdSink at 0x98656d0)>
'print pspec' prints None
'print component' prints all components in the pipeline

Printing pspec in the pre-ported Flumotion shows that it's only a log of the pipeline properties/specifications.

Tried a lot of things, but at the end i did this to get pass the problem:

https://github.com/bananadine/flumotion/commit/5a1ac72140408aeb84be09cc99de792c01390fcd#L0R51

2.
  1. Twisted traceback:
  2. Traceback (most recent call last):
  3.   File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 896, in proto_message
  4.     self._recvMessage(self.localObjectForID, requestID, objectID, message, answerRequired, netArgs, netKw)
  5.   File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 910, in _recvMessage
  6.     netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
  7.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/medium.py", line 279, in remoteMessageReceived
  8.     self, broker, message, args, kw)
  9.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/twisted/pb.py", line 584, in remoteMessageReceived
  10.     d = defer.maybeDeferred(method, *args, **kwargs)
  11. --- <exception caught here> ---
  12.   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
  13.     result = f(*args, **kw)
  14.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/3a795ff0d790d96af4e17e4306ad0c5c/flumotion/component/feedcomponent.py", line 249, in remote_setMasterClock
  15.     return self.comp.set_master_clock(ip, port, base_time)
  16.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/3a795ff0d790d96af4e17e4306ad0c5c/flumotion/component/feedcomponent010.py", line 504, in set_master_clock
  17.     element = self.pipeline.get_by_name('src')
  18. exceptions.TypeError: unbound method get_by_name() must be called with Pipeline instance as first argument (got str instance instead)
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/vorbis-component/2b18938d80c0f3474d96f6eea8f6c471/flumotion/component/encoders/vorbis/vorbis010.py", line 75, in buffer_probe
  3.     in_rate = kaps[0].get_value('rate')
  4.   File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
  5.     return info.invoke(*args, **kwargs)
  6. TypeError: unknown type GstIntRange

(pygst doesn't yet support the full set of gstreamer GType values)

4.
  1. WARN  [13016] "encoder-audio"                  feedcomponent     Jul 28 16:42:14      element /GstPipeline:pipeline-encoder-audio/GstFdSrc:eater:default error Internal data flow error. gstbasesrc.c(2809): gst_base_src_loop (): /GstPipeline:pipeline-encoder-audio/GstFdSrc:eater:default:
  2. streaming task paused, reason not-negotiated (-4) (flumotion/component/feedcomponent010.py:261)
  3. INFO  [13016] "encoder-audio"                  feedcomponent     Jul 28 16:42:14      We got an eos from pipeline-encoder-audio (flumotion/component/feedcomponent010.py:284)

I don't know anything about this one, yet.

5.
  1. Twisted traceback:
  2. Traceback (most recent call last):
  3.   File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithLogger
  4.     return callWithContext({"system": lp}, func, *args, **kw)
  5.   File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
  6.     return context.call({ILogContext: newCtx}, func, *args, **kw)
  7.   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
  8.     return self.currentContext().callWithContext(ctx, func, *args, **kw)
  9.   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
  10.     return func(*args,**kw)
  11. --- <exception caught here> ---
  12.   File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 586, in _doReadOrWrite
  13.     why = selectable.doRead()
  14.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/twisted/fdserver.py", line 98, in doRead
  15.     message[offset:offset+msglen])
  16.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/job/job.py", line 338, in fileDescriptorsReceived
  17.     os.close, eaterId)
  18.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/3a795ff0d790d96af4e17e4306ad0c5c/flumotion/component/feedcomponent010.py", line 806, in feedToFD
  19.     self.pipeline.get_state(0)[1] == Gst.State.NULL):
  20. exceptions.TypeError: unbound method get_state() must be called with Pipeline instance as first argument (got int instance instead)

This is gone.

6.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/3a795ff0d790d96af4e17e4306ad0c5c/flumotion/component/feedcomponent.py", line 985, in buffer_probe_cb
  3.     pad = Gst.Element.get_static_pad('src')
  4. TypeError: unbound method get_static_pad() must be called with Element instance as first argument (got str instance instead)

This change needs to be applied here: https://github.com/bananadine/flumotion/commit/5a1ac72140408aeb84be09cc99de792c01390fcd#L1L1019

Instead of calling the method on Gst.Element (which makes no sense) I need to call it on something which is a GstElement.

I'll post the current worker output tomorrow/later in an edit to show what needs to be fixed.

EDIT: Worker output http://pastebin.com/xsa7x7rj

Friday, July 26, 2013

Some things i did today

The callback functions need a lot of work. Issues number 1, 5 and 6 are callback related.
Here are some changes i did today, most of the time i spent analyzing and inspecting:
https://github.com/bananadine/flumotion/commit/08fd2a9afa5d1a017f1bb5427c641b91413530f5

Here's what I've found out about the issues mentioned in the previous post

1.
'verbose_deep_notify_cb' is a function in gstreamer.py and it's called in '_setup_pipeline' in feedcomponent010.py  by 'self.pipeline.connect' . I couldn't find any information on 'connect' and there is no such function in Gst.Pipeline, but there is a Gst.Element.connect()

2.
I tried printing out self.pipeline_string after this line:
https://github.com/bananadine/flumotion/blob/master/flumotion/component/feedcomponent.py#L337
I got multiple print outs, here they are in the worker log along with everything else from the log: http://pastebin.com/b5XU43xA
I'd like to take out one of the print outs which i think is important:
  1. videotestsrc is-live=true name=source ! identity name=identity silent=TRUE ! None ! gdppay name=feeder:default-pay ! multifdsink sync=false name=feeder:default buffers-max=500 buffers-soft-max=450 recover-policy=1

There is a 'None' only in this one and it's for the video test producer. I need to find out where and what gets a None value and fix that.

3.
self.pipeline is initially given a None value and it seems that doesn't change, i need to figure out why is that. Anyway, regarding 'set_new_stream_time':
Gst.Pipeline no longer has a new_stream_time(), Gst.Element has set_start_time() instead.
Also, Gst.Element has the function set_base_time()

5.  Fixed how many arguments are givent o event_probe_cb(). Now i get this:

  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/b749e957772674b6a3071482d5a39e08/flumotion/component/feedcomponent.py", line 1019, in event_probe_cb
  3.     if 'audio' not in caps[0].to_string():
  4. TypeError: 'Caps' object does not support indexing

Need to fix this tomorrow.




6. Same as above, but i get this instead:

  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/b749e957772674b6a3071482d5a39e08/flumotion/component/feedcomponent.py", line 986, in buffer_probe_cb
  3.     pad = Gst.Element.get_static_pad('src')
  4. TypeError: unbound method get_static_pad() must be called with Element instance as first argument (got str instance instead)

The old function used to work with strings now i need to give 'get_static_pad' an Element instance.

Tuesday, July 23, 2013

Replaced TIME_ARGS and some other stuff

What i did today

Here are the commits:
https://github.com/bananadine/flumotion/commit/08ef0fad603099e3d3dbc8d6ebd9bad568e88e46
https://github.com/bananadine/flumotion/commit/9f3b804afbe7ed3970919b3679a872f83ce38232

*TIME_ARGS is replaced with string.
*GstNet.NetClientClock.new , the first [0] argument (Name) can't be None as it was so i placed 'Noname' for the name.
*Since array is of GstStructure type i couldn't find len() , so i change it to string and find out the length.
*remove_probe should takes only 2 arguments.
* As i said array is of GstStructure so i also had to do this here [this]


What problems am i having

Worker log -> http://pastebin.com/Uwcs5VJe

Here are the issues:

1.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/gstreamer.py", line 51, in verbose_deep_notify_cb
  3.     value = orig.get_property(pspec.name)
  4. AttributeError: 'NoneType' object has no attribute 'name'

2.
  1. WARN  [ 8398] "producer-video"                 feedcomponent     Jul 23 15:37:31      Could not parse pipeline: no element "None" (flumotion/component/feedcomponent.py:342)
  2. WARN  [ 8398] "producer-video"                 feedcomponent     Jul 23 15:37:31      Setup failed: failure <class 'flumotion.common.errors.PipelineParseError'> at flumotion/component/feedcomponent.py:348: create_pipeline(): no element "None" (flumotion/component/component.py:586)

3.
  1. Twisted traceback:
  2. Traceback (most recent call last):
  3.   File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 896, in proto_message
  4.     self._recvMessage(self.localObjectForID, requestID, objectID, message, answerRequired, netArgs, netKw)
  5.   File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 910, in _recvMessage
  6.     netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
  7.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/medium.py", line 279, in remoteMessageReceived
  8.     self, broker, message, args, kw)
  9.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/twisted/pb.py", line 584, in remoteMessageReceived
  10.     d = defer.maybeDeferred(method, *args, **kwargs)
  11. --- <exception caught here> ---
  12.   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
  13.     result = f(*args, **kw)
  14.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/a4c3f7b27db12cfd8ecdd704075aeaf1/flumotion/component/feedcomponent.py", line 249, in remote_setMasterClock
  15.     return self.comp.set_master_clock(ip, port, base_time)
  16.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/a4c3f7b27db12cfd8ecdd704075aeaf1/flumotion/component/feedcomponent010.py", line 505, in set_master_clock
  17.     self.pipeline.set_new_stream_time(Gst.CLOCK_TIME_NONE)
  18. exceptions.AttributeError: 'NoneType' object has no attribute 'set_new_stream_time'

4.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/vorbis-component/2b18938d80c0f3474d96f6eea8f6c471/flumotion/component/encoders/vorbis/vorbis010.py", line 75, in buffer_probe
  3.     in_rate = kaps[0].get_value('rate')
  4.   File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
  5.     return info.invoke(*args, **kwargs)
  6. TypeError: unknown type GstIntRange

5.
  1. TypeError: event_probe_cb() takes exactly 5 arguments (4 given)

6.
  1. TypeError: buffer_probe_cb() takes exactly 5 arguments (4 given)

TO DO

Fix the above mentioned problems.

Monday, July 22, 2013

PadProbeInfo' object has no attribute 'get_structure' FIXED

Here's the fix:
https://github.com/bananadine/flumotion/commit/fc6698e1274ac60aeeab5c17e867c0d14c3b693c

I asked people from the gstreamer community about these issues i'm having and for now i got an answer which helped me solve:

  1. AttributeError: 'PadProbeInfo' object has no attribute 'get_structure'

I didn't see before that PadProbeInfo has a get_event method.


I asked what would be appropriate in place of TIME_ARGS which is not in GStreamer 1.0 and i'm currently waiting for an answer.

After that one i'm only left with the error relating to 'pspec' and some other minor ones.

Saturday, July 20, 2013

Analyzing


  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/9d1e41022a6588631fd0de57ffb5ddee/flumotion/component/feedcomponent.py", line 965, in handle_reset_event
  3.     if gstreamer.event_is_flumotion_reset(event):
  4.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/gstreamer.py", line 176, in event_is_flumotion_reset
  5.     if event.get_structure() is None:
  6. AttributeError: 'PadProbeInfo' object has no attribute 'get_structure'

Here event is a PadProbeInfo: 
but need to be GstCaps so i can do 'GstCaps.get_structure' and then on the structure use '.get_name'

Another issue:

  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/gstreamer.py", line 51, in verbose_deep_notify_cb
  3.     value = orig.get_property(pspec.name)
  4. AttributeError: 'NoneType' object has no attribute 'name'

Tried printing pspec, the result was a printed None

Where does it go wrong?

Clues (everywhere i could find pspec):

https://github.com/bananadine/flumotion/blob/master/flumotion/common/gstreamer.py#L47

https://github.com/bananadine/flumotion/blob/master/flumotion/component/feedcomponent010.py#L413
https://github.com/bananadine/flumotion/blob/master/flumotion/component/producers/videotest/videotest.py#L90
https://github.com/bananadine/flumotion/blob/master/flumotion/common/pygobject.py#L38

Thursday, July 18, 2013

Things i did today/ Things to do

What i did today

Latest changes 70d945ea2ffcf238fb93fe7524657f8b23c226c1

I didn't know what to pass as an argument on these places, but then i looked at this:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstPadProbeCallback
Now banana is replaced with unused_user_data (an adequate name)

What i need to fix

Now i'm working with string instead of GstStructure in videotest.py. Everything seemed fine but then i got this:
WARN  [ 5460] "producer-video"                 feedcomponent     Jul 18 14:38:41      Could not parse pipeline: no element "None" (flumotion/component/feedcomponent.py:342))

I raised an exception in videotest.py (tried in all functions) and it shows up in the log, but when i try to print something from that module it does not show up. I still don't know why this happens the way it does.


Another thing, in vorbis010.py  i tried to fix an error which gave me:

  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/vorbis-component/f5edb82cece7c472fab6e049e0573240/flumotion/component/encoders/vorbis/vorbis010.py", line 74, in buffer_probe
  3.     in_rate = caps[0]['rate']
  4. TypeError: string indices must be integers, not str

With this -> in_rate = kaps[0].get_value('rate') , but now i get this:

  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/vorbis-component/2b18938d80c0f3474d96f6eea8f6c471/flumotion/component/encoders/vorbis/vorbis010.py", line 75, in buffer_probe
  3.     in_rate = kaps[0].get_value('rate')
  4.   File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
  5.     return info.invoke(*args, **kwargs)
  6. TypeError: unknown type GstIntRange

Although  the value i need gets passed to 'in_rate'.

There's a bunch of other stuff which needs fixing, here's the full worker log:
http://pastebin.com/S4Z0bPf7

I also need to check that lookup_feature is returning a Gst.TYPE_ELEMENT_FACTORY  and get back to finding out why did GstNet need to be imported in boot.py to work on other places.

Monday, July 15, 2013

GstNet import fixed

What i achieved

As i said in my previous posts Flumotion didn't import GstNet, but i could import it in the interactive prompt (ipython). I looked for a solution and i thought 'Why i don't try and initialize GstNet in the boot.py file?' . So did this change, where i assert GstNet in boot.py:
https://github.com/bananadine/flumotion/commit/83f2d799e550d9483a2d6c26aa2391537b473376#L0R256

And then i printed sys.modules:
http://pastebin.com/8B3SnjH2

And i got this line:
'gi.repository.GstNet': <gi.module.DynamicModule 'GstNet' from '/usr/lib/girepository-1.0/GstNet-1.0.typelib'>

GstNet gets imported successfully now.

Other changes are made here -> [83f2d79]

What problems I'm currently having

flumotion-worker output: http://pastebin.com/7bA4Ldf0
1.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/flumotion/common/gstreamer.py", line 51, in verbose_deep_notify_cb
  3.     value = orig.get_property(pspec.name)
  4. AttributeError: 'NoneType' object has no attribute 'name'
2.
  1.  File "/home/max/Desktop/flumotion-porting/flumotion/cache/component/7b26f59c71d7d30689ac8d72ceef8fc0/flumotion/component/feedcomponent010.py", line 534, in pipelinePaused
  2.     self.clock_provider = GstNet.NetTimeProvider.new(clock, None, port)
  3.   File "/usr/lib/python2.7/dist-packages/gi/types.py", line 72, in constructor
  4.     return info.invoke(cls, *args, **kwargs)
  5. exceptions.TypeError: Argument 1 does not allow None as a value

3.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/volume-effect/5236a1d089cdbda5f04595a1315bdec1/flumotion/component/effects/volume/volume.py", line 67, in _bus_message_received_cb
  3.     if message.structure.get_name() == 'level':
  4. AttributeError: 'Message' object has no attribute 'structure'

4.
  1. Traceback (most recent call last):
  2.   File "/home/max/Desktop/flumotion-porting/flumotion/cache/vorbis-component/f5edb82cece7c472fab6e049e0573240/flumotion/component/encoders/vorbis/vorbis010.py", line 74, in buffer_probe
  3.     in_rate = caps[0]['rate']
  4. TypeError: string indices must be integers, not str
  5. TypeError: event_probe_cb() takes exactly 5 arguments (4 given)




TO DO:
Fix the above mentioned problems

Friday, July 12, 2013

GstNet - additional info

Ran 'strace' on the worker and these are the lines i got relevant to GstNet:

http://pastebin.com/fepsc0Ss

And here is the output from the worker with an included 'pprint.pprint(sys.modules)' in feedcomponent010.py, where i'm importing GstNet:

http://pastebin.com/tPmaPnZf

  1.  'gi.repository': <module 'gi.repository' from '/usr/lib/python2.7/dist-packages/gi/repository/__init__.pyc'>,
  2.  'gi.repository.Atk': <gi.module.DynamicModule 'Atk' from '/usr/lib/girepository-1.0/Atk-1.0.typelib'>,
  3.  'gi.repository.GLib': <gi.module.DynamicGLibModule 'GLib' from '/usr/lib/girepository-1.0/GLib-2.0.typelib'>,
  4.  'gi.repository.GObject': <gi.module.DynamicGObjectModule 'GObject' from '/usr/lib/girepository-1.0/GObject-2.0.typelib'>,
  5.  'gi.repository.Gst': <gi.module.DynamicModule 'Gst' from '/usr/lib/girepository-1.0/Gst-1.0.typelib'>,
  6.  'gi.repository.Gtk': <gi.module.DynamicModule 'Gtk' from '/usr/lib/girepository-1.0/Gtk-3.0.typelib'>,

 Looking from here i can see that GstNet is not located in gi.repository, but i looked for the library in /usr/lib and i found 'GstNet-1.0.typelib' also as i mentioned yesterday i can import GstNet from a python interactive prompt.

P.S: Some small changes -> [1174be]

Thursday, July 11, 2013

GstNet

What i achieved

These are the latest changes -> [8100019]

Today i continued where i left yesterday. Fixed a lot of errors from the trace back in the last post and revealed even more. Ported some things i missed out earlier. Spent my day mostly on #gstreamer where i was asking for advice and help. Learned that i can use ipython to find out a lot of stuff by importing the module i need and with using auto complete find out what does that have. For instance i write 'Gst.Message' , press TAB and get
Gst.Message      Gst.MessageType , then i see both if they have what i need.

What problems I'm currently having

I can import GstNet in a python interactive shell, but i get this when i import it in the code:
http://pastebin.com/Q3PVAsBq

I'm trying to find out why it gives me 'No module named 'gi.repository.GstNet''

What am i planning on doing?

Import GstNet succesfully.
Fix other errors i encounter
Get the stream to work

Wednesday, July 10, 2013

Some progress and a lot more to do

What i achieved
These are the latest changes -> [e7dc610]

The problem from the last post is solved. The thing was that some modules used gtk2reactor for which i had something in an older post http://portingflumotion.blogspot.com/2013/06/things-i-did-today.html
The key line being "sys.modules['gi'] = None" . After that python cant find gi because it's set to "None", so i changed gtk2reactor to gtk3reactor and got pass that problem.
To find this out printing sys.modules and sys.path in the problematic modules was used.
I also made other changes to the boot.py file and i need to make more for all to work properly.


What problems I'm currently having

For now when i try to make a stream i get this: http://pastebin.com/yAHypEaU
With further changes to boot.py and other modules I'll get the stream to work.

What am i planning on doing?

Fix the errors in the modules which came up in the above linked  traceback.
For some of the stuff I'll maybe need assistance with someone from #gstreamer.
Get the stream to work.

Tuesday, July 9, 2013

Not finding gi

What i achieved

Set up two working flumotions which i can switch between. One i use for porting and the other is a fully working Flumotion. I shift between the two with activating the development environment [./env bash] on the one i'm porting or on the other one. I know which one i'm using simply by using the "which" command, for example "which flumotion-manager"

I installed snakefood hoping it will help me with debugging along the way.

What problems I'm currently having

I'm having the same problem from the last blog post, but now with the help of "strace" and maybe snakefood i'll resolve it.

First i open two shells and in each i activate the env for the flumotion which i'm porting. Then i start flumotion manager with "flumotion-manager -v -T tcp conf/managers/default/planet.xml"
and connect a worker using "flumotion-worker -v -T tcp -u user -p test". (NOTE: The planet file is a default one without a atmosphere and flow). Then i start "flumotion-admin" but like this:
"strace -f -o ~/Desktop/woo flumotion-admin"

Here's some of the output which i think is the key: http://pastebin.com/9EGp3BdP

First it looks for "pygobject" and eventually finds it, but then when "pygobject" imports "gi" it looks for "gi" and it doesn't find it. The trouble is that it looks for it in  "home/max/Desktop/flumotion-porting/flumotion/flumotion/common/" when "gi" is actually located in "/usr/lib/python2.7/dist-packages/gi".

Some snakefood dependency graphs i made, mostly nothing:

For package.py:
For pygobject.py:

What am i planning on doing?
Dedicate some time tomorrow on finding the root of the above mentioned problem and in the next couple of days hopefully make a successful stream under the new GStreamer.

Monday, July 8, 2013

Current state of things

I was away for 5 days and that's why the blog was left where it was. Today i tried to get back on track but i broke down my OS so i had to re-install and then install flumotion and all the dependencies again.
I'm also trying to make a test stream with the ported modules.
For now when i run flumotion-admin i get this:

File ./flumotion-admin, line 42, in <module>
    boot.boot(PROGRAM_PATH, gtk=True, gst=False)
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/common/boot.py, line 305, in boot
    sys.exit(wrapped(sys.argv))
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/admin/gtk/main.py, line 98, in main
    from flumotion.admin.gtk.adminwindow import AdminWindow
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/common/package.py, line 54, in import_module
    locals, fromlist)
  File /usr/lib/python2.7/ihooks.py, line 408, in import_module
    m = self.load_tail(q, tail)
  File /usr/lib/python2.7/ihooks.py, line 488, in load_tail
    m = self.import_it(head, mname, m)
  File /usr/lib/python2.7/ihooks.py, line 529, in import_it
    m = self.loader.load_module(fqname, stuff)
  File /usr/lib/python2.7/ihooks.py, line 272, in load_module
    m = self.hooks.load_source(name, filename, file)
  File /usr/lib/python2.7/ihooks.py, line 170, in load_source
    return imp.load_source(name, filename, file)
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/admin/gtk/adminwindow.py, line 81, in <module>
    from flumotion.admin.gtk.connections import ConnectionsDialog
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/common/package.py, line 54, in import_module
    locals, fromlist)
  File /usr/lib/python2.7/ihooks.py, line 408, in import_module
    m = self.load_tail(q, tail)
  File /usr/lib/python2.7/ihooks.py, line 488, in load_tail
    m = self.import_it(head, mname, m)
  File /usr/lib/python2.7/ihooks.py, line 529, in import_it
    m = self.loader.load_module(fqname, stuff)
  File /usr/lib/python2.7/ihooks.py, line 272, in load_module
    m = self.hooks.load_source(name, filename, file)
  File /usr/lib/python2.7/ihooks.py, line 170, in load_source
    return imp.load_source(name, filename, file)
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/admin/gtk/connections.py, line 30, in <module>
    from flumotion.common.pygobject import gsignal, gproperty
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/common/package.py, line 54, in import_module
    locals, fromlist)
  File /usr/lib/python2.7/ihooks.py, line 408, in import_module
    m = self.load_tail(q, tail)
  File /usr/lib/python2.7/ihooks.py, line 488, in load_tail
    m = self.import_it(head, mname, m)
  File /usr/lib/python2.7/ihooks.py, line 529, in import_it
    m = self.loader.load_module(fqname, stuff)
  File /usr/lib/python2.7/ihooks.py, line 272, in load_module
    m = self.hooks.load_source(name, filename, file)
  File /usr/lib/python2.7/ihooks.py, line 170, in load_source
    return imp.load_source(name, filename, file)
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/common/pygobject.py, line 26, in <module>
    from gi.repository import GObject
  File /home/max/Desktop/flumotion-porting/flumotion/flumotion/common/package.py, line 54, in import_module
    locals, fromlist)
  File /usr/lib/python2.7/ihooks.py, line 407, in import_module
    q, tail = self.find_head_package(parent, str(name))
  File /usr/lib/python2.7/ihooks.py, line 479, in find_head_package
    raise ImportError, "No module named '%s'" % qname
ImportError: No module named 'gi'

I need to find a way to fix this and get a stream as soon as posible.

Monday, July 1, 2013

Test for http streamer passed!

Finally i got it figured and the test passed.  Needed to place a call in the test for the function which deals with "avatarID" and other properties.

On another note i started figuring out how to create the basic stream pipeline. First i'll make the config file to work under the pre-port Flumotion and after i'm successful with that i'll try and re-create that with the ported modules.

This is the configuration planet.xml. For now it doesn't work, i'll need to do more debugging tomorrow.
Here some log from the worker: http://pastebin.com/Jxk244eR

TO DO:
*Get the stream working

11.07.2013 EDIT: The planet.xml i posted here is not the one i'm using, since that was a combination of old and new flumotion properties and other bad things. I didn't know then that  i can export a planet.xml from a new and working version of flumotion. This is what i'm using now http://pastebin.com/aB0m0Dhg