Re: Playing DASH streams / .mpd files
The Wanderer <[email protected]> Wed, 17 Mar 2021 18:32:24 -0400
| Newsgroups | gmane.comp.video.mplayer.user |
|---|---|
| Message-ID | <[email protected]> |
On 2021-03-17 at 16:06, Reimar Döffinger wrote: > On Wed, Mar 17, 2021 at 03:39:28PM -0400, The Wanderer wrote: >> That required moving the check after the ffmpeg_a (etc.) checks are >> run, but that shouldn't be an issue, although it does bring back >> my uncertainty about where best to position this. > > It's the wild west, whereever works :) I'm reflexively uncomfortable with that level of disorganization, to the point where I kind of want to dig in and try to get the entire set of checks et cetera organized according to some articulable scheme, but I'm also lazy enough that I don't want to put in the effort to do that just at the moment - plus I'm not confident that I'd get it right, without introducing bugs based on subtle ordering requirements that I might miss. So I'll leave it where I put it on this second pass, barring further input. >>> If adding a enable/disable option, this part probably should go >>> outside of the "auto" if. >> >> Are you sure? That'd be reasonable if we're doing detection when >> explicitly enabled, but at least as I recall matters, that's not >> the usual MPlayer configure semantics; we usually assume that if >> you pass an explicit --enable argument for something that has >> autodetection, you're going to be passing the necessary >> CFLAGS/LDFLAGS/etc. via other arguments, since you're overriding >> autodetection anyway. <snip> >> So is this effectively a check for whether to enable that component >> or not? I was treating it as a check for whether libxml2 is >> present, with the idea that we could then add a check for DASH >> which would itself reference the result of the libxml2 check. > > Both questions kind of have the same answer. I guess I explained the > lazy way, but I guess your are right. It should look approximately > like (using Python style pseudocode) <snip> > I was suggesting the lazy way of just handling both the autodetect > pass and the disabled/autodetect fail in a single if, but you are > right it makes more sense to do it separately. Done, I think. See attached patch. (I initially missed stripping out DASH in the case where libxml2 detection fails, but I believe I have that done cleanly now.) > (also I admit that it might make more sense to have the dependent > features disabled by default and enable them if libxml2 is detected, > but I think that might be harder to do for FFmpeg components/features > - but I've not checked) If I'm parsing you correctly, I think you're right on both counts. >> I suppose there's not much point to that as long as we don't have >> any other code that would require libxml2, so we might as well put >> it all together for now, and split it out with separate disabling >> options later. I'll update things with that approach for now. > > I don't think it makes sense to split out even further than that. > There is already --disable-demuxer= option, I guess if you want to be > thorough you could test that it still works with whatever you > implement. I meant, if we ever wind up with multiple features that would individually rely on libxml2 being present, we could then add checks (and flags) for those features, rather than having all of them or none of them depending on whether libxml2 is enabled. I don't have enough of an understanding of how --disable-demuxer= works to be comfortable with trying to add that for DASH at the moment. If it's straightforward to do at all, it should be equally straightforward to do on top of this patch later on, if there's interest. >> The patch with the above changes, except for letting --enable still >> do autodetection of the necessary flags, has been compile-tested >> without issues; I haven't tried running the result, and I don't >> know any DASH streams to test with. > > The original email starting all this has an example DASH stream :) So it does! I hadn't examined the URL closely enough to realize that that's what it was. I tested, and apart from brief choppiness every now and then (accompanied by an ALSA "resetting soundcard" message in the console), it seems to work flawlessly. Patch attached for review. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw _______________________________________________ MPlayer-users mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
configure-test-for-libxml2_with-enable-disable-flags.diff
(text/x-diff, 3.1 KB)
Index: configure
===================================================================
--- configure (revision 38303)
+++ configure (working copy)
@@ -423,6 +423,7 @@
--disable-ffmpeg_a disable static FFmpeg [autodetect]
--disable-ffmpeg_so disable shared FFmpeg [autodetect]
--disable-postproc disable libpostproc [autodetect]
+ --disable-libxml2 disable XML handling, for DASH streams [autodetect]
--enable-vf-lavfi enable libavfilter wrapper [disabled]
--disable-libavcodec_mpegaudio_hp disable high precision audio decoding
in libavcodec [enabled]
@@ -683,6 +684,7 @@
ffmpeg_a=auto
ffmpeg_so=auto
postproc=auto
+_libxml2=auto
_vf_lavfi=no
_libavcodec_mpegaudio_hp=yes
_libopencore_amrnb=auto
@@ -1292,6 +1294,8 @@
--disable-ffmpeg_so) ffmpeg_so=no ;;
--enable-postproc) postproc=yes ;;
--disable-postproc) postproc=no ;;
+ --enable-libxml2) _libxml2=yes ;;
+ --disable-libxml2) _libxml2=no ;;
--enable-vf-lavfi) _vf_lavfi=yes ;;
--disable-vf-lavfi) _vf_lavfi=no ;;
--enable-libavcodec_mpegaudio_hp) _libavcodec_mpegaudio_hp=yes ;;
@@ -1658,7 +1662,7 @@
libavdecoders=$(filter_out_component decoder 'LIB[A-Z0-9_]* [A-Z0-9]*_QSV [A-Z0-9]*_MMAL [A-Z0-9]*_MEDIACODEC [A-Z0-9]*_CUVID [A-Z0-9_]*_AT [A-Z0-9]*_RKMPP [A-Z0-9]*_V4L2M2M')
libavencoders=$(filter_out_component encoder 'LIB[A-Z0-9_]* [A-Z0-9]*_QSV [A-Z0-9]*_MMAL NVENC[A-Z0-9_]* H264_NVENC[A-Z0-9_]* HEVC_NVENC[A-Z0-9_]* HAP [A-Z0-9]*_VIDEOTOOLBOX [A-Z0-9]*_VAAPI [A-Z0-9]*_OMX [A-Z0-9_]*_AT [A-Z0-9]*_V4L2M2M [A-Z0-9]*_AMF [A-Z0-9]*_MF')
libavbsfs=$(filter_out_component bsf 'TRACE_HEADERS [A-Z0-9_]*_METADATA H264_REDUNDANT_PPS FILTER_UNITS')
-libavdemuxers=$(filter_out_component demuxer 'AVISYNTH DASH LIB[A-Z0-9_]* REDIR VAPOURSYNTH')
+libavdemuxers=$(filter_out_component demuxer 'AVISYNTH LIB[A-Z0-9_]* REDIR VAPOURSYNTH')
libavmuxers=$(filter_out_component muxer 'CHROMAPRINT LIB[A-Z0-9_]* RTP RTSP SAP')
libavprotocols=$(filter_out_component protocol 'BLURAY FFRTMPCRYPT HTTPS LIB[A-Z0-9_]* TLS TLS_GNUTLS TLS_OPENSSL TLS_SECURETRANSPORT TLS_SCHANNEL')
libavfilters=$(filter_out_component filter 'VF_FREI0R[A-Z0-9_]* LIB[A-Z0-9_]* MP VF_OCV')
@@ -7510,6 +7514,34 @@
echores "$postproc"
+echocheck "libxml2"
+if test "$_libxml2" = auto ; then
+ _libxml2=no
+ if test "$ffmpeg_a" = yes && $_pkg_config --exists libxml-2.0 ; then
+ cat > $TMPC << EOF
+#include <libxml/xmlstring.h>
+int main() {
+ xmlChar *str = "";
+ return xmlStrlen(str);
+}
+EOF
+ inc_tmp=$($_pkg_config --cflags libxml-2.0)
+ ld_tmp=$($_pkg_config --libs libxml-2.0)
+ cc_check $inc_tmp $ld_tmp && _libxml2=yes
+ if test "$_libxml2" = yes; then
+ extra_cflags="$extra_cflags $inc_tmp"
+ extra_ldflags="$extra_ldflags $ld_tmp"
+ fi
+ else
+ res_comment="requires internal FFmpeg"
+ fi
+fi
+if test "$_libxml2" = "no" ; then
+ libavdemuxers=$(filter_out_component demuxer 'DASH')
+fi
+echores "$_libxml2"
+
+
echocheck "libopencore_amr narrowband"
if test "$_libopencore_amrnb" = auto ; then
_libopencore_amrnb=no
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEJCOqsZEc2qVC44pUBKk1jTQoMmsFAmBSg3kACgkQBKk1jTQo MmuXgg/+Ol5Y3O+swhquQiQ/JcfzeaV5+5c6VAwwAHP0Iuy289+YjlEi5PnugocS d3aC4Hv6MwBrH0q55YCvu9m2GWzFOTbFDXRy1EWdn7QFD/zR9Vj97AIWJy8uWz2x +qorAR63YCib37XQVD6Pypsv/lxV4endbkm0mGxZmJv9O9QpD/hbTye7Wsre4mzh Iizv2wlXuqB1lstlUGRlS0paR/v1q/QlCZwMejZ9N+KOuJwYmC23e7qaMGLwAJjq Sl8BkhsH+88qRxIROqLtNsC/Od34pwWAF3CBgcKA9jaANzXdVSAO/E3TaMHM1WMH bkjsn2ojv8aOmAbP29cp2G04a6/HEQZPMmqd5E2rH6PshAS3kR/CrFV23L9AReDg oP1/FbMX6KL7uO2UmutQaZlgFVTx764q4sJ9YddSUuE3feVLOmSHJ9cq3tVOR1sK mcjAWygejDYcGWulsgoNFuppB/nezWLTFFtNBLTbsV05FLYiJoIz63OaC8omILV1 L2Tzov12PGSt4DpWPHNNLB4bXqgTD2JB9ghJR9rnEngxkOyPeP1AsBUjVtuR3n5A ary2NtsW4eVH1F/c4vB8tdM2SMj5zY01gimJFJTyfPisx7BU0HCUOMDyh5Pc/T+y +7C6mXnuIziquxKRSHjgZEakmbMqZkqU42Arq5ddJKzMqzTt8TQ= =cQxr -----END PGP SIGNATURE-----