[mythtv-users] Screenshots

Michael T. Dean mtdean at thirdcontact.com
Fri May 3 15:29:53 UTC 2019


On 05/02/2019 05:41 PM, Bill Meek wrote:
> On 5/2/19 8:23 AM, Greg Oliver wrote:
>> On Sat, Apr 27, 2019 at 4:22 PM Greg Oliver wrote:
>>
>>> [snip]
>>>
>>> Sorry for the noise and thanks for all the help!
>>>
>>> My dumbass forgot it was "frontend" related and since I am no longer 
>>> using
>>> a frontend/backend combo, just needed to point it to a "frontend" 
>>> rather
>>> than "backend" and it still works :)
>>>
>>>
>> Well, it does not work on Android TV - anyone know how to change the tmp
>> directory to something in data that android will allow?
>>
>> 05-02 08:20:56.609 17673 17699 W mythfrontend: (null):0 ((null)): this
>> function is deprecated, use QScreen::grabWindow() instead. Defaulting to
>> primary screen.
>> 05-02 08:20:56.609 17673 17699 W mythfrontend: (null):0 ((null)):
>> QImage::scaled: Image is a null image
>> 05-02 08:20:56.654 17673 17705 I mfe     : 2019-05-02 08:20:56.589921 I
>> Screen shot requested (0x0), format png
>> 05-02 08:20:56.654 17673 17705 I mfe     : 2019-05-02 08:20:56.609735 I
>> Saving screenshot to //tmp//myth-screenshot-XML.png (0x0)
>> 05-02 08:20:56.654 17673 17705 I mfe     : 2019-05-02 08:20:56.609752 I
>> MythMainWindow::screenShot Failed!
>
> The frontend setting mentioned before can be used to change the 
> default location:
>
>   If the "Screen shot path" setting (settings.ScreenShotPath) doesn't 
> exist,
>   then /tmp is used directly.
>
> The user running the FE must have write permission of course.
>
> You could try the Services API, for example, although it appears to do 
> the
> same thing (it does honor ScreenShotPath.):
>
>   curl --data Action=SCREENSHOT --data Height=720 --data Width=1080 
> <FE>:6547/Frontend/SendAction

Yes, there are 2 screen shot implementations in MythTV.  One is a key 
binding in TV Playback context and only gives a capture of the 
currently-playing show--without any OSD or captions (regardless of 
whether they're being displayed at the time or not) and does not use 
ScreenShotPath (always puts the cap in ~/.mythtv).  The other is a jump 
point--which is what is used by services and the web frontend--that 
gives a screen shot of the current GUI, written to ScreenShotPath--so 
the themed frontend, if in the menus, or whatever mythfrontend is 
currently displaying (if possible).  If possible because video display 
is only captured with certain renderers and can't be captured with other 
renderers.  If using a renderer that supports the screen shot mechanism, 
any OSD and captions will be included in the screen shot taken with the 
jump point.

See https://lists.gt.net/mythtv/theming/392813#392813 for more.

> I don't know (and can't test) the Android TV case. The "Image is a 
> null image"
> line in the log above doesn't sound very encouraging.
>

Sounds like an Android permissions thing?  I'm pretty sure Android has 
special permissions/protections for screen shots to prevent apps from 
doing bad things.

Mike


More information about the mythtv-users mailing list