Need help on setting QtGstreamer element property

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Need help on setting QtGstreamer element property

ly tran
Hi,

I'm developing softphone using QtGStreamer and libnice for NAT traversal.
Libnice have nicesrc and nicesink element for RTP transmission.
I'm now having problem when setting "agent" property for nicesrc Element in QtGstreamer
Here is my code

int channel_rx(NiceAgent *v_agent,int v_stream_id){
    QGst::PipelinePtr m_pipeline;
    QGst::ElementPtr vudpsrc, videofilter, videofilter_rx, vdecoder, vdepayload, ffcolor, videosink;
    QGst::CapsPtr vcaps, rxcaps;
    QGst::BinPtr rxBin;
  rxBin = QGst::Bin::create();
    m_pipeline = QGst::Pipeline::create();

    vudpsrc = QGst::ElementFactory::make("nicesrc");
    vudpsrc->setProperty("stream", v_stream_id);
    vudpsrc->setProperty("component", 1);
    QGlib::Type type = QGlib::Type::fromInstance(v_agent);

    QGlib::Value agent_type =
 vudpsrc->property("agent");
    agent_type = QGlib::Value::create(type);
    vudpsrc->setProperty("agent", agent_type);  //compile OK but have the following error when run
//(SIPPhoneGUI:8513): GLib-GObject-WARNING **: unable to set property `agent' 
//of type `NiceAgent' from value of type `GType'
    vudpsrc->setProperty("agent", v_agent);  // cannot compile because of 
				/usr/include/QtGStreamer/QGst/../QGlib/type.h:182: error: could not convert 'QGlib::GetTypeImpl<_NiceAgent*>()' 
				from 'QGlib::GetTypeImpl<_NiceAgent*>' to 'QGlib::Type'

Can you help me how to set the "agent" property ?

Thanks.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel