Resuming rtsp stream on receiving EOS signal on message bus using re-connection timer

Federico Zamperini fzamperini at tiscali.it
Thu Feb 7 23:43:27 PST 2013


I was referring to checking the return value of  set_state (that is the 
equivalent of  gst_element_set_state), just to know if the status of the 
pipeline has changed when the method returns.
See 
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-set-state

Il 07/02/2013 18:34, enthusiastic geek ha scritto:
> Could you pinpoint which function are you referring to in my code?
>
> Is it
>   this->setStreamStatus(index, true); //
>   ?
>
>   I am confused. Do you want me to have another case in the bus message event
> handler
>
> Gst::MESSAGE_STATE_CHANGED and perform checks there?
>
> I am performing getState(index) check inside the timeout function if you
> notice
>
> It looks like
>
>
> Gst::State VideoBroadcast::getState(uint32_t index)
> {
>      Gst::State state;
>      Gst::State pending;
>      Gst::StateChangeReturn ret = app->pipeline_[index]->get_state(state,
> pending, 1 * Gst::SECOND);
>
>      if (ret == Gst::STATE_CHANGE_SUCCESS)
>      {
>          std::cout<< "State = " << getStateString(state) << std::endl;
>          return state;
>      }
>      else if (ret == Gst::STATE_CHANGE_ASYNC)
>      {
>          std::cout<< "Query state failed, still performing change"<<
> std::endl;
>      }
>      else
>      {
>          std::cout<<"Query state failed, hard failure"<< std::endl;
>      }
>      return Gst::STATE_NULL;
> }
>
> std::string VideoBroadcast::getStateString(Gst::State state)
> {
>      switch (state)
>      {
>      case Gst::STATE_VOID_PENDING:
>          return "VOID_PENDING";
>      case Gst::STATE_NULL:
>          return "NULL";
>      case Gst::STATE_READY:
>          return "READY";
>      case Gst::STATE_PAUSED:
>          return "PAUSED";
>      case Gst::STATE_PLAYING:
>          return "PLAYING";
>      default:
>          return "UNKNOWN";
>      }
> }
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Resuming-rtsp-stream-on-receiving-EOS-signal-on-message-bus-using-re-connection-timer-SOLVED-tp4658402p4658423.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> -----
> Nessun virus nel messaggio.
> Controllato da AVG - www.avg.com
> Versione: 2013.0.2897 / Database dei virus: 2639/6084 -  Data di rilascio: 05/02/2013
>
>


More information about the gstreamer-devel mailing list