[gst-devel] Problem inheriting from GstVideoSink class
Maupin, Chase
chase.maupin at ti.com
Wed Sep 3 19:51:27 CEST 2008
I just wanted to let everyone know that I figured out my problem. I did not have the sync member in the base sync class set which is why I was not seeing frames dropped.
Sincerely,
Chase Maupin
Software Applications
Catalog DSP Products
e-mail: chase.maupin at ti.com
phone: (281) 274-3285
> -----Original Message-----
> From: gstreamer-devel-bounces at lists.sourceforge.net
> [mailto:gstreamer-devel-bounces at lists.sourceforge.net] On
> Behalf Of Maupin, Chase
> Sent: Wednesday, September 03, 2008 9:36 AM
> To: gstreamer-devel at lists.sourceforge.net
> Subject: [gst-devel] Problem inheriting from GstVideoSink class
>
> All,
>
> I am working on writing a video sink and I am trying to
> inherit from the GstVideoSink class so that I get
> functionality such as dropping frames that are past their
> display time. I have a reference video sink which uses this
> class and for experimentation purposes I placed a 1 second
> delay in the render function. I observed that the display
> times in the buffers given to the sink were now 1 second
> apart and the video was skipping as I would expect. I put
> the same delay in my video sink and I am still seeing time
> stamps that are only .033 seconds apart. Basically the
> frames that should have been thrown away during the delay are
> just getting queued up and arrive in order after the delay.
>
> I am doing the following to inherit from the GstVideoSink class:
>
> - In my .c code I am using
> #define _do_init(bla) \
> GST_DEBUG_CATEGORY_INIT
> (gst_tidmaivideosink_debug, "TIDmaiVideoSink", 0,
> "TIDmaiVideoSink Element");
> GST_BOILERPLATE_FULL (GstTIDmaiVideoSink,
> gst_tidmaivideosink, GstVideoSink, GST_TYPE_VIDEO_SINK, _do_init);
>
> - In my .h code I am doing the following
> - Define a member GstVideoSink videosink as the first
> member of my GstTIDmaiVideoSink structure
> - Define a member GstVideoSinkClass parent_class as the
> first member of my GstTIDmaiVideoSinkClass structure
>
> Lastly, in my makefile I am adding $(GST_BASE_LIBS),
> $(GST_PLUGINS_BASE_LIBS) and -lgstvideo-0.10 to my LIBADD variable.
>
> Even with all of this I don't seem to be getting the lateness
> property set correctly. I ran the compile of my plugin and
> stopped after the pre-processor to see what the
> GST_BOILERPLATE_FULL macro was expanding out to. I see the
> following output:
>
> static void gst_tidmaivideosink_base_init (gpointer g_class);
> static void gst_tidmaivideosink_class_init
> (GstTIDmaiVideoSinkClass *g_class); static void
> gst_tidmaivideosink_init (GstTIDmaiVideoSink *object,
> GstTIDmaiVideoSinkClass *g_class); static GstVideoSinkClass
> *parent_class = ((void *)0); static void
> gst_tidmaivideosink_class_init_trampoline (gpointer g_class,
> gpointer data) {
> parent_class = (GstVideoSinkClass *)
> g_type_class_peek_parent (g_class);
> gst_tidmaivideosink_class_init ((GstTIDmaiVideoSinkClass
> *)g_class); } GType gst_tidmaivideosink_get_type (void);
> GType gst_tidmaivideosink_get_type (void) {
> static GType object_type = 0;
> if ((__builtin_expect (__extension__ ({ int
> _g_boolean_var_; if (object_type == 0) _g_boolean_var_ = 1;
> else _g_boolean_var_ = 0; _g_boolean_var_; }), 0))) {
> static const GTypeInfo object_info = { sizeof
> (GstTIDmaiVideoSinkClass), gst_tidmaivideosink_base_init,
> ((void *)0), gst_tidmaivideosink_class_init_trampoline,
> ((void *)0), ((void *)0), sizeof (GstTIDmaiVideoSink), 0,
> (GInstanceInitFunc) gst_tidmaivideosink_init };
> object_type = g_type_register_static
> ((gst_video_sink_get_type()), "GstTIDmaiVideoSink",
> &object_info, (GTypeFlags) 0);
> (void) __extension__ ({ if (gst_tidmaivideosink_debug ==
> ((void *)0)) gst_tidmaivideosink_debug =
> _gst_debug_category_new ("TIDmaiVideoSink",0,"TIDmaiVideoSink
> Element"); });; } return object_type; };
>
> Notice that object_type is being set to use
> gst_video_sink_get_type() for the parent class.
>
> Can anyone please tell me what I am missing about inheriting
> from the VideoSink class and why I don't seem to be getting
> the default max_lateness behavior that the VideoSink class
> defines. I will provide full source code if needed but I
> didn't want to make this e-mail too ugly to begin.
>
> Sincerely,
> Chase Maupin
> Software Applications
> Catalog DSP Products
> e-mail: chase.maupin at ti.com
>
>
> --------------------------------------------------------------
> -----------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge Build the coolest Linux based
> applications with Moblin SDK & win great prizes Grand prize
> is a trip for two to an Open Source event anywhere in the
> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
More information about the gstreamer-devel
mailing list