Hi,
I am referencing the GStreamer Application Development Manual 1.8.3, 2nd page of chapter 17. Example code of how to implement a custom GstTaskPool for use in the Stream Status message callbacks does not compile. There are some obvious typos that I corrected ( e.g. TEST_TYPE_RT_POOL is not defined, and I believe convention is to only capitalize the 1st letter of each of the name parts) but I still cannot get this code to compile. I get the following error: cRTPStream.cpp:1387:16: error: variable or field ‘test_rt_pool_init’ declared void G_DEFINE_TYPE (TestRtPool, test_rt_pool, GST_TYPE_TASK_POOL); The test_rt_pool_init() is indeed defined to return void. I am admittedly weak in the finer points of the GObject class system, but my references show that all of the GObject instance and class init functions should be defined to return void. So I am at a loss as to what is going on here. Thanks, -Andres |
On Fri, 2016-09-02 at 11:23 -0700, Andres Gonzalez wrote:
Hi Andres, > I am referencing the GStreamer Application Development Manual 1.8.3, > 2nd page of chapter 17. Example code of how to implement a custom > GstTaskPool for use in the Stream Status message callbacks does not > compile. There are some obvious typos that I corrected ( e.g. > TEST_TYPE_RT_POOL is not defined, and I believe convention is to only > capitalize the 1st letter of each of the name parts) but I still > cannot get this code to compile. I get the following error: > > cRTPStream.cpp:1387:16: error: variable or field ‘test_rt_pool_init’ > declared void > G_DEFINE_TYPE (TestRtPool, test_rt_pool, GST_TYPE_TASK_POOL); > > The test_rt_pool_init() is indeed defined to return void. I am > admittedly weak in the finer points of the GObject class system, but > my references show that all of the GObject instance and class init > functions should be defined to return void. So I am at a loss as to > what is going on here. It's hard to help here without knowing what changes you made exactly, ie. seeing your code. You get a random error after making random changes to the code :) The code should compile just fine as-is if you add the following at the beginning: #include <gst/gst.h> #define TEST_TYPE_RT_POOL test_rt_pool_get_type() typedef struct { GstTaskPool parent; } TestRTPool; typedef struct { GstTaskPoolClass parent; } TestRTPoolClass; (It says it's only the implementation part after all :)) Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com Join us at the GStreamer Conference: 10-11 October 2016 in Berlin, Germany _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Tim,
You are right, I should have been more conscientious in my code and question. All of the GObject stuff was confusing to me so I went back and studied up on how to define a derived GObject class, so this is starting to make a little more sense to me now. Thanks for your help and patience with me. -Andres |
Free forum by Nabble | Edit this page |