gstplayer with rtsp stream reports widthxheight 0x0 in "video-dimensions-changed" event

pedjaman pedjaman at gmail.com
Sat Sep 24 13:56:46 UTC 2016


Stream is playing, audio is there but just colored stripes on texture due
to not being able to get size from gstreamer to set surfaces buffer size.
I've made workaround by:
1. catching "state-changed" (on_state_changed in example code)
2. adding following snippet to re-fire size change
  // Workaround for bad width and height
  if(state == GST_PLAYER_STATE_PLAYING)
  {
    GstPlayerVideoInfo * vi =
gst_player_get_current_video_track(player->player);
    gint width = gst_player_video_info_get_width(vi);
    gint height = gst_player_video_info_get_height(vi);
    __android_log_print (ANDROID_LOG_DEBUG, "GstPlayer",
"*************************************************** width x height=%dx%d",
width, height);

    on_video_dimensions_changed(unused, width, height, player);
  }

Nasty workaround but that solved a problem. Please note that this is the
only change in example code.

This will do it until we find real cause of missing event

On Sat, Sep 24, 2016 at 3:50 PM, Sebastian Dröge-3 [via GStreamer-devel] <
ml-node+s966125n4679753h51 at n4.nabble.com> wrote:

> On Fr, 2016-09-23 at 09:59 -0700, pedjaman wrote:
> > Could you provide sample code you are using? The one which produces
> > two
> > events (0x0 and apropriate widthn and height)?
> > Also which version of GStreamer? Is it 1.9.2?
> > Trying to find out if I'm doing something wrong or it is somehwere in
> > GStreamer
>
> I was using gst-play from here:
>   https://cgit.freedesktop.org/gstreamer/gst-examples/
> tree/playback/player/gst-play
>
> And then added a signal handler for video-dimensions-changed, which
> just printed the resolution. This is with GIT master, but nothing
> changed in that regard since 1.9.2.
>
> Does your stream start playing for you?
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4679753&i=0>
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> *signature.asc* (985 bytes) Download Attachment
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4679753/0/signature.asc>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://gstreamer-devel.966125.n4.nabble.com/gstplayer-with-
> rtsp-stream-reports-widthxheight-0x0-in-video-dimensions-changed-event-
> tp4679687p4679753.html
> To unsubscribe from gstplayer with rtsp stream reports widthxheight 0x0 in
> "video-dimensions-changed" event, click here
> <http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4679687&code=cGVkamFtYW5AZ21haWwuY29tfDQ2Nzk2ODd8LTM1MzA5OTk0NQ==>
> .
> NAML
> <http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gstplayer-with-rtsp-stream-reports-widthxheight-0x0-in-video-dimensions-changed-event-tp4679687p4679754.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160924/0b2a586c/attachment.html>


More information about the gstreamer-devel mailing list