Bug 72981 - Clips appear as half on display for Full Screen Video Playback using GST 1.0 on extended mode
Summary: Clips appear as half on display for Full Screen Video Playback using GST 1.0 ...
Status: RESOLVED NOTOURBUG
Alias: None
Product: gstreamer
Classification: Unclassified
Component: account (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Thomas Vander Stichele
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-23 02:18 UTC by Lim Siew Hoon
Modified: 2013-12-23 09:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Lim Siew Hoon 2013-12-23 02:18:44 UTC
When I play video in fullscreen mode in vaapsink in extended display mode, the video will be become half size of the screen. The video not fit into the screen got shifted. (Any video format video clip also able to reproduce the issue).

This issue don’t see using gstreamer-0.10 only happen on gstreamer-1.0.
Gst_vaapisink_set_caps get call twice in gstreamer-1.0 But only get call in once in gstreamer-0.10.

    gst_vaapisink_ensure_window_size(sink, &win_width, &win_height); 
    if (sink->window) {
        if (!sink->foreign_window || sink->fullscreen)
            gst_vaapi_window_set_size(sink->window, win_width, win_height);
    }
    else {
        gst_vaapi_display_lock(sink->display);
        gst_video_overlay_prepare_window_handle(GST_VIDEO_OVERLAY(sink));
        gst_vaapi_display_unlock(sink->display);
        if (sink->window)
            return TRUE;
        if (!gst_vaapisink_ensure_window(sink, win_width, win_height))
            return FALSE;
        gst_vaapi_window_set_fullscreen(sink->window, sink->fullscreen);
        gst_vaapi_window_show(sink->window);
        gst_vaapi_window_get_size(sink->window, &win_width, &win_height); 
    }
    sink->window_width  = win_width;
    sink->window_height = win_height;
    GST_DEBUG("window size %ux%u", win_width, win_height);

    return gst_vaapisink_ensure_render_rect(sink, win_width, win_height);



Question:
Looks like gst_vaapisink_ensure_window_size function will get full screen size of the framebuffer width and height. Or should be retrieve the display width and  height thru the crtc? I still haven’t deep down go thru how GstVaapiDisplayPriv & GstVaapiDisplay working at here.
In extended mode, that width will be primary width + secondary width .
In vertical extended mode, that height will be primary height + secondary height.

Current gstreamer-vaapi play in fullscreen for extended mode, is on 1 screen (primary display/ secondary display) or fullscreen mode here is for both display will be show out the video (mean half video in primary display and another half video in secondary  display) ?

gst_vaapi_window_get_size will retrieve correct window width and window height thru x11_get_geometry. 
The win_width and win_height pass thru the gst_vaapisink_ensure_render_rect will be using to calculate location destx and desty for video display output.  

Seeing this issue because the 2nd time gst_vaapisink_set_caps get call will be go thru if(sink->window). The win_width and win_height using pass thru gst_vaapsink_ensure_render_rect will be calculate wrong destx or desty. (depend in extended or vertical extended).
In gstreamer-0.10 is only call 1 times gst_vaapisink_set_caps which will go thru else statement call gst_vaapi_window_get_size to retrieve correct win_width and win_height.

Now I don’t idea how to get a proper fix for this issue right now. Quick and not proper fix could be just add gst_vaapi_window_get_size inside if(sink->window) statement to overwrite the win_width and win_height retrieve from gst_vaapisink_ensure_window_size.
Can you guy provide me advice at here? 

I’m using gstreamer-vaapi from master branch recently code base.  
Command pipeline: gst-launch-1.0 -v filesrc location=/root/Videos/frog.mpg ! mpegpsdemux ! vaapidecode ! vaapisink fullscreen=true
Comment 1 Tim Müller 2013-12-23 09:31:22 UTC
Thanks for the bug report, but could you please file this at

  http://bugzilla.gnome.org (gstreamer-vaapi product)

as per http://gstreamer.freedesktop.org/bugs/

This bug tracker is only for git account requests.
Comment 2 Lim Siew Hoon 2013-12-23 09:36:12 UTC
Ok. Thanks. I will file in that link.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.