Coder Social home page Coder Social logo

Comments (2)

kasper93 avatar kasper93 commented on June 30, 2024

No, we cannot retire mpv.com. It is age old topic. There are workarounds, and we are using the best one. It is not supported use-case by Windows kernel. https://devblogs.microsoft.com/oldnewthing/20090101-00/?p=19643

It is explained here why it is bad idea to use GUI mode always. #13011 (comment)

Alternatively it is bad idea to use Console mode always, as best we can do is to hide console window in this case and this produces annoying flicker.

I have dilemma to choose between launching mpv.exe and mpv.com: the former hits the breakpoints, but can't print any log message to the terminal, while the latter does the opposite.

Change subsystem to console and always use mpv.exe

diff --git a/meson.build b/meson.build
index 1a89094df0..fd4efb1f20 100644
--- a/meson.build
+++ b/meson.build
@@ -1803,7 +1803,7 @@ if get_option('cplayer')
     install_data('etc/mpv-symbolic.svg', install_dir: join_paths(hicolor_dir, 'symbolic', 'apps'))

     mpv = executable('mpv', main_fn_source, objects: libmpv.extract_all_objects(recursive: true), dependencies: dependencies,
-                     win_subsystem: 'windows', install: true)
+                     win_subsystem: 'console', install: true)

     # Older meson versions generate this in the player subdirectory.
     if win32 and meson.version().version_compare('>= 1.3.0')

from mpv.

CrendKing avatar CrendKing commented on June 30, 2024

Thanks for the links. If I understand correctly, the main limitation of Windows over Linux is the lack of API to not only attach but take full control of parent process' console. And the console wrapper solution is good because it can use its own console to override the parent console, and wait out the wrapped sub-process.

If that's really the only reason, I'm a bit surprised why Windows can't offer such an API, provided that they have a otherwise fairly complete plethora of console manipulation utilities. But if Visual Studio itself has to use a .com trick, I guess the reason must be deep.

Thanks again. Closing.

from mpv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.