mpv works fine with libsdl2 for both vo and ao one sdl version is enough to support IMO
Created attachment 374418 [details, diff] mpv-0.3.7.ebuild.diff
Upstream suggests to use sdl outputs only when all other are not available, does not seem like our case.
Created attachment 374420 [details, diff] mpv-0.3.7.ebuild.diff
(In reply to Nikoli from comment #2) > Upstream suggests to use sdl outputs only when all other are not available, > does not seem like our case. I want to use it, so what do I do... create a separate package?
> I want to use it But why? I guess you just want to test how libsdl2 works. For this purpose temporary moving mpv to local overlay seems best solution. mpv upstream declares sdl outputs as not fully supported: they are not used by any dev and are tested and updated _very_ rare. As package maintainer i do not want to provide low quality or unstable features. USE sdl is enabled by default in all desktop profiles, so it makes situation even worse. As a compromise we can add USE flag and mask it in profiles.
(In reply to Nikoli from comment #5) > > I want to use it > > But why? I guess you just want to test how libsdl2 works. For this purpose > temporary moving mpv to local overlay seems best solution. No, I said I want to use it. I enabled --vo=sdl and --ao=sdl in youtube-viewer. > > mpv upstream declares sdl outputs as not fully supported: they are not used > by any dev and are tested and updated _very_ rare. As package maintainer i > do not want to provide low quality or unstable features. USE sdl is enabled > by default in all desktop profiles, so it makes situation even worse. Reference? > > As a compromise we can add USE flag and mask it in profiles. Introducing features or packages masked is often the wrong approach. ~arch is meant for testing, it's not a second layer of stable arch. Usually, if something turns out to be very unstable after some time in ~arch or even broken, then the package or the related USE flags can be masked. If it turns out to be a maintenance burden, primarily in the sense of "does not compile", then the feature can be dropped, sure.
> Reference? mpv irc channels. devs several times suggested to not use sdl and not enable it in packages. You can ask them yourself. Also look at the order of outputs: https://github.com/mpv-player/mpv/blob/master/video/out/vo.c https://github.com/mpv-player/mpv/blob/master/audio/out/ao.c sdl outputs have really low priority when mpv chooses.
(In reply to Nikoli from comment #7) > > Reference? > > mpv irc channels. devs several times suggested to not use sdl and not enable > it in packages. You can ask them yourself. > It works fine for me. If it is really unsupported, then there must be a note somewhere. I don't have any irc logs from dev channels. You seem to have more connection there than I do. Most upstream devs don't even know the concept of USE flags, so they easily say "don't enable this or that". > https://github.com/mpv-player/mpv/blob/master/video/out/vo.c > https://github.com/mpv-player/mpv/blob/master/audio/out/ao.c > > sdl outputs have really low priority when mpv chooses. I choose it explicitly, so I don't really care about the order. I don't see any problem with adding it. I will be tester... if it turns out to suck, then we just remove it again.
I would like to know why you prefer to use '--vo=sdl --ao=sdl' instead of '--vo=opengl-hq --ao=alsa'. From my point of view it is illogical: opengl-hq now works fine with all foss drivers, supports vdpau hardware decoding, lcms color profiles and has best quality including quality of upscaling. Why use something else in modern linux desktop? The main problem with adding USE sdl is that it is in profiles/targets/desktop/make.defaults, may be call it sdl2 like in build system? It will prevent building not well tested code by default.
(In reply to Nikoli from comment #9) > I would like to know why you prefer to use '--vo=sdl --ao=sdl' instead of > '--vo=opengl-hq --ao=alsa'. From my point of view it is illogical: opengl-hq > now works fine with all foss drivers, supports vdpau hardware decoding, lcms > color profiles and has best quality including quality of upscaling. Why use > something else in modern linux desktop? > > > The main problem with adding USE sdl is that it is in > profiles/targets/desktop/make.defaults, may be call it sdl2 like in build > system? sdl2 USE flag will cause the same confusion as gtk, gtk2, gtk3... I am strongly against anything like that besides... this only goes for the desktop profiles > It will prevent building not well tested code by default. Testing... that's exactly what ~arch is for. Masking is for cases when something is _actually_ broken, not just supposedly.
so, if there is no good argument against introducing this in ~arch...
> besides... this only goes for the desktop profiles "Only" is not correct word in this case: mpv package is primary targeted at users of desktop profiles. You insist on adding "sdl" USE flag without masking, by default it will force all users of desktop profiles to: 1) build low quality, unstable and not tested even by upstream parts of mpv code base 2) build and install libsdl2 package and its dependencies (How much blockers it will add when marking mpv stable?) 3) load libsdl2 libs and all its dependencies every time when running mpv (it does not use dlopen for SDL2) I see no good reason for introducing these drawbacks: SDL2 is just wrapper for several libraries already directly used by mpv, building with SDL2 enabled does not add or improve _any_ feature.
(In reply to Nikoli from comment #12) > > besides... this only goes for the desktop profiles > > "Only" is not correct word in this case: mpv package is primary targeted at > users of desktop profiles. > > You insist on adding "sdl" USE flag without masking, by default it will > force all users of desktop profiles to: > 1) build low quality, unstable and not tested even by upstream parts of mpv > code base I still see no reference. I do test it, btw. > 2) build and install libsdl2 package and its dependencies (How much blockers > it will add when marking mpv stable?) That's not an argument at all and not how packaging works in gentoo. > 3) load libsdl2 libs and all its dependencies every time when running mpv > (it does not use dlopen for SDL2) > It is a USE flag. You can emit a warning that the user might want to disable it. > I see no good reason for introducing these drawbacks: SDL2 is just wrapper > for several libraries already directly used by mpv, building with SDL2 > enabled does not add or improve _any_ feature. I don't see any drawback for a package that is in _TESTING_.
Otherwise I will introduce a new package in-tree and call it mpv-hasufell and make it block yours.
(In reply to Julian Ospald (hasufell) from comment #14) > Otherwise I will introduce a new package in-tree and call it mpv-hasufell > and make it block yours. ofc that was a joke, I'd rather just apply it, but I don't like to ignore people however, there is another solution without masking and renaming the flag. we can add: media-video/mpv -sdl to '/usr/portage/profiles/targets/desktop/package.use'
> I still see no reference. I asked upstream to add note to docs: https://github.com/mpv-player/mpv/commit/0a444511e86a02feb2c945287ed535d0ca650b9b from https://github.com/mpv-player/mpv/blob/master/DOCS/man/en/vo.rst "The recommended output drivers are --vo=vdpau and --vo=opengl-hq. All other drivers are just for compatibility or special purposes." "sdl ... This driver is for compatibility with systems that don't provide proper graphics drivers, or which support GLES only." Also upstream has a question for you: [17:30:30] <wm4> also: "No, I said I want to use it. I enabled --vo=sdl and --ao=sdl in youtube-viewer." [17:30:32] <wm4> ask him WHY [17:30:39] <wm4> because what the fuck [17:31:06] <wm4> mpv will automatically pick a AO/VO if the default one isn't available [17:31:19] <wm4> but forcing the AO/VO will break if it's not available
Using profiles/targets/desktop/package.use seems like best solution indeed. Attached patch most likely should be changed, i will do some testing of sdl.
(In reply to Nikoli from comment #16) > [17:30:32] <wm4> ask him WHY Because I am a distributor and test stuff.
Created attachment 375290 [details, diff] mpv-0.3.8.ebuild.diff
+ 19 Apr 2014; Julian Ospald <hasufell@gentoo.org> targets/desktop/package.use: + prepare for media-video/mpv[sdl] wrt #506982
reads: # Julian Ospald <hasufell@gentoo.org> (19 Apr 2014) # Overwrite default +sdl from desktop profile, since # this codepath is untested and should not be exposed # to regular desktop users wrt #506982 media-video/mpv -sdl
Created attachment 375302 [details, diff] mpv-0.3.8.ebuild.patch 'USE="-* sdl" emerge -1va mpv' plays video fine, 'sdl? ( X )' is not required at all. Did not add X,alsa?,audio,opengl,video to media-libs/libsdl2[...] because: 1) mpv can be compiled and used as audio only or video only player (it builds and works fine when libsdl2 is compiled with audio or video support only, i checked) 2) gles can be used instead of opengl, some devices have video drivers with gles support only. 3) alsa in mpv is not related to alsa in libsdl2 4) wayland can be used instead of x11 libsdl2 has only KEYWORDS="~amd64 ~x86", so for now USE sdl should be masked for a lot arches, but it would be better to add at least arm to libsdl2 keywords.
(In reply to Nikoli from comment #22) > Created attachment 375302283 [details284, diff285] > mpv-0.3.8.ebuild.patch > > 'USE="-* sdl" emerge -1va mpv' plays video fine, 'sdl? ( X )' is not > required at all. indeed, that one is not needed > Did not add X,alsa?,audio,opengl,video to media-libs/libsdl2[...] because: > 1) mpv can be compiled and used as audio only or video only player (it > builds and works fine when libsdl2 is compiled with audio or video support > only, i checked) USE="-* audio alsa" on libsdl2 breaks audio in mpv, so not sure what you tested there > 4) wayland can be used instead of x11 can, but did you test it in conjunction with mpv? > libsdl2 has only KEYWORDS="~amd64 ~x86", so for now USE sdl should be masked > for a lot arches, but it would be better to add at least arm to libsdl2 > keywords. I don't add keywords for arches I don't have.
I guess you meant sdl? ( media-libs/libsdl2[threads] ) and let users micro-manage the features by brokenness... fine be me
> USE="-* audio alsa" on libsdl2 > breaks audio in mpv, so not sure what you tested there this is exactly why ebuild has 'sdl? ( media-libs/libsdl2[threads] )' Now 'USE="-* video opengl X" emerge -1va libsdl2' works fine, but mpv upstream plans to use threads for video output too.
+ 20 Apr 2014; Julian Ospald <hasufell@gentoo.org> arch/alpha/package.use.mask, + arch/arm/package.use.mask, arch/powerpc/package.use.mask, + arch/sparc/package.use.mask: + mask 'media-video/mpv sdl ' on arches where media-libs/libsdl2 is not + keyworded yet wrt #506982 and #508226
+ 20 Apr 2014; Julian Ospald <hasufell@gentoo.org> mpv-0.3.8.ebuild, + mpv-9999.ebuild, metadata.xml: + add sdl USE flag wrt #506982
if I forget to unmask the flag on those arches after libsdl2 has been keyworded, ping me
Sure, i subscribed to keywording bug.