Re: gstreamermm ghost pad incomplete



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.

> This one I think should be addressed by comparing C and C++ 
> functionality.  I would encourage you to test both C and C++ versions 
> (ignoring the warning above for now) and see if there is a difference in 
> functionality.  If you find anything, I'll be happy to  look into it, 
> but I'd really appreciate it if, as already described, you could file it 
> in bugzilla if you find a bug.  Please be sure to post both the C and 
> the C++ examples (as brief as possible) with the report.  Really 
> appreciate you testing things out.

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





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