KaFu Posted January 22, 2009 Posted January 22, 2009 (edited) Just what the title says ...For controlling the embedded MPlayer instance look up the MPlayer docu for the -slave switch herehttp://www.mplayerhq.hu/DOCS/tech/slave.txtand send commands / receive replies with stdin / stdout on $i_mplayer_pid.expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: KaFu Script Function: Embedded MPlayer Test v03 (09-Jan-24) #ce ---------------------------------------------------------------------------- #include<Constants.au3> #include<GUIConstantsEx.au3> #include<WindowsConstants.au3> $h_GUI_Main = GUICreate("Embedded MPlayer Test - Main Window", 800, 600, Default, Default, $WS_CLIPCHILDREN) $c_button_play = GUICtrlCreateButton("Pause",250,520,100,30) $c_button_mute = GUICtrlCreateButton("Mute",450,520,100,30) $a_Pos_GUI_Main = WinGetPos($h_GUI_Main) $h_GUI_Slave = GUICreate("Embedded MPlayer Test - Slave Window", $a_Pos_GUI_Main[2] - 100, $a_Pos_GUI_Main[3] - 100, $a_Pos_GUI_Main[0] + 50, $a_Pos_GUI_Main[1] + 50, $WS_POPUP) $s_mplayer_location = 'C:\Programme\SMplayer\MPlayer.exe' $s_media_location = 'C:\movies\test.avi' $i_mplayer_pid = Run('"' & $s_mplayer_location & '" -slave -vo directx:noaccel -wid ' & Number($h_GUI_Slave) & ' "' & $s_media_location & '"', '', @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD + $STDERR_CHILD) _embed_GUI($h_GUI_Main, $h_GUI_Slave, 100, 50, $a_Pos_GUI_Main[2] - 200, $a_Pos_GUI_Main[3] - 150) GUISetState(@SW_SHOW, $h_GUI_Main) GUISetState(@SW_SHOW, $h_GUI_Slave) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $c_button_play Select Case GUICtrlRead($c_button_play) = 'Play' GUICtrlSetData($c_button_play,'Pause') Case Else GUICtrlSetData($c_button_play,'Play') EndSelect StdinWrite($i_mplayer_pid, "pause" & @LF) Case $msg = $c_button_mute Select Case GUICtrlRead($c_button_mute) = 'Mute' GUICtrlSetData($c_button_mute,'Unmute') Case Else GUICtrlSetData($c_button_mute,'Mute') EndSelect StdinWrite($i_mplayer_pid, "mute" & @LF) EndSelect WEnd ProcessClose($i_mplayer_pid) Exit Func _embed_GUI($h_Wnd_outer, $h_Wnd_inner, $x, $y, $w = "", $h = "") $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $h_Wnd_inner, "int", -20) $nExStyle = $nExStyle[0] DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $h_Wnd_inner, "int", -20, "int", BitOR($nExStyle, $WS_EX_MDICHILD)) DllCall("user32.dll", "int", "SetParent", "hwnd", $h_Wnd_inner, "hwnd", $h_Wnd_outer) WinMove($h_Wnd_inner, "", $x, $y, $w, $h) EndFunc ;==>_embed_GUI Edited January 24, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
nobbe Posted January 23, 2009 Posted January 23, 2009 hi great work :-) i wanted to write a real player now from the whole mplayer code, along with playlists etc. good thing about mplayer is it can read flv files natively.. i also need a new player to sort out my music library - features is need is to "delete this fiel from HD" and also "delete all files from this artist "-- evtl können wir da mal was zusammen machen? gruss nobbe
KaFu Posted January 23, 2009 Author Posted January 23, 2009 (edited) hi great work :-)Thanks i wanted to write a real player now from the whole mplayer code, along with playlists etc.good thing about mplayer is it can read flv files natively..Generally I'm always open-minded to new ideas , but in this case I don't think its worth the effort to write a new MediaPlayer from the scratch, sorry, just to much work for the framework to add one or two extra features. Have you tried this frontend for MPlayer? It's currently my standard player (+ VLC for some files)http://mulder.dummwiedeutsch.de/home/?page=projects#mplayerMaybe it's more easy to ask them for an additional feature.i also need a new player to sort out my music library - features is need is to "delete this file from HD" and also "delete all files from this artist "--Here I can only recommend my program SMF to you , analyze your media files with 'Extended File Attributes' checked, might take some time (maybe overnight?), but you can run it in the background and save the database for later use. In the report you can filter by all relevant criteria, incl. ID3 tags, folder and filenames, and than mass delete/erase your selection. That should suite your needs with already existing programs.Best Regards, Gruss Edited January 23, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Datenshi Posted January 24, 2009 Posted January 24, 2009 Havent tested yet but looks much cleaner then the method i used in the GTplayer, created a Label there and used the label hwnd for the -wid option. Problem was if i entered fullscreen and then returned from it the mplayer window was hidden behind the label. I had to work around it by coloring the whole gui with mplayer colorkey. Good work RapidQueuer 2.4 - For Rapidshare.comOpensubtitles Hashing FuncRevision3 PlayerGTPlayer BetaIMDB & Poster Grabber v1.3Fetgrek.com - My Website
KaFu Posted January 24, 2009 Author Posted January 24, 2009 (edited) Havent tested yet but looks much cleaner then the method i used in the GTplayer, created a Label there andThanks . Didn't saw you're Player before, will take a deeper look later on. I always love this playing around with mplayer, great program.used the label hwnd for the -wid option.Tried it before and had problems too, guess the clue was as ProgAndy pointed out here#633183'you forgot to convert the hWnd to an Integer.' with something like Number($hWnd)Cleaned and reduced the source to necessary parts in first post.Best Regards Edited January 24, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
scon Posted April 5, 2011 Posted April 5, 2011 Hello Help please! And how can I get a better picture? What command can be used instead -vo directx:noaccel ? Thank's!
KaFu Posted April 5, 2011 Author Posted April 5, 2011 All possible settings can be found here: http://www.mplayerhq.hu/DOCS/HTML/en/MPlayer.html#windows OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
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