<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>454090</bug_id>
          
          <creation_ts>2022-05-20 14:00:34 +0000</creation_ts>
          <short_desc>Prevent computer from sleeping after playing some videos</short_desc>
          <delta_ts>2022-05-21 13:01:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Preview-Video</component>
          <version>7.6.0</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="sunphoenix@hotmail.com">sunphoenix</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>caulier.gilles</cc>
    
    <cc>metzpinguin</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/digikam/commit/79269fe73644bb0b6ea345cf17689c23606058ec</cf_commitlink>
          <cf_versionfixedin>7.7.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2124996</commentid>
    <comment_count>0</comment_count>
    <who name="sunphoenix@hotmail.com">sunphoenix</who>
    <bug_when>2022-05-20 14:00:34 +0000</bug_when>
    <thetext>SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open DigiKam
2. Run in cmd as administrator : &quot;powercfg /requests&quot; and confirm that nothing is preventing PC from sleeping
3. Open DigiKam and play a video (I run it from Album with Preview panel showing)
4. Close DigiKam
5. Run command again is getting me the following message :
SYSTEM:
[DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&amp;VEN_10EC&amp;DEV_0897&amp;SUBSYS_10438814&amp;REV_1004\4&amp;e778799&amp;0&amp;0001)
An audio stream is currently in use.


OBSERVED RESULT

Computer won&apos;t go to sleep.

EXPECTED RESULT

I expect DigiKam to not block the process.

SOFTWARE/OS VERSIONS
Windows: 10 21H2
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

I can run &quot;powercfg -REQUESTSOVERRIDE DRIVER &quot;High Definition Audio Device&quot; SYSTEM&quot; to circumvent this problem but it is causing other problems like not preventing the PC from sleeping while actually streaming audio/video.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125009</commentid>
    <comment_count>1</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2022-05-20 14:58:10 +0000</bug_when>
    <thetext>I tested it here on my Windows 10 desktop machine. No problems are reported after running a video in digiKam via the command powercfg /requests.
You don&apos;t have the problem with other programs? For example play a video in Firefox?

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125010</commentid>
    <comment_count>2</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2022-05-20 15:14:39 +0000</bug_when>
    <thetext>You can really find a lot about this problem via google. Only that can be anything, from Cortana to an optical audio output.
Is digiKam still in the task manager after closing?

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125038</commentid>
    <comment_count>3</comment_count>
    <who name="sunphoenix@hotmail.com">sunphoenix</who>
    <bug_when>2022-05-20 16:31:23 +0000</bug_when>
    <thetext>(In reply to Maik Qualmann from comment #2)
&gt; You can really find a lot about this problem via google. Only that can be
&gt; anything, from Cortana to an optical audio output.
&gt; Is digiKam still in the task manager after closing?
&gt; 
&gt; Maik

Yes it is running because I didn&apos;t close it. My problem is that it prevent the PC from sleeping while the app is open and only after I ran one or more videos. As soon as I close it, the audio stream is freed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125040</commentid>
    <comment_count>4</comment_count>
    <who name="sunphoenix@hotmail.com">sunphoenix</who>
    <bug_when>2022-05-20 16:35:54 +0000</bug_when>
    <thetext>(In reply to Maik Qualmann from comment #1)
&gt; I tested it here on my Windows 10 desktop machine. No problems are reported
&gt; after running a video in digiKam via the command powercfg /requests.
&gt; You don&apos;t have the problem with other programs? For example play a video in
&gt; Firefox?
&gt; 
&gt; Maik

Of course no problemes are reported if you close DigiKam :) I don&apos;t have any problem with Firefox, when I play a video, the same driver is in use (preventing the PC from sleeping) and when I close the tab or even pause the video, the audio stream is freed properly like it should.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125264</commentid>
    <comment_count>5</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2022-05-21 13:01:02 +0000</bug_when>
    <thetext>Git commit 79269fe73644bb0b6ea345cf17689c23606058ec by Maik Qualmann.
Committed on 21/05/2022 at 13:00.
Pushed by mqualmann into branch &apos;qt5-maintenance&apos;.

close audio when leave media player view
FIXED-IN: 7.7.0

M  +2    -1    NEWS
M  +6    -2    core/libs/video/player/mediaplayerview.cpp
M  +1    -1    core/libs/video/player/slidevideo.cpp

https://invent.kde.org/graphics/digikam/commit/79269fe73644bb0b6ea345cf17689c23606058ec</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>