Hi all,
I'm trying to learn QtGstreamer and use it with the GstEncodeBin. Unfortunately, I ran into the following problem: I'm guessing the GstEncodeBin is QGst::Bin, but what are the proper wrapper classes for GstEncodingContainerProfile and GstEncodingProfile? How do I create them in the QtGstreamer way? Thank you for your help! -V |
On Mon, Feb 13, 2012 at 10:17 AM, vaisaari <[hidden email]> wrote:
> Hi all, > > I'm trying to learn QtGstreamer and use it with the GstEncodeBin. > Unfortunately, I ran into the following problem: I'm guessing the > GstEncodeBin is QGst::Bin, but what are the proper wrapper classes for > GstEncodingContainerProfile and GstEncodingProfile? How do I create them in > the QtGstreamer way? > > Thank you for your help! > -V > Hi, There are no bindings for these classes, therefore you can only create them with the C API. You can of course, if you want, wrap them in QGst::MiniObject class instances. This will probably be useful for setting them as properties in the encodebin. Regards, George _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thank you for your quick response! Unfortunately, this goes past my knowledge :( How do I wrap them in QGst::MiniObject class instances?
Thanks, -V |
On Mon, Feb 13, 2012 at 2:44 PM, vaisaari <[hidden email]> wrote:
> Thank you for your quick response! Unfortunately, this goes past my knowledge > :( How do I wrap them in QGst::MiniObject class instances? > > Thanks, > -V GstEncodingProfile *profile = gst_whatever(); QGst::MiniObjectPtr profilePtr = QGst::MiniObjectPtr::wrap(profile); gst_mini_object_unref(profile); encodebin->setProperty("profile", profilePtr); _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
My sincerest thanks to you George!
-V |
I'm sorry to get back to this... I tried your suggestion, but the compiler returns following error:
error: no matching function for call to ‘QGlib::RefPointer<QGst::MiniObject>::wrap(GstEncodingProfile*&)’ candidate is: /usr/include/QtGStreamer/QGst/../QGlib/refpointer.h:326: static QGlib::RefPointer<T> QGlib::RefPointer<T>::wrap(typename T::CType*, bool) [with T = QGst::MiniObject, typename T::CType = _GstMiniObject] /usr/include/QtGStreamer/QGst/../QGlib/refpointer.h:326: no known conversion for argument 1 from ‘GstEncodingProfile* {aka _GstEncodingProfile*}’ to ‘QGst::MiniObject::CType* {aka _GstMiniObject*}’ -V |
On Wed, Feb 15, 2012 at 5:20 PM, vaisaari <[hidden email]> wrote:
> I'm sorry to get back to this... I tried your suggestion, but the compiler > returns following error: > > error: no matching function for call to > ‘QGlib::RefPointer<QGst::MiniObject>::wrap(GstEncodingProfile*&)’ > > candidate is: > > /usr/include/QtGStreamer/QGst/../QGlib/refpointer.h:326: static > QGlib::RefPointer<T> QGlib::RefPointer<T>::wrap(typename T::CType*, bool) > [with T = QGst::MiniObject, typename T::CType = _GstMiniObject] > > /usr/include/QtGStreamer/QGst/../QGlib/refpointer.h:326: no known > conversion for argument 1 from ‘GstEncodingProfile* {aka > _GstEncodingProfile*}’ to ‘QGst::MiniObject::CType* {aka _GstMiniObject*}’ > Erm, right, I forgot you need to cast it: QGst::MiniObjectPtr profilePtr = QGst::MiniObjectPtr::wrap(GST_MINI_OBJECT(profile)); _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Unfortunately, after casting "encodebin->setProperty("profile", profilePtr)" fails runtime:
"QGlib::Value::set: Unable to handle value type "GstMiniObject". This Value instance has been initialized to hold values of type "GstEncodingProfile" and no conversion is possible CRITICAL **: gst_encode_bin_set_profile: assertion `GST_IS_ENCODING_PROFILE (profile)' failed" -V |
On Wed, Feb 15, 2012 at 5:41 PM, vaisaari <[hidden email]> wrote:
> Unfortunately, after casting "encodebin->setProperty("profile", profilePtr)" > fails runtime: > > "QGlib::Value::set: Unable to handle value type "GstMiniObject". This Value > instance has been initialized to hold values of type "GstEncodingProfile" > and no conversion is possible > > CRITICAL **: gst_encode_bin_set_profile: assertion `GST_IS_ENCODING_PROFILE > (profile)' failed" > Right, this is actually the expected behavior according to the code :S I don't really remember why it behaves like that, I guess I should change it to get the type of the object at runtime rather than at compile time, so that it knows that your object is really a GstEncodingProfile instead of just a GstMiniObject. In the meantime, I guess you'll have to do it with the C api, i.e. g_object_set() Note that the smart pointers are implicitly convertable to their equivalent C types, so you can use a QGlib::ObjectPtr instead of a GObject* in g_object_set() directly. Sorry for the confusion. George _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |