Re: gstreamermm ghost pad incomplete
- From: José Alburquerque <jaalburquerque cox net>
- To: Marcus Brinkmann <marcus brinkmann ruhr-uni-bochum de>
- Cc: gtkmm-list gnome org
- Subject: Re: gstreamermm ghost pad incomplete
- Date: Thu, 19 Jun 2008 15:23:22 -0400
Marcus Brinkmann wrote:
At Thu, 19 Jun 2008 00:11:37 -0400,
José Alburquerque <jaalburquerque cox net> wrote:
I just submitted a bug report about this to gstreamer because it looks
like it's related to the way that the underlying GObject is constructed
without construction properties
(http://bugzilla.gnome.org/show_bug.cgi?id=539055). I want to wait and
see what gstreamer says about this before I make a decision about how to
fix this warning, but the good news is that though the warning appears,
this does not affect object creation. I admit the warning is not pretty
so I'll see what I can do in the mean time.
Uhm, thanks, I guess, but please let me assure you that the object is
not properly created. Otherwise, it would have a target pad or
direction after creation, and it doesn't. Thus, the follow up errors.
<snipped>
Ok, hope this helps:
C program:
-------------------------------
#include <gst/gst.h>
int
main (int argc,
char *argv[])
{
GstPad *gpad;
gst_init (&argc, &argv);
gpad = gst_ghost_pad_new_no_target ("gpad", GST_PAD_SINK);
printf ("direction %i\n", gst_pad_get_direction (GST_PAD (gpad)));
return 0;
}
--------------------------------
$ make good CFLAGS="`pkg-config --cflags --libs gstreamer-0.10`"
$ ./good
direction 2
Note that the direction is set to 2, as expected. Below, it is 0.
C++ program:
----------------------------------
#include <iostream>
#include <gstreamermm.h>
int
main (int argc, char *argv[])
{
Gst::init (argc, argv);
Glib::RefPtr<Gst::GhostPad> gpad
= Gst::GhostPad::create ("gpad", Gst::PAD_SINK);
std::cout << "direction " << gpad->get_direction() << std::endl;
return 0;
}
----------------------------------
$ make bad CXXFLAGS="`pkg-config --cflags --libs gstreamermm-0.10`"
$ ./bad
(bad:11166): glibmm-WARNING **: Glib::ConstructParams::ConstructParams(): object class "gtkmm__GstGhostPad" has no property named "dir"
direction 0
(bad:11166): GStreamer-CRITICAL **: gst_pad_set_activatepull_function: assertion `GST_IS_PAD (pad)' failed
(bad:11166): GStreamer-CRITICAL **: gst_pad_set_activatepush_function: assertion `GST_IS_PAD (pad)' failed
(bad:11166): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(bad:11166): GLib-GObject-CRITICAL **: g_signal_handler_disconnect: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(bad:11166): GStreamer-CRITICAL **: gst_pad_get_peer: assertion `GST_IS_PAD (pad)' failed
Segmentation fault
Okay. I think you're right on this and the errors are a reflection that
there is something wrong when pads are created. I traced your first c++
example and even the one you've just submitted and the pad does seem to
exist after creation (you can tell this from the `direction 0' output of
your c++ example: if the pad did not exist, the `std::cout << ... <<
pad->get_direction() << ...' could not execute), but it simply is not
created properly. The reason for this is that it is probably necessary
to use the gst_ghost_pad_new_* functions directly in the Gst::GhostPad
constructors (and probably something similar in the Gst::Pad
constructors) and not the generic g_object_newv()
<http://library.gnome.org/devel/gobject/2.17/gobject-The-Base-Object-Type.html#g-object-newv>
which I think should work (I'm still picking things up about how things
with GObject work) but doesn't seem to produce the desired results. The
errors are actually a result of the destruction of the pad and look like
they're also related to how the Gst::GhostPad is created in the first
place. Again, thanks for pointing this out and I'll try to fix this
shortly.
--
José Alburquerque
jaalburquerque cox net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]