Shark007 Posted June 2, 2023 Share Posted June 2, 2023 My usage is to disable sleep as playback starts and then re-enable user settings upon player exit. Link to comment Share on other sites More sharing options...
CYCho Posted June 2, 2023 Author Share Posted June 2, 2023 As per @Shark007's suggestion, _WinAPI_SetThreadExecutionState function was incorporated in the code to prevent Windows from going to sleep while a media is streaming. zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
Shark007 Posted June 12, 2023 Share Posted June 12, 2023 (edited) I have some more small suggestions for the GUI when using HiDpi scaling. $idPrevious = GUICtrlCreateLabel(ChrW(9664), 96, 52, 15, 15, BitOR($SS_SIMPLE, $SS_GRAYFRAME)) ; Previous file â—€ $idNext = GUICtrlCreateLabel(ChrW(9654), 125, 52, 15, 15, BitOR($SS_SIMPLE, $SS_GRAYFRAME)) ;2x . . . $idPrevious2 = GUICtrlCreateLabel(ChrW(9664), 146, 23, 15, 15, BitOR($SS_SIMPLE, $SS_GRAYFRAME)) $idNext2 = GUICtrlCreateLabel(ChrW(9654), 173, 23, 15, 15, BitOR($SS_SIMPLE, $SS_GRAYFRAME)) GUICtrlSetPos($idPrevious2, $vcWidth/2-14, 23, 15, 15) GUICtrlSetPos($idNext2, $vcWidth/2+13, 23, 15, 15) Edited June 13, 2023 by Shark007 Link to comment Share on other sites More sharing options...
CYCho Posted June 13, 2023 Author Share Posted June 13, 2023 (edited) @Shark007 In my setup, your recommended changes produced irregular spacing between the affected icons, so I changed flags for all the icons to $SS_CENTER. Please test with the version marked as Updated at 01:20 of June 13, 2023 UTC and see if it works in HiDpi scaling. I hope I can do the test myself, but I don't know how. Edited June 13, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
Shark007 Posted June 13, 2023 Share Posted June 13, 2023 (edited) Excellent work. There are no more visual descrepencies in either GUI. One other aspect to touch on. When clicking the upper right red X on the player window GUI, currently the player reloads and restarts. Could you make that X exit the player window? This would be the behavior a user would expect. Edited June 13, 2023 by Shark007 Link to comment Share on other sites More sharing options...
CYCho Posted June 13, 2023 Author Share Posted June 13, 2023 (edited) 2 hours ago, Shark007 said: When clicking the upper right red X on the player window GUI, currently the player reloads and restarts. The player is designed to loop the playlist endlessly. The Close box is meant to exit the current file. If there is only one file in the playlist, that file will be reloaded over and over again. If multiple files have been loaded, clicking the Close box will make the player move on to the next file. That is why I have a separate X icon to exit the program. Edited June 13, 2023 by CYCho Shark007 1 zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted June 16, 2023 Author Share Posted June 16, 2023 (edited) Through this project I learned many aspects of not only winmm.dll but also of how a video image created by it interacts with a GUI window when it is resized, maximized or stretched to full screen. I have implemented most of the basic functionalities of winmm.dll as regards to a digital media player and my update of the code will not be as frequent as has been. Now I am awed by the power of AutoIt, which, with less than 1000 lines of code and without any third party dependency, made this media player possible. I must thank @TheXman, @ioa747, @Skeletor, @ptrex and @Shark007 for their kind words and/or help in this project. Edited June 16, 2023 by CYCho Skeletor, ioa747 and TheXman 3 zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted June 19, 2023 Author Share Posted June 19, 2023 (edited) I found that the change of video size does not take effect while the video is in paused state. I inserted the following code to alleviate this phenomenon. If $iPaused = 1 Then ; Change video size while in "paused" mode $iAudioIsOn = 0 If mciSendString("status myMedia audio") = "on" Then $iAudioIsOn = 1 mciSendString("set myMedia audio all off") EndIf _Pause() Sleep(10) _Pause() If $iAudioIsOn = 1 Then mciSendString("set myMedia audio all on") EndIf EndIf Edit: Inserted Sleep(10) between 2 _Pause() functions. Edited June 26, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted July 5, 2023 Author Share Posted July 5, 2023 (edited) I adopted some of the features available in my zPlayer, such as a context menu in the playlist window and playing a file by doubleclicking an item in the playlist. I still kept the main GUI at a bare minimum size, and I had to assign multiple functions to some of the controls to make it possible. I foresee that this player will ultimately be the future version of my zPlayer. I had a lot of fun working on this. Note: The code got a little long, so I attached a zip file to my first post instead of inserting the code. The zip file contains an icon file, too. Edited July 5, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted July 10, 2023 Author Share Posted July 10, 2023 This player has the functionality of repeating the current file as a whole in loop, but is unable to repeat certain portion of a file in loop. I think I can implement it. The problem I have is that the GUI is small and is already jampacked with essential buttons. I am pretty much concerned with keeping the GUI to the minimum and I wonder if this function is worth enlarging the GUI. Please let me know if you have any suggestion. zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted July 11, 2023 Author Share Posted July 11, 2023 I implemented A-B repeat function without increasing the size of main GUI. If I click the total media length label, a small GUI appears where I can set up start and end positions. The corresponding portion of the slider changes color to purple. This set-up is effective only for the current file. mutleey 1 zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
Shark007 Posted July 11, 2023 Share Posted July 11, 2023 (edited) 4 hours ago, CYCho said: <snip>If I click the total media length label</snip> In the current release, The total media length within the movie gui stays at 00:00 Edited July 11, 2023 by Shark007 Link to comment Share on other sites More sharing options...
CYCho Posted July 11, 2023 Author Share Posted July 11, 2023 (edited) 33 minutes ago, Shark007 said: In the current release, The total media length within the movie gui stays at 00:00 Oops, a new update was uploaded. Thanks for pointing it out. Edited July 11, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
Shark007 Posted July 11, 2023 Share Posted July 11, 2023 The last reported issue is fixed. In the main GUI, the total legth is not displayed correctly. No matter the file loaded, it seems to be missing 40 minutes. Link to comment Share on other sites More sharing options...
CYCho Posted July 11, 2023 Author Share Posted July 11, 2023 (edited) 8 hours ago, Shark007 said: No matter the file loaded, it seems to be missing 40 minutes I don't seem to be able to reproduce what you are saying. Please bear in mind that the total media length in main GUI displays in mmm:ss format instead of hh:mm:ss format. Edited July 12, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
Shark007 Posted July 12, 2023 Share Posted July 12, 2023 10 hours ago, CYCho said: Please bear in mind that the total media length in main GUI displays in mmm:ss format instead of hh:mm:ss format. Thats what I'm seeing. I didnt realize they were displaing different time formats. Sorry to bother you. Link to comment Share on other sites More sharing options...
CYCho Posted July 12, 2023 Author Share Posted July 12, 2023 On 7/11/2023 at 6:08 PM, CYCho said: I implemented A-B repeat function I thought I implemented A-B repeat function, but it was not that simple. I had to make some major adjustments to make it work properly. zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted July 16, 2023 Author Share Posted July 16, 2023 (edited) Do I need an audio fade-in and, if yes, how do I implement it? Audio fade-in is a gradual increase of audio volume from 0 to a set volume, in about 5 seconds. When I play a file from position 0, I don't need it. I thought I would need it when I start playback from the middle of a file, especially when resuming the playback from the last streamed position. I thought I could initially set the volume to 0 and increase the volume by 5% points of a set volume at an interval of 250 milliseconds. First I used Sleep(250) between volume set commands. It worked, but there was a problem: it interrupted the flow of program for 5 seconds immediately after loading the first file of a folder if that file were subject to "Resume playback" option. So I added an adlib function to call the volume set command every 250 milliseconds and unregister the adlib upon attaining the set volume level. It is a small piece of code but I am satisfied with it. Edited July 16, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted July 20, 2023 Author Share Posted July 20, 2023 (edited) A video window has the file name as its title. When the video stretches to fullscreen, the title bar disappears and there is no file name on the screen. To solve this problem, I put file name in the progress bar when the screen stretches to fullscreen. The video control, including the progress bar, appears when the mouse moves to the lower part of the screen. Edited July 20, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
CYCho Posted July 23, 2023 Author Share Posted July 23, 2023 (edited) As of July 23, 2023, WINMM.DLL Media Player was renamed zPlayer and any further update will be uploaded there. Edited July 23, 2023 by CYCho zPlayer - A Small Audio and Video Player Time Sync + SystemTimeAdjustment Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now