After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771817 - dx9screencapsrc: throw error for invalid screen index
dx9screencapsrc: throw error for invalid screen index
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 1.9.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-22 09:21 UTC by Florian Zwoch
Modified: 2016-09-30 07:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] dx9screencapsrc: throw error for invalid screen index (2.07 KB, patch)
2016-09-22 09:21 UTC, Florian Zwoch
committed Details | Review

Description Florian Zwoch 2016-09-22 09:21:11 UTC
Created attachment 336062 [details] [review]
[PATCH] dx9screencapsrc: throw error for invalid screen index

Currently dx9screencapsrc prints a verbose warning in case the screen index is out of range for the current number of detected monitors. This value is then dropped.

However there is no initial indication (beside the console print) if it worked or not. This may result in capturing an unwanted screen as it would capture the last set index that was not rejected.

This patch sets the index regardless. Instead, the element throws an error when it tries to run or getting caps for an invalid index.

I think this is more in line with how the avfvideosrc and ksvideosrc elements work where these kind of errors are received on the pipeline's bus.
Comment 1 Sebastian Dröge (slomo) 2016-09-22 13:53:11 UTC
commit 1489e73df4ec06257d4e56f10f713a8a83bd56cc
Author: Florian Zwoch <fzwoch@gmail.com>
Date:   Thu Sep 22 10:55:03 2016 +0200

    dx9screencapsrc: throw error for invalid screen index
    
    Currently dx9screencapsrc prints a verbose warning in case the screen
    index is out of range for the current number of detected monitors. This
    value is then dropped.
    
    However there is no initial indication (beside the console print) if it
    worked or not. This may result in capturing an unwanted screen as it
    would capture the last set index that was not rejected.
    
    This patch sets the index regardless. Instead, the element throws an
    error when it tries to run or getting caps for an invalid index.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771817