Seeking failed with decoder plugin

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Seeking failed with decoder plugin

Wei-Di Hung
Hi,
I'm writing a plugin for HW video decoder,
functions of playing, pause and stop have been verified.

While seeking, the pipeline ran until the frame of seeking time
was decoded, i.e, it did jump to the target frame, but the test
program crashed then.

Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
(player:886): GStreamer-CRITICAL **:
Trying to dispose element decoder, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT
(object)' failed

After these message, it seemed the HW keep decoding from the paused frame to
the target frame. but the intermediate frames were not displayed.

Before decoding of each frame, came up the folloing message:
(player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
`Gstvideodec'

These are part of codes in sink event handler,
the format is GST_FORMAT_TIME in this case,

    case GST_EVENT_NEWSEGMENT:
        {
            GstFormat format;
            gint64 start, stop, position;
            gdouble rate;

            gst_event_parse_new_segment(event, NULL, &rate, &format,
                                        &start, &stop, &position);

            if (GST_FORMAT_TIME == format) {
                result = gst_pad_push_event(filter->srcpad, event);
            } else {
                   ... ...
            }
            break;
        }

Below are part of codes in source event handler:

    switch (GST_EVENT_TYPE(event)) {
    case GST_EVENT_SEEK:
        res = gst_pad_push_event(filter->sinkpad, event);
        break;
    case GST_EVENT_NAVIGATION:
    default:
        res = gst_pad_push_event(filter->sinkpad, event);
        break;
    }

    gst_object_unref(filter);
    return res;

Could someone help me finding possible root cause?
Thanks in advance.

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Wim Taymans
On Thu, 2008-11-27 at 17:31 +0800, Wei-Di Hung wrote:

> Hi,
> I'm writing a plugin for HW video decoder,
> functions of playing, pause and stop have been verified.
>
> While seeking, the pipeline ran until the frame of seeking time
> was decoded, i.e, it did jump to the target frame, but the test
> program crashed then.
>
> Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
> (player:886): GStreamer-CRITICAL **:
> Trying to dispose element decoder, but it is not in the NULL state.
> You need to explicitly set elements to the NULL state before
> dropping the final reference, to allow them to clean up.
>
> (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT
> (object)' failed
>
> After these message, it seemed the HW keep decoding from the paused frame to
> the target frame. but the intermediate frames were not displayed.
>
> Before decoding of each frame, came up the folloing message:
> (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
> `Gstvideodec'
>
> These are part of codes in sink event handler,
> the format is GST_FORMAT_TIME in this case,
>
>     case GST_EVENT_NEWSEGMENT:
> {
>    GstFormat format;
>    gint64 start, stop, position;
>    gdouble rate;
>
>    gst_event_parse_new_segment(event, NULL, &rate, &format,
> &start, &stop, &position);
>
>    if (GST_FORMAT_TIME == format) {
> result = gst_pad_push_event(filter->srcpad, event);
>    } else {
>                    ... ...
>    }
>    break;
> }
>
> Below are part of codes in source event handler:
>
>     switch (GST_EVENT_TYPE(event)) {
>     case GST_EVENT_SEEK:
> res = gst_pad_push_event(filter->sinkpad, event);
> break;
>     case GST_EVENT_NAVIGATION:
>     default:
> res = gst_pad_push_event(filter->sinkpad, event);
> break;
>     }
>
>     gst_object_unref(filter);
>     return res;
>
> Could someone help me finding possible root cause?

You unref the decoder object too much, check the refcounting especially
in the event handler.

Wim

> Thanks in advance.
>
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Sudarshan Bisht
In reply to this post by Wei-Di Hung
Hi ,,
      Are you using demuxer also in pipeline ?  
On Thu, Nov 27, 2008 at 3:01 PM, Wei-Di Hung <[hidden email]> wrote:
Hi,
I'm writing a plugin for HW video decoder,
functions of playing, pause and stop have been verified.

While seeking, the pipeline ran until the frame of seeking time
was decoded, i.e, it did jump to the target frame, but the test
program crashed then.

Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
(player:886): GStreamer-CRITICAL **:
Trying to dispose element decoder, but it is not in the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.

(player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT
(object)' failed

After these message, it seemed the HW keep decoding from the paused frame to
the target frame. but the intermediate frames were not displayed.

Before decoding of each frame, came up the folloing message:
(player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
`Gstvideodec'

These are part of codes in sink event handler,
the format is GST_FORMAT_TIME in this case,

   case GST_EVENT_NEWSEGMENT:
       {
           GstFormat format;
           gint64 start, stop, position;
           gdouble rate;

           gst_event_parse_new_segment(event, NULL, &rate, &format,
                                       &start, &stop, &position);

           if (GST_FORMAT_TIME == format) {
               result = gst_pad_push_event(filter->srcpad, event);
           } else {
                  ... ...
           }
           break;
       }

Below are part of codes in source event handler:

   switch (GST_EVENT_TYPE(event)) {
   case GST_EVENT_SEEK:
       res = gst_pad_push_event(filter->sinkpad, event);
       break;
   case GST_EVENT_NAVIGATION:
   default:
       res = gst_pad_push_event(filter->sinkpad, event);
       break;
   }

   gst_object_unref(filter);
   return res;

Could someone help me finding possible root cause?
Thanks in advance.

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Wei-Di Hung
Yes, I use ffdemux_avi here.

> Hi ,,
>       Are you using demuxer also in pipeline ?  
>
> On Thu, Nov 27, 2008 at 3:01 PM, Wei-Di Hung <[hidden email]> wrote:
>
Hi,
> I'm writing a plugin for HW video decoder,
> functions of playing, pause and stop have been verified.
>
> While seeking, the pipeline ran until the frame of seeking time
> was decoded, i.e, it did jump to the target frame, but the test
> program crashed then.
>
> Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
> (player:886): GStreamer-CRITICAL **:
> Trying to dispose element decoder, but it is not in the NULL state.
> You need to explicitly set elements to the NULL state before
> dropping the final reference, to allow them to clean up.
>
> (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT
> (object)' failed
>
> After these message, it seemed the HW keep decoding from the paused frame to
> the target frame. but the intermediate frames were not displayed.
>
> Before decoding of each frame, came up the folloing message:
> (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
> `Gstvideodec'
>
> These are part of codes in sink event handler,
> the format is GST_FORMAT_TIME in this case,
>
>    case GST_EVENT_NEWSEGMENT:
>        {
>            GstFormat format;
>            gint64 start, stop, position;
>            gdouble rate;
>
>             gst_event_parse_new_segment(event, NULL, &rate, &format,
>                                        &start, &stop, &position);
>
>            if (GST_FORMAT_TIME == format) {
>                result = gst_pad_push_event(filter->srcpad, event);
>            } else {
>                   ... ...
>            }
>             break;
>        }
>
> Below are part of codes in source event handler:
>
>    switch (GST_EVENT_TYPE(event)) {
>    case GST_EVENT_SEEK:
>        res = gst_pad_push_event(filter->sinkpad, event);
>        break;
>    case GST_EVENT_NAVIGATION:
>    default:
>        res = gst_pad_push_event(filter->sinkpad, event);
>        break;
>    }
>
>     gst_object_unref(filter);
>    return res;
>
> Could someone help me finding possible root cause?
> Thanks in advance.
>
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

>

> --
> Regards,
>
> Sudarshan Bisht



-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Sudarshan Bisht
Hi ,
        Can u tell me how you are creating filter instance in src_event function .  

On Thu, Nov 27, 2008 at 3:29 PM, Wei-Di Hung <[hidden email]> wrote:
Yes, I use ffdemux_avi here.
> Hi ,,
>       Are you using demuxer also in pipeline ?  
>
> On Thu, Nov 27, 2008 at 3:01 PM, Wei-Di Hung <[hidden email]> wrote:
>
Hi,
> I'm writing a plugin for HW video decoder,
> functions of playing, pause and stop have been verified.
>
> While seeking, the pipeline ran until the frame of seeking time
> was decoded, i.e, it did jump to the target frame, but the test
> program crashed then.
>
> Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
> (player:886): GStreamer-CRITICAL **:
> Trying to dispose element decoder, but it is not in the NULL state.
> You need to explicitly set elements to the NULL state before
> dropping the final reference, to allow them to clean up.
>
> (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT
> (object)' failed
>
> After these message, it seemed the HW keep decoding from the paused frame to
> the target frame. but the intermediate frames were not displayed.
>
> Before decoding of each frame, came up the folloing message:
> (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
> `Gstvideodec'
>
> These are part of codes in sink event handler,
> the format is GST_FORMAT_TIME in this case,
>
>    case GST_EVENT_NEWSEGMENT:
>        {
>            GstFormat format;
>            gint64 start, stop, position;
>            gdouble rate;
>
>             gst_event_parse_new_segment(event, NULL, &rate, &format,
>                                        &start, &stop, &position);
>
>            if (GST_FORMAT_TIME == format) {
>                result = gst_pad_push_event(filter->srcpad, event);
>            } else {
>                   ... ...
>            }
>             break;
>        }
>
> Below are part of codes in source event handler:
>
>    switch (GST_EVENT_TYPE(event)) {
>    case GST_EVENT_SEEK:
>        res = gst_pad_push_event(filter->sinkpad, event);
>        break;
>    case GST_EVENT_NAVIGATION:
>    default:
>        res = gst_pad_push_event(filter->sinkpad, event);
>        break;
>    }
>
>     gst_object_unref(filter);
>    return res;
>
> Could someone help me finding possible root cause?
> Thanks in advance.
>
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

>

> --
> Regards,
>
> Sudarshan Bisht



-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Regards,

Sudarshan Bisht

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Edward Hervey
Administrator
In reply to this post by Wei-Di Hung
Using the 'avidemux' element from gst-plugins-good instead of
ffdemux_avi might remove some of the issues you're seeing.

   Edward

On Thu, 2008-11-27 at 17:59 +0800, Wei-Di Hung wrote:

> Yes, I use ffdemux_avi here.
> > Hi ,,
> >       Are you using demuxer also in pipeline ?  
> >
> > On Thu, Nov 27, 2008 at 3:01 PM, Wei-Di Hung
> <[hidden email]> wrote:
> >
>         Hi,
>         > I'm writing a plugin for HW video decoder,
>         > functions of playing, pause and stop have been verified.
>         >
>         > While seeking, the pipeline ran until the frame of seeking
>         time
>         > was decoded, i.e, it did jump to the target frame, but the
>         test
>         > program crashed then.
>         >
>         > Here are messages shown after the sink pad received
>         GST_EVENT_NEW_SEGMENT:
>         > (player:886): GStreamer-CRITICAL **:
>         > Trying to dispose element decoder, but it is not in the NULL
>         state.
>         > You need to explicitly set elements to the NULL state
>         before
>         > dropping the final reference, to allow them to clean up.
>         >
>         > (player:886): GLib-GObject-CRITICAL **: g_object_ref:
>         assertion `G_IS_OBJECT
>         > (object)' failed
>         >
>         > After these message, it seemed the HW keep decoding from the
>         paused frame to
>         > the target frame. but the intermediate frames were not
>         displayed.
>         >
>         > Before decoding of each frame, came up the folloing
>         message:
>         > (player:886): GLib-GObject-WARNING **: invalid unclassed
>         pointer in cast to
>         > `Gstvideodec'
>         >
>         > These are part of codes in sink event handler,
>         > the format is GST_FORMAT_TIME in this case,
>         >
>         >    case GST_EVENT_NEWSEGMENT:
>         >        {
>         >            GstFormat format;
>         >            gint64 start, stop, position;
>         >            gdouble rate;
>         >
>         >             gst_event_parse_new_segment(event, NULL, &rate,
>         &format,
>         >                                        &start, &stop,
>         &position);
>         >
>         >            if (GST_FORMAT_TIME == format) {
>         >                result = gst_pad_push_event(filter->srcpad,
>         event);
>         >            } else {
>         >                   ... ...
>         >            }
>         >             break;
>         >        }
>         >
>         > Below are part of codes in source event handler:
>         >
>         >    switch (GST_EVENT_TYPE(event)) {
>         >    case GST_EVENT_SEEK:
>         >        res = gst_pad_push_event(filter->sinkpad, event);
>         >        break;
>         >    case GST_EVENT_NAVIGATION:
>         >    default:
>         >        res = gst_pad_push_event(filter->sinkpad, event);
>         >        break;
>         >    }
>         >
>         >     gst_object_unref(filter);
>         >    return res;
>         >
>         > Could someone help me finding possible root cause?
>         > Thanks in advance.
>         >
>         >
>         -------------------------------------------------------------------------
>         > 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
>         > [hidden email]
>         >
>         https://lists.sourceforge.net/lists/listinfo/gstreamer-devel 
>         >
>
> >
>
> > --
> > Regards,
> >
> > Sudarshan Bisht
>
>
> -------------------------------------------------------------------------
> 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Wei-Di Hung
In reply to this post by Wim Taymans
Thank you, Wim!
After removing the unref in source event handler,
the test program doen't crash while seeking.

It seems the decoder just keep decoding the frames
between the current frame and seeking target frame,
they just don't show up. Is that correct?

On Thu, 27 Nov 2008 10:41:11 +0100, Wim Taymans wrote

> On Thu, 2008-11-27 at 17:31 +0800, Wei-Di Hung wrote:
> > Hi,
> > I'm writing a plugin for HW video decoder,
> > functions of playing, pause and stop have been verified.
> >
> > While seeking, the pipeline ran until the frame of seeking time
> > was decoded, i.e, it did jump to the target frame, but the test
> > program crashed then.
> >
> > Here are messages shown after the sink pad received GST_EVENT_NEW_SEGMENT:
> > (player:886): GStreamer-CRITICAL **:
> > Trying to dispose element decoder, but it is not in the NULL state.
> > You need to explicitly set elements to the NULL state before
> > dropping the final reference, to allow them to clean up.
> >
> > (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT
> > (object)' failed
> >
> > After these message, it seemed the HW keep decoding from the paused frame
to
> > the target frame. but the intermediate frames were not displayed.
> >
> > Before decoding of each frame, came up the folloing message:
> > (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast
to

> > `Gstvideodec'
> >
> > These are part of codes in sink event handler,
> > the format is GST_FORMAT_TIME in this case,
> >
> >     case GST_EVENT_NEWSEGMENT:
> > {
> >    GstFormat format;
> >    gint64 start, stop, position;
> >    gdouble rate;
> >
> >    gst_event_parse_new_segment(event, NULL, &rate, &format,
> > &start, &stop, &position);
> >
> >    if (GST_FORMAT_TIME == format) {
> > result = gst_pad_push_event(filter->srcpad, event);
> >    } else {
> >                    ... ...
> >    }
> >    break;
> > }
> >
> > Below are part of codes in source event handler:
> >
> >     switch (GST_EVENT_TYPE(event)) {
> >     case GST_EVENT_SEEK:
> > res = gst_pad_push_event(filter->sinkpad, event);
> > break;
> >     case GST_EVENT_NAVIGATION:
> >     default:
> > res = gst_pad_push_event(filter->sinkpad, event);
> > break;
> >     }
> >
> >     gst_object_unref(filter);
> >     return res;
> >
> > Could someone help me finding possible root cause?
>
> You unref the decoder object too much, check the refcounting especially
> in the event handler.
>
> Wim
>
> > Thanks in advance.
> >
> > -------------------------------------------------------------------------
> > 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
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Wei-Di Hung
In reply to this post by Sudarshan Bisht
This is what I'm using:
    Gstmp4dec * filter = GST_MP4DEC(GST_PAD_PARENT(pad));

So it doen't have to unref the filter
while creating the filter instance this way?

Actually I'm not clear with gobject references
and I'll try to find it out.

On Thu, 27 Nov 2008 16:24:06 +0530, sudarshan bisht wrote
> Hi ,
> Can u tell me how you are creating filter instance in src_event function .
>
> On Thu, Nov 27, 2008 at 3:29 PM, Wei-Di Hung <[hidden email]>
wrote:
>  
> Yes, I use ffdemux_avi here.
>
> > Hi ,,
> > Are you using demuxer also in pipeline ?
> >
> > On Thu, Nov 27, 2008 at 3:01 PM, Wei-Di Hung
<[hidden email]> wrote:
> > Hi,
> > I'm writing a plugin for HW video decoder,
> > functions of playing, pause and stop have been verified.
> >
> > While seeking, the pipeline ran until the frame of seeking time
> > was decoded, i.e, it did jump to the target frame, but the test
> > program crashed then.
> >
> > Here are messages shown after the sink pad received
GST_EVENT_NEW_SEGMENT:
> > (player:886): GStreamer-CRITICAL **:
> > Trying to dispose element decoder, but it is not in the NULL state.
> > You need to explicitly set elements to the NULL state before
> > dropping the final reference, to allow them to clean up.
> >
> > (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT
> > (object)' failed
> >
> > After these message, it seemed the HW keep decoding from the paused frame
to
> > the target frame. but the intermediate frames were not displayed.
> >
> > Before decoding of each frame, came up the folloing message:
> > (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast
to

> > `Gstvideodec'
> >
> > These are part of codes in sink event handler,
> > the format is GST_FORMAT_TIME in this case,
> >
> > case GST_EVENT_NEWSEGMENT:
> > {
> > GstFormat format;
> > gint64 start, stop, position;
> > gdouble rate;
> >
> > gst_event_parse_new_segment(event, NULL, &rate, &format,
> > &start, &stop, &position);
> >
> > if (GST_FORMAT_TIME == format) {
> > result = gst_pad_push_event(filter->srcpad, event);
> > } else {
> > ... ...
> > }
> > break;
> > }
> >
> > Below are part of codes in source event handler:
> >
> > switch (GST_EVENT_TYPE(event)) {
> > case GST_EVENT_SEEK:
> > res = gst_pad_push_event(filter->sinkpad, event);
> > break;
> > case GST_EVENT_NAVIGATION:
> > default:
> > res = gst_pad_push_event(filter->sinkpad, event);
> > break;
> > }
> >
> > gst_object_unref(filter);
> > return res;
> >
> > Could someone help me finding possible root cause?
> > Thanks in advance.
> >
> > -------------------------------------------------------------------------
> > 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
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel 
> >  
> >  
> > --
> > Regards,
> >
> > Sudarshan Bisht
>
>  
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel 
>
>  
>  
> --
> Regards,
>
> Sudarshan Bisht


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Sudarshan Bisht
Hi Hung.
           Exactly ,  you are right , don't unref the filter instance  .

On Fri, Nov 28, 2008 at 8:30 AM, Wei-Di Hung <[hidden email]> wrote:
This is what I'm using:
   Gstmp4dec * filter = GST_MP4DEC(GST_PAD_PARENT(pad));

So it doen't have to unref the filter
while creating the filter instance this way?

Actually I'm not clear with gobject references
and I'll try to find it out.

On Thu, 27 Nov 2008 16:24:06 +0530, sudarshan bisht wrote
> Hi ,
> Can u tell me how you are creating filter instance in src_event function .
>
> On Thu, Nov 27, 2008 at 3:29 PM, Wei-Di Hung <[hidden email]>
wrote:
>
> Yes, I use ffdemux_avi here.
>
> > Hi ,,
> > Are you using demuxer also in pipeline ?
> >
> > On Thu, Nov 27, 2008 at 3:01 PM, Wei-Di Hung
<[hidden email]> wrote:
> > Hi,
> > I'm writing a plugin for HW video decoder,
> > functions of playing, pause and stop have been verified.
> >
> > While seeking, the pipeline ran until the frame of seeking time
> > was decoded, i.e, it did jump to the target frame, but the test
> > program crashed then.
> >
> > Here are messages shown after the sink pad received
GST_EVENT_NEW_SEGMENT:
> > (player:886): GStreamer-CRITICAL **:
> > Trying to dispose element decoder, but it is not in the NULL state.
> > You need to explicitly set elements to the NULL state before
> > dropping the final reference, to allow them to clean up.
> >
> > (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT
> > (object)' failed
> >
> > After these message, it seemed the HW keep decoding from the paused frame
to
> > the target frame. but the intermediate frames were not displayed.
> >
> > Before decoding of each frame, came up the folloing message:
> > (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in cast
to
> > `Gstvideodec'
> >
> > These are part of codes in sink event handler,
> > the format is GST_FORMAT_TIME in this case,
> >
> > case GST_EVENT_NEWSEGMENT:
> > {
> > GstFormat format;
> > gint64 start, stop, position;
> > gdouble rate;
> >
> > gst_event_parse_new_segment(event, NULL, &rate, &format,
> > &start, &stop, &position);
> >
> > if (GST_FORMAT_TIME == format) {
> > result = gst_pad_push_event(filter->srcpad, event);
> > } else {
> > ... ...
> > }
> > break;
> > }
> >
> > Below are part of codes in source event handler:
> >
> > switch (GST_EVENT_TYPE(event)) {
> > case GST_EVENT_SEEK:
> > res = gst_pad_push_event(filter->sinkpad, event);
> > break;
> > case GST_EVENT_NAVIGATION:
> > default:
> > res = gst_pad_push_event(filter->sinkpad, event);
> > break;
> > }
> >
> > gst_object_unref(filter);
> > return res;
> >
> > Could someone help me finding possible root cause?
> > Thanks in advance.
> >
> > -------------------------------------------------------------------------
> > 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
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> >
> > --
> > Regards,
> >
> > Sudarshan Bisht
>
>
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
> --
> Regards,
>
> Sudarshan Bisht


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Seeking failed with decoder plugin

Wei-Di Hung
In reply to this post by Wei-Di Hung
On Fri, 28 Nov 2008 10:52:47 +0800, Wei-Di Hung wrote
> Thank you, Wim!
> After removing the unref in source event handler,
> the test program doen't crash while seeking.
>
> It seems the decoder just keep decoding the frames
> between the current frame and seeking target frame,
> they just don't show up. Is that correct?

It's because there are no I-frames between the current frame and
the seeking target frame.

>
> On Thu, 27 Nov 2008 10:41:11 +0100, Wim Taymans wrote
> > On Thu, 2008-11-27 at 17:31 +0800, Wei-Di Hung wrote:
> > > Hi,
> > > I'm writing a plugin for HW video decoder,
> > > functions of playing, pause and stop have been verified.
> > >
> > > While seeking, the pipeline ran until the frame of seeking time
> > > was decoded, i.e, it did jump to the target frame, but the test
> > > program crashed then.
> > >
> > > Here are messages shown after the sink pad received
GST_EVENT_NEW_SEGMENT:

> > > (player:886): GStreamer-CRITICAL **:
> > > Trying to dispose element decoder, but it is not in the NULL state.
> > > You need to explicitly set elements to the NULL state before
> > > dropping the final reference, to allow them to clean up.
> > >
> > > (player:886): GLib-GObject-CRITICAL **: g_object_ref: assertion
> `G_IS_OBJECT
> > > (object)' failed
> > >
> > > After these message, it seemed the HW keep decoding from the paused
frame
> to
> > > the target frame. but the intermediate frames were not displayed.
> > >
> > > Before decoding of each frame, came up the folloing message:
> > > (player:886): GLib-GObject-WARNING **: invalid unclassed pointer in
cast

> to
> > > `Gstvideodec'
> > >
> > > These are part of codes in sink event handler,
> > > the format is GST_FORMAT_TIME in this case,
> > >
> > >     case GST_EVENT_NEWSEGMENT:
> > > {
> > >    GstFormat format;
> > >    gint64 start, stop, position;
> > >    gdouble rate;
> > >
> > >    gst_event_parse_new_segment(event, NULL, &rate, &format,
> > > &start, &stop, &position);
> > >
> > >    if (GST_FORMAT_TIME == format) {
> > > result = gst_pad_push_event(filter->srcpad, event);
> > >    } else {
> > >                    ... ...
> > >    }
> > >    break;
> > > }
> > >
> > > Below are part of codes in source event handler:
> > >
> > >     switch (GST_EVENT_TYPE(event)) {
> > >     case GST_EVENT_SEEK:
> > > res = gst_pad_push_event(filter->sinkpad, event);
> > > break;
> > >     case GST_EVENT_NAVIGATION:
> > >     default:
> > > res = gst_pad_push_event(filter->sinkpad, event);
> > > break;
> > >     }
> > >
> > >     gst_object_unref(filter);
> > >     return res;
> > >
> > > Could someone help me finding possible root cause?
> >
> > You unref the decoder object too much, check the refcounting especially
> > in the event handler.
> >
> > Wim
> >
> > > Thanks in advance.
> > >
> > > ------------------------------------------------------------------------
-

> > > 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
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> > -------------------------------------------------------------------------
> > 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
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> -------------------------------------------------------------------------
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel