Re: libseed-list Digest, Vol 5, Issue 7



This is a working version - it plays an mp3 quite nicely

http://www.akbkhome.com/svn/seed/seedbugs/gst_59537.js

The biggest change to the code is that the uri has to be in the format
file:/tmp/test.mp3


Note there are a few changes to seed and gir required (to handle the messaging / error reporting)

These are:

a) seed_gi_argument_make_js - handle error types (and throw an excpetion) -
Not sure if this is the best behaviour, as in the gst example, it get called from the msg.parse_error() call..

case GI_TYPE_TAG_ERROR:
seed_make_exception_from_gerror (ctx, exception, (GError*) arg->v_pointer);
   return false;

b) parse_error signature should look like this.
* note that gerror and debug are both 'out' arguments.
* the gchar** is defined as an array in my gir file - it's modified to a standard type.

<method name="parse_error"
             c:identifier="gst_message_parse_error"
doc="Extracts the GError and debug string from the GstMessage. The values returned
in the output arguments are copies; the caller must free them when done.
MT safe.">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
<parameter name="gerror" direction="out" transfer-ownership="full">
           <type name="GLib.Error" c:type="GError**"/>
         </parameter>
<parameter name="debug" direction="out" transfer-ownership="full">
             <type name="utf8" c:type="gchar**"/>
         </parameter>
       </parameters>
     </method>

Regards
Alan


Alan Forbes wrote:
Hi Alan

I wouldn't worry too much about this especially if you've got more
important things to look at.

On Fri, 2010-02-19 at 09:05 +0800, Alan Knowles wrote:
I'll try and have another go at looking at this, It took me a while to dig through the source to gather that the GObject does not use the introspection calls, rather it's a base class defined in seed.

Regards
Alan


Alan Forbes wrote:
I took the uri I used with the C example which successfully played a
music mp3 files as well as the below code line and added it to the
program that still did not work i.e. there was no music coming from
speakers.

It may mean there could be a problem with the playbin/playbin factory
element rather than uri handling? I don't mean this to be a criticism
but the gstreamer framework is a bit complicated for doing simple tasks
like playing media files so I am going to print out the GObject & G
GStreamer reference manuals and study them rather than my usual approach
of jumping in at the deep end and tinkering with the code until I get it
(which I think will be quicker!!)
properties are supported by setter/getter hooks.

eg.

pipeline.uri = url

is equivilant to

g_object_set_property("uri", gvalue_of_url)

Regards
Alan
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]