state change

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

state change

arnabsamanta
 Hi All,
        during state change of my plug in i am calling a function QUEUE3_De_Init()
but its not getting called .
        QUEUE3_De_Init() de-initializes all the initialized variables in the code.
        the implementation is as such

         static GstStateChangeReturn gst_queue3_change_state (GstElement * element,
GstStateChange transition)
        {
        Gstqueue3 *queue3;
        abuffer = GST_QUEUE3 (element);

        GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;

        switch (transition) {
                case GST_STATE_CHANGE_NULL_TO_READY:
                        break;
                case GST_STATE_CHANGE_READY_TO_PAUSED:
                        break;
                case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
                        break;
                default:
                        break;
        }

        ret = GST_ELEMENT_CLASS (parent_class)->change_state (element,
transition);

        switch (transition) {
                case GST_STATE_CHANGE_PLAYING_TO_PAUSED:

                        break;
                case GST_STATE_CHANGE_PAUSED_TO_READY:
                        break;
                case GST_STATE_CHANGE_READY_TO_NULL:
                        QUEUE3_De_Init();
                        break;
                default:
                        break;
        }


        So,
        can please somebody tell me how and where I can call the function when am
changing the state of the pipeline ?

 Regards,
        Arnab


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
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: state change

Eric Zhang-6
Hi, gstreamer-devel:

    Did you override the `change_state' function pointer in your element's `_class_init' function?

Eric Zhang

2008/11/13 arnabsamanta <[hidden email]>
 Hi All,
       during state change of my plug in i am calling a function QUEUE3_De_Init()
but its not getting called .
       QUEUE3_De_Init() de-initializes all the initialized variables in the code.
       the implementation is as such

        static GstStateChangeReturn gst_queue3_change_state (GstElement * element,
GstStateChange transition)
       {
       Gstqueue3 *queue3;
       abuffer = GST_QUEUE3 (element);

       GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;

       switch (transition) {
               case GST_STATE_CHANGE_NULL_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_PAUSED:
                       break;
               case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
                       break;
               default:
                       break;
       }

       ret = GST_ELEMENT_CLASS (parent_class)->change_state (element,
transition);

       switch (transition) {
               case GST_STATE_CHANGE_PLAYING_TO_PAUSED:

                       break;
               case GST_STATE_CHANGE_PAUSED_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_NULL:
                       QUEUE3_De_Init();
                       break;
               default:
                       break;
       }


       So,
       can please somebody tell me how and where I can call the function when am
changing the state of the pipeline ?

 Regards,
       Arnab


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
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: state change

arnabsamanta
Hi Zhang ,
 
            Thanks for your reply
            Did you mean the following in the _class_init ( ) ?
            If so then yes, i have done that .
    
       static void gst_queue3_class_init (Gstqueue3Class * klass)
        {
                
                GstElementClass *gstelement_class;
                gstelement_class = (GstElementClass *) klass;
 
                gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_queue3_change_state);
        }
 
    Regards,
            ~Arnab    
 
   
-----Original Message-----
From: Eric Zhang [mailto:[hidden email]]
Sent: Friday, November 14, 2008 7:43 AM
To: [hidden email]; Discussion of the development of GStreamer
Subject: Re: [gst-devel] state change

Hi, gstreamer-devel:

    Did you override the `change_state' function pointer in your element's `_class_init' function?

Eric Zhang

2008/11/13 arnabsamanta <[hidden email]>
 Hi All,
       during state change of my plug in i am calling a function QUEUE3_De_Init()
but its not getting called .
       QUEUE3_De_Init() de-initializes all the initialized variables in the code.
       the implementation is as such

        static GstStateChangeReturn gst_queue3_change_state (GstElement * element,
GstStateChange transition)
       {
       Gstqueue3 *queue3;
       abuffer = GST_QUEUE3 (element);

       GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;

       switch (transition) {
               case GST_STATE_CHANGE_NULL_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_PAUSED:
                       break;
               case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
                       break;
               default:
                       break;
       }

       ret = GST_ELEMENT_CLASS (parent_class)->change_state (element,
transition);

       switch (transition) {
               case GST_STATE_CHANGE_PLAYING_TO_PAUSED:

                       break;
               case GST_STATE_CHANGE_PAUSED_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_NULL:
                       QUEUE3_De_Init();
                       break;
               default:
                       break;
       }


       So,
       can please somebody tell me how and where I can call the function when am
changing the state of the pipeline ?

 Regards,
       Arnab


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
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

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


-------------------------------------------------------------------------
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: state change

Sudarshan Bisht
Hi ,
             Are you handling EOS  event properly in your plugin ?

On Fri, Nov 14, 2008 at 10:49 AM, arnabsamanta <[hidden email]> wrote:
Hi Zhang ,
 
            Thanks for your reply
            Did you mean the following in the _class_init ( ) ?
            If so then yes, i have done that .
    
       static void gst_queue3_class_init (Gstqueue3Class * klass)
        {
                
                GstElementClass *gstelement_class;
                gstelement_class = (GstElementClass *) klass;
 
                gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_queue3_change_state);
        }
 
    Regards,
            ~Arnab    
 
   
-----Original Message-----
From: Eric Zhang [mailto:[hidden email]]
Sent: Friday, November 14, 2008 7:43 AM
To: [hidden email]; Discussion of the development of GStreamer
Subject: Re: [gst-devel] state change

Hi, gstreamer-devel:

    Did you override the `change_state' function pointer in your element's `_class_init' function?

Eric Zhang

2008/11/13 arnabsamanta <[hidden email]>
 Hi All,
       during state change of my plug in i am calling a function QUEUE3_De_Init()
but its not getting called .
       QUEUE3_De_Init() de-initializes all the initialized variables in the code.
       the implementation is as such

        static GstStateChangeReturn gst_queue3_change_state (GstElement * element,
GstStateChange transition)
       {
       Gstqueue3 *queue3;
       abuffer = GST_QUEUE3 (element);

       GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;

       switch (transition) {
               case GST_STATE_CHANGE_NULL_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_PAUSED:
                       break;
               case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
                       break;
               default:
                       break;
       }

       ret = GST_ELEMENT_CLASS (parent_class)->change_state (element,
transition);

       switch (transition) {
               case GST_STATE_CHANGE_PLAYING_TO_PAUSED:

                       break;
               case GST_STATE_CHANGE_PAUSED_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_NULL:
                       QUEUE3_De_Init();
                       break;
               default:
                       break;
       }


       So,
       can please somebody tell me how and where I can call the function when am
changing the state of the pipeline ?

 Regards,
       Arnab


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
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

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


-------------------------------------------------------------------------
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: state change

arnabsamanta
Hi Sudarshan,
    No, i am not handling it.
    my idea was when the end of stream comes from the filesrc , the pipeline is chsnged to NULL state through PAUSED and READY state. So i thought i need not handle that. Can you tell me how can i handle it ?
 
Regards,
    ~Arnab
-----Original Message-----
From: sudarshan bisht [mailto:[hidden email]]
Sent: Friday, November 14, 2008 12:02 PM
To: [hidden email]; Discussion of the development of GStreamer
Subject: Re: [gst-devel] state change

Hi ,
             Are you handling EOS  event properly in your plugin ?

On Fri, Nov 14, 2008 at 10:49 AM, arnabsamanta <[hidden email]> wrote:
Hi Zhang ,
 
            Thanks for your reply
            Did you mean the following in the _class_init ( ) ?
            If so then yes, i have done that .
    
       static void gst_queue3_class_init (Gstqueue3Class * klass)
        {
                
                GstElementClass *gstelement_class;
                gstelement_class = (GstElementClass *) klass;
 
                gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_queue3_change_state);
        }
 
    Regards,
            ~Arnab    
 
   
-----Original Message-----
From: Eric Zhang [mailto:[hidden email]]
Sent: Friday, November 14, 2008 7:43 AM
To: [hidden email]; Discussion of the development of GStreamer
Subject: Re: [gst-devel] state change

Hi, gstreamer-devel:

    Did you override the `change_state' function pointer in your element's `_class_init' function?

Eric Zhang

2008/11/13 arnabsamanta <[hidden email]>
 Hi All,
       during state change of my plug in i am calling a function QUEUE3_De_Init()
but its not getting called .
       QUEUE3_De_Init() de-initializes all the initialized variables in the code.
       the implementation is as such

        static GstStateChangeReturn gst_queue3_change_state (GstElement * element,
GstStateChange transition)
       {
       Gstqueue3 *queue3;
       abuffer = GST_QUEUE3 (element);

       GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;

       switch (transition) {
               case GST_STATE_CHANGE_NULL_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_PAUSED:
                       break;
               case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
                       break;
               default:
                       break;
       }

       ret = GST_ELEMENT_CLASS (parent_class)->change_state (element,
transition);

       switch (transition) {
               case GST_STATE_CHANGE_PLAYING_TO_PAUSED:

                       break;
               case GST_STATE_CHANGE_PAUSED_TO_READY:
                       break;
               case GST_STATE_CHANGE_READY_TO_NULL:
                       QUEUE3_De_Init();
                       break;
               default:
                       break;
       }


       So,
       can please somebody tell me how and where I can call the function when am
changing the state of the pipeline ?

 Regards,
       Arnab


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.

-------------------------------------------------------------------------
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

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


-------------------------------------------------------------------------
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

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


-------------------------------------------------------------------------
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