[vlc-commits] input: es_out_timeshift: fix asynchronous accounting of ES
vlc | branch: master | Francois Cartegnie | Mon Apr 20 20:21:19 2020 +0200| [8c45bb0a195c2c32b5cb5fd23a76732005230207] | committer: Francois Cartegnie input: es_out_timeshift: fix asynchronous accounting of ES You can't keep track of scheduled ES as they don't exist and they expire with the command list. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c45bb0a195c2c32b5cb5fd23a76732005230207 --- src/input/es_out_timeshift.c | 120 ++- 1 file changed, 62 insertions(+), 58 deletions(-) diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c index 1737343290..272f541057 100644 --- a/src/input/es_out_timeshift.c +++ b/src/input/es_out_timeshift.c @@ -211,6 +211,7 @@ typedef struct { vlc_thread_t thread; input_thread_t *p_input; +es_out_t *p_tsout; es_out_t *p_out; int64_ti_tmp_size_max; const char *psz_tmp_path; @@ -311,7 +312,7 @@ static void CmdCleanAdd( ts_cmd_add_t * ); static void CmdCleanSend ( ts_cmd_send_t * ); static void CmdCleanControl( ts_cmd_control_t * ); -/* XXX these functions will take the destination es_out_t */ +/* */ static void CmdExecuteAdd( es_out_t *, ts_cmd_add_t * ); static int CmdExecuteSend ( es_out_t *, ts_cmd_send_t * ); static void CmdExecuteDel( es_out_t *, ts_cmd_del_t * ); @@ -457,12 +458,10 @@ static es_out_id_t *Add( es_out_t *p_out, input_source_t *in, const es_format_t return NULL; } -TAB_APPEND( p_sys->i_es, p_sys->pp_es, p_es ); - if( p_sys->b_delayed ) TsPushCmd( p_sys->p_ts, (ts_cmd_t *) ); else -CmdExecuteAdd( p_sys->p_out, ); +CmdExecuteAdd( p_out, ); vlc_mutex_unlock( _sys->lock ); @@ -482,7 +481,7 @@ static int Send( es_out_t *p_out, es_out_id_t *p_es, block_t *p_block ) if( p_sys->b_delayed ) TsPushCmd( p_sys->p_ts, (ts_cmd_t *) ); else -i_ret = CmdExecuteSend( p_sys->p_out, ) ; +i_ret = CmdExecuteSend( p_out, ) ; vlc_mutex_unlock( _sys->lock ); @@ -501,9 +500,7 @@ static void Del( es_out_t *p_out, es_out_id_t *p_es ) if( p_sys->b_delayed ) TsPushCmd( p_sys->p_ts, (ts_cmd_t *) ); else -CmdExecuteDel( p_sys->p_out, ); - -TAB_REMOVE( p_sys->i_es, p_sys->pp_es, p_es ); +CmdExecuteDel( p_out, ); vlc_mutex_unlock( _sys->lock ); } @@ -682,7 +679,7 @@ static int ControlLocked( es_out_t *p_out, input_source_t *in, int i_query, TsPushCmd( p_sys->p_ts, (ts_cmd_t *) ); return VLC_SUCCESS; } -return CmdExecuteControl( p_sys->p_out, ); +return CmdExecuteControl( p_out, ); } /* Special control when delayed */ @@ -761,25 +758,25 @@ static int ControlLocked( es_out_t *p_out, input_source_t *in, int i_query, } } -static int Control( es_out_t *p_out, input_source_t *in, int i_query, va_list args ) +static int Control( es_out_t *p_tsout, input_source_t *in, int i_query, va_list args ) { -es_out_sys_t *p_sys = container_of(p_out, es_out_sys_t, out); +es_out_sys_t *p_sys = container_of(p_tsout, es_out_sys_t, out); int i_ret; vlc_mutex_lock( _sys->lock ); -TsAutoStop( p_out ); +TsAutoStop( p_tsout ); -i_ret = ControlLocked( p_out, in, i_query, args ); +i_ret = ControlLocked( p_tsout, in, i_query, args ); vlc_mutex_unlock( _sys->lock ); return i_ret; } -static int PrivControlLocked( es_out_t *p_out, int i_query, va_list args ) +static int PrivControlLocked( es_out_t *p_tsout, int i_query, va_list args ) { -es_out_sys_t *p_sys = container_of(p_out, es_out_sys_t, out); +es_out_sys_t *p_sys = container_of(p_tsout, es_out_sys_t, out); switch( i_query ) { @@ -797,17 +794,17 @@ static int PrivControlLocked( es_out_t *p_out, int i_query, va_list args ) TsPushCmd( p_sys->p_ts, ); return VLC_SUCCESS; } -return CmdExecutePrivControl( p_sys->p_out, ); +return CmdExecutePrivControl( p_tsout, ); } case ES_OUT_PRIV_GET_WAKE_UP: /* TODO ? */ { vlc_tick_t *pi_wakeup = va_arg( args, vlc_tick_t* ); -return ControlLockedGetWakeup( p_out, pi_wakeup ); +return ControlLockedGetWakeup( p_tsout, pi_wakeup ); } case ES_OUT_PRIV_GET_BUFFERING: { bool *pb_buffering = va_arg( args, bool* ); -return ControlLockedGetBuffering( p_out, pb_buffering ); +return ControlLockedGetBuffering( p_tsout, pb_buffering ); } case ES_OUT_PRIV_SET_PAUSE_STATE: { @@ -815,18 +812,18 @@ static int PrivControlLocked( es_out_t *p_out, int i_query, va_list args ) const bool b_paused = (bool)va_arg( args, int ); const vlc_tick_t i_date = va_arg( args, vlc_tick_t ); -return ControlLockedSetPauseState( p_out, b_source_paused, b_paused, i_date ); +return ControlLockedSetPauseState( p_tsout,
[vlc-commits] configure.ac: handle faad pkgconfig
vlc | branch: master | Francois Cartegnie | Thu Apr 30 14:26:14 2020 +0200| [eea2b42638cd5d6e1a5b0b78f41f71f325160b51] | committer: Francois Cartegnie configure.ac: handle faad pkgconfig > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eea2b42638cd5d6e1a5b0b78f41f71f325160b51 --- configure.ac | 36 ++-- modules/codec/Makefile.am | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index 17c776e383..aa140c941d 100644 --- a/configure.ac +++ b/configure.ac @@ -2803,25 +2803,25 @@ fi dnl dnl faad decoder plugin dnl -AC_ARG_ENABLE([faad], -AS_HELP_STRING([--enable-faad], [faad codec (default auto)])) -have_faad="no" -AS_IF([test "${enable_faad}" != "no"], [ - AC_CHECK_HEADERS([neaacdec.h], [ -AC_CHECK_LIB([faad], [NeAACDecOpen], [have_faad="yes"],, [$LIBM]) - -AS_IF([test "${have_faad}" = "yes"], [ - VLC_ADD_PLUGIN([faad]) - VLC_ADD_LIBS([faad],[-lfaad]) -], [ - AS_IF([test "${enable_faad}" = "yes"], [ -AC_MSG_ERROR([cannot find FAAD library]) - ], [ -AC_MSG_WARN([cannot find FAAD library]) - ]) +PKG_WITH_MODULES([FAAD],[faad2], + VLC_ADD_PLUGIN(faad) + VLC_ADD_CFLAGS(faad, [$FAAD_CFLAGS]) + VLC_ADD_LIBS(faad,[$FAAD_LIBS]), + AS_IF([test "x${enable_faad}" != "xno"],[ +AC_CHECK_HEADERS([neaacdec.h], [ + AC_CHECK_LIB([faad], [NeAACDecOpen],[ + VLC_ADD_PLUGIN([faad]) + VLC_ADD_LIBS([faad],[-lfaad]) + found_faad="yes" + ],[], [$LIBM]) ]) - ]) -]) +AS_IF([test "x${found_faad}" != "xyes"], +AS_IF([test "x${enable_faad}" == "xyes"], +AC_MSG_ERROR([${FAAD_PKG_ERRORS}.]), +AC_MSG_WARN([${FAAD_PKG_ERRORS}.])) +) + ]), +[faad AAC audio decoder]) dnl dnl AOM decoder plugin diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am index e490173d24..e3e1316602 100644 --- a/modules/codec/Makefile.am +++ b/modules/codec/Makefile.am @@ -41,7 +41,7 @@ libaraw_plugin_la_LIBADD = $(LIBM) codec_LTLIBRARIES += libaraw_plugin.la libfaad_plugin_la_SOURCES = codec/faad.c packetizer/mpeg4audio.h -libfaad_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_faad) +libfaad_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_faad) libfaad_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' libfaad_plugin_la_LIBADD = $(LIBS_faad) $(LIBM) EXTRA_LTLIBRARIES += libfaad_plugin.la ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: es_out_timeshift: store commands as different sizes
vlc | branch: master | Francois Cartegnie | Wed Apr 22 18:21:48 2020 +0200| [3344cd4145511d22664acfd29fc2eddb2cd3e719] | committer: Francois Cartegnie input: es_out_timeshift: store commands as different sizes > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3344cd4145511d22664acfd29fc2eddb2cd3e719 --- src/input/es_out_timeshift.c | 447 +++ 1 file changed, 239 insertions(+), 208 deletions(-) diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c index 6f1561cc89..1737343290 100644 --- a/src/input/es_out_timeshift.c +++ b/src/input/es_out_timeshift.c @@ -59,16 +59,24 @@ # define attribute_packed #endif -enum +enum ts_storage_cmd_type_e { -C_ADD, +C_ADD = 0, C_SEND, C_DEL, C_CONTROL, +C_PRIVCONTROL, }; typedef struct attribute_packed { +int8_t i_type; +vlc_tick_t i_date; +} ts_cmd_header_t; + +typedef struct attribute_packed +{ +ts_cmd_header_t header; input_source_t *in; es_out_id_t *p_es; es_format_t *p_fmt; @@ -76,11 +84,13 @@ typedef struct attribute_packed typedef struct attribute_packed { +ts_cmd_header_t header; es_out_id_t *p_es; } ts_cmd_del_t; typedef struct attribute_packed { +ts_cmd_header_t header; es_out_id_t *p_es; block_t *p_block; int i_offset; /* We do not use file > INT_MAX */ @@ -88,8 +98,9 @@ typedef struct attribute_packed typedef struct attribute_packed { -input_source_t *in; +ts_cmd_header_t header; int i_query; +input_source_t *in; union { @@ -137,6 +148,7 @@ typedef struct attribute_packed typedef struct attribute_packed { +ts_cmd_header_t header; int i_query; union @@ -158,20 +170,22 @@ typedef struct attribute_packed } u; } ts_cmd_privcontrol_t; -typedef struct attribute_packed +typedef union { -int8_t i_type; -vlc_tick_t i_date; -union -{ -ts_cmd_add_t add; -ts_cmd_del_t del; -ts_cmd_send_tsend; -ts_cmd_control_t control; -ts_cmd_privcontrol_t privcontrol; -} u; +ts_cmd_header_t header; +ts_cmd_add_t add; +ts_cmd_del_t del; +ts_cmd_send_tsend; +ts_cmd_control_t control; +ts_cmd_privcontrol_t privcontrol; } ts_cmd_t; +static_assert(offsetof(ts_cmd_t, header) == offsetof(ts_cmd_add_t, header), "invalid packing"); +static_assert(offsetof(ts_cmd_t, header) == offsetof(ts_cmd_del_t, header), "invalid packing"); +static_assert(offsetof(ts_cmd_t, header) == offsetof(ts_cmd_send_t, header), "invalid packing"); +static_assert(offsetof(ts_cmd_t, header) == offsetof(ts_cmd_control_t, header), "invalid packing"); +static_assert(offsetof(ts_cmd_t, header) == offsetof(ts_cmd_privcontrol_t, header), "invalid packing"); + typedef struct ts_storage_t ts_storage_t; struct ts_storage_t { @@ -286,23 +300,23 @@ static void TsStoragePopCmd( ts_storage_t *p_storage, ts_cmd_t *p_cmd, b static void CmdClean( ts_cmd_t * ); -static int CmdInitAdd( ts_cmd_t *, input_source_t *, es_out_id_t *, const es_format_t *, bool b_copy ); -static void CmdInitSend ( ts_cmd_t *, es_out_id_t *, block_t * ); -static int CmdInitDel( ts_cmd_t *, es_out_id_t * ); -static int CmdInitControl( ts_cmd_t *, input_source_t *, int i_query, va_list, bool b_copy ); -static int CmdInitPrivControl( ts_cmd_t *, int i_query, va_list, bool b_copy ); +static int CmdInitAdd( ts_cmd_add_t *, input_source_t *, es_out_id_t *, const es_format_t *, bool b_copy ); +static void CmdInitSend ( ts_cmd_send_t *, es_out_id_t *, block_t * ); +static int CmdInitDel( ts_cmd_del_t *, es_out_id_t * ); +static int CmdInitControl( ts_cmd_control_t *, input_source_t *, int i_query, va_list, bool b_copy ); +static int CmdInitPrivControl( ts_cmd_privcontrol_t *, int i_query, va_list, bool b_copy ); /* */ -static void CmdCleanAdd( ts_cmd_t * ); -static void CmdCleanSend ( ts_cmd_t * ); -static void CmdCleanControl( ts_cmd_t *p_cmd ); +static void CmdCleanAdd( ts_cmd_add_t * ); +static void CmdCleanSend ( ts_cmd_send_t * ); +static void CmdCleanControl( ts_cmd_control_t * ); /* XXX these functions will take the destination es_out_t */ -static void CmdExecuteAdd( es_out_t *, ts_cmd_t * ); -static int CmdExecuteSend ( es_out_t *, ts_cmd_t * ); -static void CmdExecuteDel( es_out_t *, ts_cmd_t * ); -static int CmdExecuteControl( es_out_t *, ts_cmd_t * ); -static int CmdExecutePrivControl( es_out_t *, ts_cmd_t * ); +static void CmdExecuteAdd( es_out_t *, ts_cmd_add_t * ); +static int CmdExecuteSend ( es_out_t *, ts_cmd_send_t * ); +static void CmdExecuteDel( es_out_t *, ts_cmd_del_t * ); +static int CmdExecuteControl( es_out_t *, ts_cmd_control_t * ); +static int CmdExecutePrivControl( es_out_t *, ts_cmd_privcontrol_t * ); /* File helpers */ static int GetTmpFile( char **ppsz_file, const char *psz_path ); @@
[vlc-commits] es_out: split controls range
vlc | branch: master | Francois Cartegnie | Wed Apr 22 19:53:16 2020 +0200| [04a3611845a4b49167d7392f4f7d18e728d88220] | committer: Francois Cartegnie es_out: split controls range you can't have assert() between priv/public spaces if the enums can collide > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04a3611845a4b49167d7392f4f7d18e728d88220 --- src/input/es_out.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/es_out.h b/src/input/es_out.h index cc8ce55a6a..8ab41a80bf 100644 --- a/src/input/es_out.h +++ b/src/input/es_out.h @@ -38,7 +38,7 @@ enum es_out_mode_e enum es_out_query_private_e { /* set/get mode */ -ES_OUT_PRIV_SET_MODE, /* arg1= int */ +ES_OUT_PRIV_SET_MODE = ES_OUT_PRIVATE_START, /* arg1= int */ /* Same than ES_OUT_SET_ES/ES_OUT_UNSET_ES/ES_OUT_RESTART_ES, but with vlc_es_id_t * */ ES_OUT_PRIV_SET_ES, /* arg1= vlc_es_id_t* */ ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] input: es_out_timeshift: use own aligned memory storage
vlc | branch: master | Francois Cartegnie | Wed Apr 22 16:24:56 2020 +0200| [943823d8dda9e196073e1c0d26fce8fa32d002d7] | committer: Francois Cartegnie input: es_out_timeshift: use own aligned memory storage > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=943823d8dda9e196073e1c0d26fce8fa32d002d7 --- src/input/es_out_timeshift.c | 59 +++- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c index 7c1d2d0095..6f1561cc89 100644 --- a/src/input/es_out_timeshift.c +++ b/src/input/es_out_timeshift.c @@ -187,10 +187,10 @@ struct ts_storage_t FILE*p_filer; /* FILE handle for data reading */ /* */ -int i_cmd_r; -int i_cmd_w; -int i_cmd_max; -ts_cmd_t *p_cmd; +uint8_t *p_cmd_r; +uint8_t *p_cmd_w; +uint8_t *p_cmd_buf; +size_t i_cmd_buf; }; typedef struct @@ -1179,6 +1179,9 @@ static void *TsRun( void *p_data ) /* * */ +#define MAX_COMMAND_SIZE sizeof(ts_cmd_t) +#define TS_STORAGE_COMMAND_PREALLOC 3 + static ts_storage_t *TsStorageNew( const char *psz_tmp_path, int64_t i_tmp_size_max ) { ts_storage_t *p_storage = malloc( sizeof (*p_storage) ); @@ -1222,13 +1225,13 @@ static ts_storage_t *TsStorageNew( const char *psz_tmp_path, int64_t i_tmp_size_ p_storage->i_file_size = 0; /* */ -p_storage->i_cmd_w = 0; -p_storage->i_cmd_r = 0; -p_storage->i_cmd_max = 3; -p_storage->p_cmd = vlc_alloc( p_storage->i_cmd_max, sizeof(*p_storage->p_cmd) ); +p_storage->p_cmd_buf = vlc_alloc( TS_STORAGE_COMMAND_PREALLOC, MAX_COMMAND_SIZE ); +p_storage->i_cmd_buf = TS_STORAGE_COMMAND_PREALLOC * MAX_COMMAND_SIZE; +p_storage->p_cmd_w = p_storage->p_cmd_buf; +p_storage->p_cmd_r = p_storage->p_cmd_buf; //fprintf( stderr, "\nSTORAGE name=%s size=%d KiB\n", p_storage->psz_file, p_storage->i_cmd_max * sizeof(*p_storage->p_cmd) /1024 ); -if( !p_storage->p_cmd ) +if( !p_storage->p_cmd_buf ) { TsStorageDelete( p_storage ); return NULL; @@ -1242,7 +1245,7 @@ error: static void TsStorageDelete( ts_storage_t *p_storage ) { -while( p_storage->i_cmd_r < p_storage->i_cmd_w ) +while( p_storage->p_cmd_r < p_storage->p_cmd_w ) { ts_cmd_t cmd; @@ -1250,7 +1253,7 @@ static void TsStorageDelete( ts_storage_t *p_storage ) CmdClean( ); } -free( p_storage->p_cmd ); +free( p_storage->p_cmd_buf ); fclose( p_storage->p_filer ); fclose( p_storage->p_filew ); @@ -1264,30 +1267,37 @@ static void TsStorageDelete( ts_storage_t *p_storage ) static void TsStoragePack( ts_storage_t *p_storage ) { /* Try to release a bit of memory */ -if( p_storage->i_cmd_w >= p_storage->i_cmd_max ) +if( (size_t)(p_storage->p_cmd_w - p_storage->p_cmd_buf) == p_storage->i_cmd_buf ) return; -p_storage->i_cmd_max = __MAX( p_storage->i_cmd_w, 1 ); - -ts_cmd_t *p_new = realloc( p_storage->p_cmd, p_storage->i_cmd_max * sizeof(*p_storage->p_cmd) ); -if( p_new ) -p_storage->p_cmd = p_new; +size_t i_realloc = p_storage->p_cmd_w - p_storage->p_cmd_buf; +uint8_t *p_realloc = realloc( p_storage->p_cmd_buf, i_realloc ); +if( p_realloc ) +{ +p_storage->p_cmd_r = p_realloc + (p_storage->p_cmd_r - p_storage->p_cmd_buf); +p_storage->p_cmd_w = p_realloc + i_realloc; +p_storage->i_cmd_buf = i_realloc; +p_storage->p_cmd_buf = p_realloc; +} } + static bool TsStorageIsFull( ts_storage_t *p_storage, const ts_cmd_t *p_cmd ) { -if( p_cmd && p_cmd->i_type == C_SEND && p_storage->i_cmd_w > 0 ) +if( p_cmd && p_cmd->i_type == C_SEND && p_storage->p_cmd_w ) { size_t i_size = sizeof(*p_cmd->u.send.p_block) + p_cmd->u.send.p_block->i_buffer; if( p_storage->i_file_size + i_size >= p_storage->i_file_max ) return true; } -return p_storage->i_cmd_w >= p_storage->i_cmd_max; +return (size_t)(p_storage->p_cmd_w - p_storage->p_cmd_buf) > p_storage->i_cmd_buf - MAX_COMMAND_SIZE; } + static bool TsStorageIsEmpty( ts_storage_t *p_storage ) { -return !p_storage || p_storage->i_cmd_r >= p_storage->i_cmd_w; +return !p_storage || p_storage->p_cmd_r >= p_storage->p_cmd_w; } + static void TsStoragePushCmd( ts_storage_t *p_storage, const ts_cmd_t *p_cmd, bool b_flush ) { ts_cmd_t cmd = *p_cmd; @@ -1321,13 +1331,18 @@ static void TsStoragePushCmd( ts_storage_t *p_storage, const ts_cmd_t *p_cmd, bo if( b_flush ) fflush( p_storage->p_filew ); } -p_storage->p_cmd[p_storage->i_cmd_w++] = cmd; + +memcpy( p_storage->p_cmd_w, , sizeof(cmd) ); +p_storage->p_cmd_w += sizeof(cmd); } + static void TsStoragePopCmd(
[vlc-commits] input: es_out_timeshift: use union for block offset
vlc | branch: master | Francois Cartegnie | Wed Apr 22 17:56:50 2020 +0200| [4ca9fab36255787f9d798abad7d51d47ac2518f4] | committer: Francois Cartegnie input: es_out_timeshift: use union for block offset > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ca9fab36255787f9d798abad7d51d47ac2518f4 --- src/input/es_out_timeshift.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c index 272f541057..8ffa1ea400 100644 --- a/src/input/es_out_timeshift.c +++ b/src/input/es_out_timeshift.c @@ -92,8 +92,10 @@ typedef struct attribute_packed { ts_cmd_header_t header; es_out_id_t *p_es; -block_t *p_block; -int i_offset; /* We do not use file > INT_MAX */ +union{ +block_t *p_block; +int i_offset; /* We do not use file > INT_MAX */ +}; } ts_cmd_send_t; typedef struct attribute_packed ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: rely on live offset for edge control
vlc | branch: master | Francois Cartegnie | Mon May 18 15:39:59 2020 +0200| [75c2df6cee84452ac65038ddccaff2a2c18bbb7c] | committer: Francois Cartegnie demux: adaptive: rely on live offset for edge control fixes start case when min buffering < playlist duration refs VLCKit/-/issues/374 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75c2df6cee84452ac65038ddccaff2a2c18bbb7c --- modules/demux/adaptive/SegmentTracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp index 5a675481d7..1a5f857d42 100644 --- a/modules/demux/adaptive/SegmentTracker.cpp +++ b/modules/demux/adaptive/SegmentTracker.cpp @@ -416,7 +416,7 @@ void SegmentTracker::registerListener(SegmentTrackerListenerInterface *listener) bool SegmentTracker::bufferingAvailable() const { if(adaptationSet->getPlaylist()->isLive()) -return bufferingLogic->getMinBuffering(adaptationSet->getPlaylist()) <= getMinAheadTime(); +return getMinAheadTime() > 0; return true; } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: add ac4 formatnamespace mapping
vlc | branch: master | Francois Cartegnie | Fri May 15 10:04:05 2020 +0200| [f55a71fe4a45a18af914e4a51b6b98bf8269e2e1] | committer: Francois Cartegnie demux: adaptive: add ac4 formatnamespace mapping > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f55a71fe4a45a18af914e4a51b6b98bf8269e2e1 --- modules/demux/adaptive/tools/FormatNamespace.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/demux/adaptive/tools/FormatNamespace.cpp b/modules/demux/adaptive/tools/FormatNamespace.cpp index e1e36e8260..bf1edb7260 100644 --- a/modules/demux/adaptive/tools/FormatNamespace.cpp +++ b/modules/demux/adaptive/tools/FormatNamespace.cpp @@ -165,6 +165,7 @@ void FormatNamespace::Parse(vlc_fourcc_t fcc, const std::vector case MP4RA("dtsh"): case MP4RA("ac-3"): case MP4RA("ec-3"): +case MP4RA("ac-4"): case MP4RA("opus"): es_format_Change(, AUDIO_ES, vlc_fourcc_GetCodec(AUDIO_ES, fcc)); break; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: adaptive: use current segment number when available
vlc | branch: master | Francois Cartegnie | Mon May 18 17:56:46 2020 +0200| [a59a0690dce601b26ed205a6bb1cf408f745a007] | committer: Francois Cartegnie demux: adaptive: use current segment number when available > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a59a0690dce601b26ed205a6bb1cf408f745a007 --- modules/demux/adaptive/SegmentTracker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp index 8d6e4981fe..5a675481d7 100644 --- a/modules/demux/adaptive/SegmentTracker.cpp +++ b/modules/demux/adaptive/SegmentTracker.cpp @@ -389,7 +389,9 @@ vlc_tick_t SegmentTracker::getMinAheadTime() const if(rep->needsUpdate()) (void) rep->runLocalUpdates(resources); -uint64_t startnumber = bufferingLogic->getStartSegmentNumber(rep); +uint64_t startnumber = curNumber; +if(startnumber == std::numeric_limits::max()) +startnumber = bufferingLogic->getStartSegmentNumber(rep); if(startnumber != std::numeric_limits::max()) return rep->getMinAheadTime(startnumber); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] win32: use CreateThread instead of _beginthreadex in winstore builds
vlc | branch: master | Steve Lhomme | Tue Apr 28 11:05:19 2020 +0200| [f9bfd84b2eda703e8cbc41ef1543de9b924314fa] | committer: Steve Lhomme win32: use CreateThread instead of _beginthreadex in winstore builds _beginthreadex is forbidden. We already used CreateThread in such builds via winstorecompat. Modify the code to avoid casting when not needed. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f9bfd84b2eda703e8cbc41ef1543de9b924314fa --- src/win32/thread.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/win32/thread.c b/src/win32/thread.c index 61cd62ed35..2113f33d3f 100644 --- a/src/win32/thread.c +++ b/src/win32/thread.c @@ -345,7 +345,13 @@ static void vlc_thread_destroy(vlc_thread_t th) free(th); } -static unsigned __stdcall vlc_entry (void *p) +static +#if VLC_WINSTORE_APP +DWORD +#else // !VLC_WINSTORE_APP +unsigned +#endif // !VLC_WINSTORE_APP +__stdcall vlc_entry (void *p) { struct vlc_thread *th = p; @@ -373,11 +379,16 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached, th->wait.addr = NULL; InitializeCriticalSection(>wait.lock); +HANDLE h; +#if VLC_WINSTORE_APP +h = CreateThread(NULL, 0, vlc_entry, th, 0, NULL); +#else // !VLC_WINSTORE_APP /* When using the MSVCRT C library you have to use the _beginthreadex * function instead of CreateThread, otherwise you'll end up with * memory leaks and the signal functions not working (see Microsoft * Knowledge Base, article 104641) */ -uintptr_t h = _beginthreadex (NULL, 0, vlc_entry, th, 0, NULL); +h = (HANDLE)(uintptr_t) _beginthreadex (NULL, 0, vlc_entry, th, 0, NULL); +#endif // !VLC_WINSTORE_APP if (h == 0) { int err = errno; @@ -387,11 +398,11 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached, if (detached) { -CloseHandle((HANDLE)h); +CloseHandle(h); th->id = NULL; } else -th->id = (HANDLE)h; +th->id = h; if (p_handle != NULL) *p_handle = th; @@ -515,7 +526,11 @@ void vlc_testcancel (void) th->data = NULL; /* TODO: special value? */ if (th->id == NULL) /* Detached thread */ vlc_thread_destroy(th); +#if VLC_WINSTORE_APP +ExitThread(0); +#else // !VLC_WINSTORE_APP _endthreadex(0); +#endif // !VLC_WINSTORE_APP } void vlc_control_cancel (vlc_cleanup_t *cleaner) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: harfbuzz: turn local patches into patches against the harfbuzz git
vlc | branch: master | Steve Lhomme | Mon May 18 14:19:24 2020 +0200| [d7c824529ceab78909e8239cc422b756ceb87710] | committer: Steve Lhomme contrib: harfbuzz: turn local patches into patches against the harfbuzz git It's easier to apply & rebase patches when updating to a newer version. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d7c824529ceab78909e8239cc422b756ceb87710 --- ...h => 0001-fix-OSAtomic-calls-for-AArch64.patch} | 22 +++--- ...=> 0002-Update-the-bundled-ax_pthread.m4.patch} | 34 +- contrib/src/harfbuzz/rules.mak | 4 +-- 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/contrib/src/harfbuzz/harfbuzz-aarch64.patch b/contrib/src/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch similarity index 58% rename from contrib/src/harfbuzz/harfbuzz-aarch64.patch rename to contrib/src/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch index 21825299af..275f012946 100644 --- a/contrib/src/harfbuzz/harfbuzz-aarch64.patch +++ b/contrib/src/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch @@ -1,6 +1,17 @@ harfbuzz-2.0.0/src/hb-atomic.hh.orig 2018-10-01 19:49:23.0 +0200 -+++ harfbuzz-2.0.0/src/hb-atomic.hh2020-03-29 16:44:27.520441550 +0200 -@@ -163,10 +163,8 @@ +From f110dc32b2a0f3fccfc80007916efcc9f62c56fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= +Date: Fri, 15 May 2020 09:14:15 +0200 +Subject: [PATCH 1/3] fix OSAtomic calls for AArch64 + +--- + src/hb-atomic.hh | 8 +--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/hb-atomic.hh b/src/hb-atomic.hh +index b3fb296b..20dae7e3 100644 +--- a/src/hb-atomic.hh b/src/hb-atomic.hh +@@ -164,10 +164,8 @@ static inline bool _hb_compare_and_swap_ptr (void **P, void *O, void *N) #elif !defined(HB_NO_MT) && defined(__APPLE__) #include @@ -12,7 +23,7 @@ #endif #define _hb_memory_barrier() OSMemoryBarrier () -@@ -174,7 +172,11 @@ +@@ -175,7 +173,11 @@ static inline bool _hb_compare_and_swap_ptr (void **P, void *O, void *N) #define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), (AI)) - (V)) #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) @@ -24,3 +35,6 @@ #else #if __ppc64__ || __x86_64__ || __aarch64__ #define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P)) +-- +2.26.0.windows.1 + diff --git a/contrib/src/harfbuzz/update-ax_pthread.m4.patch b/contrib/src/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch similarity index 91% rename from contrib/src/harfbuzz/update-ax_pthread.m4.patch rename to contrib/src/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch index 920e068b9d..3a8258fd89 100644 --- a/contrib/src/harfbuzz/update-ax_pthread.m4.patch +++ b/contrib/src/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch @@ -1,5 +1,20 @@ harfbuzz/m4/ax_pthread.m4.orig 2020-04-08 14:31:17.385627420 +0300 -+++ harfbuzz/m4/ax_pthread.m4 2020-04-08 14:31:42.361091349 +0300 +From dc5815a2cc756a29c01a85081e16e43131f18411 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Fri, 15 May 2020 09:16:42 +0200 +Subject: [PATCH 2/3] Update the bundled ax_pthread.m4 + +This fixes building for Windows with clang, where the bundled +version of ax_pthread.m4 assumes that Clang doesn't need the +pthread option in LDFLAGS (assuming that a system that Clang +supports doesn't need an external library for pthreads). +--- + m4/ax_pthread.m4 | 224 ++- + 1 file changed, 123 insertions(+), 101 deletions(-) + +diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 +index 5fbf9fe0..1598d077 100644 +--- a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 @@ -55,6 +55,7 @@ # # Copyright (c) 2008 Steven G. Johnson @@ -17,7 +32,7 @@ AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ -@@ -123,10 +124,12 @@ +@@ -123,10 +124,12 @@ fi # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). @@ -34,7 +49,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -@@ -194,14 +197,47 @@ +@@ -194,14 +197,47 @@ case $host_os in # that too in a future libc.) So we'll check first for the # standard Solaris way of linking pthreads (-mt -lpthread). @@ -84,7 +99,7 @@ # The presence of a feature test macro requesting re-entrant function # definitions is, on some systems, a strong hint that pthreads support is -@@ -224,25 +260,86 @@ +@@ -224,25 +260,86 @@ AS_IF([test "x$ax_pthread_check_macro" = "x--"], [ax_pthread_check_cond=0], [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) @@ -188,7 +203,7 @@ # Clang needs special handling, because older versions handle the -pthread # option in a rather...
[vlc-commits] crystalhd: remove this ancient hardware video decoder module
vlc | branch: master | Steve Lhomme | Thu Apr 30 12:00:20 2020 +0200| [e1a90aa943b55734cdf8f25f5e2dc12a547b0c30] | committer: Steve Lhomme crystalhd: remove this ancient hardware video decoder module > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1a90aa943b55734cdf8f25f5e2dc12a547b0c30 --- configure.ac | 29 -- contrib/src/crystalhd/SHA512SUMS | 1 - contrib/src/crystalhd/callback_proto.patch | 29 -- contrib/src/crystalhd/rules.mak| 28 -- modules/codec/Makefile.am | 6 - modules/codec/crystalhd.c | 626 - po/POTFILES.in | 1 - po/vlc.pot | 4 - 8 files changed, 724 deletions(-) diff --git a/configure.ac b/configure.ac index cc682e94c3..17c776e383 100644 --- a/configure.ac +++ b/configure.ac @@ -2455,35 +2455,6 @@ then VLC_ADD_CFLAGS([omxil],[-DRPI_OMX]) fi -dnl -dnl CrystalHD codec plugin -dnl -AC_ARG_ENABLE([crystalhd], - AS_HELP_STRING([--enable-crystalhd], [crystalhd codec plugin (default auto)])) -if test "${enable_crystalhd}" != "no"; then -AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [ - VLC_ADD_PLUGIN([crystalhd]) - VLC_ADD_LIBS([crystalhd], [-lcrystalhd]) -],[ - if test "${SYS}" = "mingw32" ; then -AC_CHECK_HEADERS([libcrystalhd/bc_dts_defs.h], [ - VLC_ADD_PLUGIN([crystalhd]) - AC_CHECK_HEADERS([libcrystalhd/bc_drv_if.h], [ -VLC_ADD_LIBS([crystalhd], [-lbcmDIL]) -]) -],[ - AS_IF([test x"${enable_crystalhd}" = "xyes"], -[AC_MSG_ERROR("Could not find CrystalHD development headers")], -[AC_MSG_WARN("Could not find CrystalHD development headers")]) -],[#define __LINUX_USER__ - #include -]) - fi -],[ - #include - ]) -fi - dnl dnl mad plugin dnl diff --git a/contrib/src/crystalhd/SHA512SUMS b/contrib/src/crystalhd/SHA512SUMS deleted file mode 100644 index 44fcb76a31..00 --- a/contrib/src/crystalhd/SHA512SUMS +++ /dev/null @@ -1 +0,0 @@ -26a7443b8f3867742b519fac13552e0b4e7b8d5310223b5c73160a679ed777d7917b6d9ac0ed5629f23baa7d9db98425dd1d90c2893f9640c7890aebab4867db crystalhd_lgpl_includes_v1.zip diff --git a/contrib/src/crystalhd/callback_proto.patch b/contrib/src/crystalhd/callback_proto.patch deleted file mode 100644 index 3199443f74..00 --- a/contrib/src/crystalhd/callback_proto.patch +++ /dev/null @@ -1,29 +0,0 @@ libcrystalhd/bc_dts_defs.h.orig2019-07-12 07:02:21.393012000 +0200 -+++ libcrystalhd/bc_dts_defs.h 2019-07-12 07:01:48.787781100 +0200 -@@ -439,6 +439,8 @@ enum DECODER_CAP_FLAGS - BC_DEC_FLAGS_M4P2 = 0x08, //MPEG-4 Part 2: Divx, Xvid etc. - }; - -+typedef struct _BC_DTS_PROC_OUT BC_DTS_PROC_OUT; -+ - #if defined(__KERNEL__) || defined(__LINUX_USER__) - typedef BC_STATUS (*dts_pout_callback)(void *shnd, U32 width,U32 height, U32 stride, void *pOut); - #else -@@ -449,7 +451,7 @@ typedef BC_STATUS (*dts_pout_callback)(v - //User Data - #define MAX_UD_SIZE 1792//1920 - 128 - --typedef struct _BC_DTS_PROC_OUT{ -+struct _BC_DTS_PROC_OUT{ - U8 *Ybuff; /* Caller Supplied buffer for Y data */ - U32 YbuffSz;/* Caller Supplied Y buffer size */ - U32 YBuffDoneSz;/* Transferred Y datasize */ -@@ -478,7 +480,7 @@ typedef struct _BC_DTS_PROC_OUT{ - U8 bRevertScramble; - U32 StrideSzUV; /* Caller supplied Stride Size for UV data */ - --}BC_DTS_PROC_OUT; -+}; - - typedef struct _BC_DTS_STATUS { - U8 ReadyListCount; /* Number of frames in ready list (reported by driver) */ diff --git a/contrib/src/crystalhd/rules.mak b/contrib/src/crystalhd/rules.mak deleted file mode 100644 index 0227dfe34d..00 --- a/contrib/src/crystalhd/rules.mak +++ /dev/null @@ -1,28 +0,0 @@ -# CrystalHD headers - -CRYSTAL_HEADERS_URL := http://www.broadcom.com/docs/support/crystalhd/crystalhd_lgpl_includes_v1.zip - -ifdef HAVE_WIN32 -PKGS += crystalhd -endif - -$(TARBALLS)/crystalhd_lgpl_includes_v1.zip: - $(call download_pkg,$(CRYSTAL_HEADERS_URL),crystalhd) - -CRYSTAL_SOURCES := crystalhd_lgpl_includes_v1.zip - -.sum-crystalhd: $(CRYSTAL_SOURCES) - -libcrystalhd: $(CRYSTAL_SOURCES) .sum-crystalhd - $(RM) -R $(UNPACK_DIR) && unzip -o $< -d $(UNPACK_DIR) - chmod -R u+w $(UNPACK_DIR) - $(APPLY) $(SRC)/crystalhd/callback_proto.patch -ifdef HAVE_WIN32 # we want dlopening on win32 - rm -rf $(UNPACK_DIR)/bc_drv_if.h -endif - $(MOVE) - -.crystalhd: libcrystalhd - rm -Rf "$(PREFIX)/include/libcrystalhd" - cp -R $< "$(PREFIX)/include" - touch $@ diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am index 947b68ee33..e490173d24 100644 ---
[vlc-commits] contrib: taglib: use SetFilePointerEx instead of SetFilePointer
vlc | branch: master | Steve Lhomme | Mon May 18 14:12:27 2020 +0200| [9b2a81babe92ee718dd8e0a008e1b2ed1188ab17] | committer: Steve Lhomme contrib: taglib: use SetFilePointerEx instead of SetFilePointer It's available on more Win10 versions with UCRT builds and provides the same features. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b2a81babe92ee718dd8e0a008e1b2ed1188ab17 --- ...etFilePointerEx-instead-of-SetFilePointer.patch | 40 ++ contrib/src/taglib/rules.mak | 1 + 2 files changed, 41 insertions(+) diff --git a/contrib/src/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch b/contrib/src/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch new file mode 100644 index 00..006da0d6d3 --- /dev/null +++ b/contrib/src/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch @@ -0,0 +1,40 @@ +From d27cc3568c2c04e86a8ec6e29fcdf7e3814b0596 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 15 May 2020 09:25:40 +0200 +Subject: [PATCH 1/3] use SetFilePointerEx instead of SetFilePointer + +It's available on more Win10 versions with UCRT builds and provides the same +features. The API is available since Windows XP. +--- + taglib/toolkit/tfilestream.cpp | 8 ++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +index 5205bae0..4b448271 100644 +--- a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +@@ -364,7 +364,9 @@ void FileStream::seek(long offset, Position p) + } + + SetLastError(NO_ERROR); +- SetFilePointer(d->file, offset, NULL, whence); ++ LARGE_INTEGER lOffset; ++ lOffset.QuadPart = offset; ++ SetFilePointerEx(d->file, lOffset, NULL, whence); + + const int lastError = GetLastError(); + if(lastError != NO_ERROR && lastError != ERROR_NEGATIVE_SEEK) +@@ -411,7 +413,9 @@ long FileStream::tell() const + #ifdef _WIN32 + + SetLastError(NO_ERROR); +- const DWORD position = SetFilePointer(d->file, 0, NULL, FILE_CURRENT); ++ LARGE_INTEGER lOffset; ++ lOffset.QuadPart = 0; ++ const DWORD position = SetFilePointerEx(d->file, lOffset, NULL, FILE_CURRENT); + if(GetLastError() == NO_ERROR) { + return static_cast(position); + } +-- +2.26.0.windows.1 + diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak index 2844ed4d5d..b967b7d54f 100644 --- a/contrib/src/taglib/rules.mak +++ b/contrib/src/taglib/rules.mak @@ -15,6 +15,7 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz: taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib $(UNPACK) + $(APPLY) $(SRC)/taglib/0001-use-SetFilePointerEx-instead-of-SetFilePointer.patch $(APPLY) $(SRC)/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch $(APPLY) $(SRC)/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch $(APPLY) $(SRC)/taglib/use_resolvers_on_streams.patch ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: taglib: only use APIs in winstore builds
vlc | branch: master | Steve Lhomme | Tue Apr 28 12:49:27 2020 +0200| [1730fe70e72ff41c6ca3cc78befc30142db8ec4f] | committer: Steve Lhomme contrib: taglib: only use APIs in winstore builds - CreateFile2 where CreateFileW is used - GetFileInformationByHandleEx instead of GetFileSize (which is what winstore compat did) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1730fe70e72ff41c6ca3cc78befc30142db8ec4f --- ...InformationByHandleEx-on-newer-builds-of-.patch | 39 .../0003-don-t-use-CreateFile-in-UWP-builds.patch | 43 ++ contrib/src/taglib/rules.mak | 5 +-- contrib/src/taglib/unicode.patch | 13 --- 4 files changed, 84 insertions(+), 16 deletions(-) diff --git a/contrib/src/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch b/contrib/src/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch new file mode 100644 index 00..5519d5e21f --- /dev/null +++ b/contrib/src/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch @@ -0,0 +1,39 @@ +From 9c02a2c245bed1d70dbd80b0e63abbcdecb74761 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 15 May 2020 09:29:55 +0200 +Subject: [PATCH 2/3] use GetFileInformationByHandleEx on newer builds of + Windows + +It's available since Vista and UWP builds that don't have GetFileSize. + +See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis +--- + taglib/toolkit/tfilestream.cpp | 8 + 1 file changed, 8 insertions(+) + +diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +index 4b448271..ad4443ea 100644 +--- a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +@@ -441,10 +441,18 @@ long FileStream::length() + #ifdef _WIN32 + + SetLastError(NO_ERROR); ++#if _WIN32_WINNT < _WIN32_WINNT_VISTA + const DWORD fileSize = GetFileSize(d->file, NULL); + if(GetLastError() == NO_ERROR) { + return static_cast(fileSize); + } ++#else // _WIN32_WINNT_VISTA ++ FILE_STANDARD_INFO fStdInfo; ++ BOOL success = GetFileInformationByHandleEx(d->file, FileStandardInfo, (LPVOID), sizeof(FILE_STANDARD_INFO)); ++ if(success) { ++return static_cast(fStdInfo.EndOfFile.LowPart); ++ } ++#endif // _WIN32_WINNT_VISTA + else { + debug("FileStream::length() -- Failed to get the file size."); + return 0; +-- +2.26.0.windows.1 + diff --git a/contrib/src/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch b/contrib/src/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch new file mode 100644 index 00..826eb9d056 --- /dev/null +++ b/contrib/src/taglib/0003-don-t-use-CreateFile-in-UWP-builds.patch @@ -0,0 +1,43 @@ +From a9024bd18ce20653616e04702b5e220de56b6b2c Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 15 May 2020 09:32:21 +0200 +Subject: [PATCH 3/3] don't use CreateFile in UWP builds + +CreateFile2 is available for such builds with more internal restrictions. + +See https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis +https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2 +--- + taglib/toolkit/tfilestream.cpp | 13 + + 1 file changed, 13 insertions(+) + +diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +index ad4443ea..10cd8d56 100644 +--- a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp +@@ -52,9 +52,22 @@ namespace + const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE); + + if(!path.wstr().empty()) ++#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++{ ++ CREATEFILE2_EXTENDED_PARAMETERS createExParams; ++ createExParams.dwSize = sizeof(createExParams); ++ createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; ++ createExParams.dwFileFlags = 0; ++ createExParams.dwSecurityQosFlags = 0; ++ createExParams.lpSecurityAttributes = NULL; ++ createExParams.hTemplateFile = NULL; ++ return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, ); ++} ++#else // WINAPI_PARTITION_DESKTOP + return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + else if(!path.str().empty()) + return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); ++#endif // WINAPI_PARTITION_DESKTOP + else + return InvalidFileHandle; + } +-- +2.26.0.windows.1 + diff --git a/contrib/src/taglib/rules.mak b/contrib/src/taglib/rules.mak index ba7db32c5e..2844ed4d5d 100644 --- a/contrib/src/taglib/rules.mak +++ b/contrib/src/taglib/rules.mak @@ -15,9 +15,8 @@ $(TARBALLS)/taglib-$(TAGLIB_VERSION).tar.gz: taglib: taglib-$(TAGLIB_VERSION).tar.gz .sum-taglib $(UNPACK) -ifdef HAVE_WINSTORE - $(APPLY) $(SRC)/taglib/unicode.patch -endif + $(APPLY) $(SRC)/taglib/0002-use-GetFileInformationByHandleEx-on-newer-builds-of-.patch + $(APPLY)
[vlc-commits] contrib: libarchive: use bcrypt rather than wincrypt
vlc | branch: master | Steve Lhomme | Thu Apr 5 14:49:26 2018 +0200| [a2bbb0e0caab57f25410a92473ab1333bf128d75] | committer: Steve Lhomme contrib: libarchive: use bcrypt rather than wincrypt > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2bbb0e0caab57f25410a92473ab1333bf128d75 --- .../src/libarchive/libarchive-win32-bcrypt.patch | 145 + contrib/src/libarchive/rules.mak | 1 + 2 files changed, 146 insertions(+) diff --git a/contrib/src/libarchive/libarchive-win32-bcrypt.patch b/contrib/src/libarchive/libarchive-win32-bcrypt.patch new file mode 100644 index 00..4fb37a7073 --- /dev/null +++ b/contrib/src/libarchive/libarchive-win32-bcrypt.patch @@ -0,0 +1,145 @@ +From adea9385d6e57cdc11e073bdcf214012c261f5f6 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 27 Mar 2020 11:40:51 +0100 +Subject: [PATCH 3/4] use bcrypt rather than wincrypt + +--- + configure.ac| 4 ++-- + libarchive/archive_random.c | 26 ++ + libarchive/archive_util.c | 20 ++-- + 3 files changed, 22 insertions(+), 28 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c517b17c..7312c4d5 100644 +--- a/configure.ac b/configure.ac +@@ -295,7 +295,7 @@ AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h]) + AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h]) + AC_CHECK_HEADERS([windows.h]) + # check windows.h first; the other headers require it. +-AC_CHECK_HEADERS([wincrypt.h winioctl.h],[],[], ++AC_CHECK_HEADERS([bcrypt.h winioctl.h],[],[], + [[#ifdef HAVE_WINDOWS_H + # include + #endif +@@ -1066,7 +1066,7 @@ AC_DEFUN([CRYPTO_CHECK_WIN], [ + AC_LINK_IFELSE([AC_LANG_SOURCE([ + #define ARCHIVE_$1_COMPILE_TEST + #include +-#include ++#include + + int + main(int argc, char **argv) +diff --git a/libarchive/archive_random.c b/libarchive/archive_random.c +index 65ea6915..c39d9f54 100644 +--- a/libarchive/archive_random.c b/libarchive/archive_random.c +@@ -58,8 +58,8 @@ static void arc4random_buf(void *, size_t); + #include "archive.h" + #include "archive_random_private.h" + +-#if defined(HAVE_WINCRYPT_H) && !defined(__CYGWIN__) +-#include ++#if defined(HAVE_BCRYPT_H) && !defined(__CYGWIN__) ++#include + #endif + + #ifndef O_CLOEXEC +@@ -74,20 +74,14 @@ static void arc4random_buf(void *, size_t); + int + archive_random(void *buf, size_t nbytes) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) +- HCRYPTPROV hProv; +- BOOL success; +- +- success = CryptAcquireContext(, NULL, NULL, PROV_RSA_FULL, +- CRYPT_VERIFYCONTEXT); +- if (!success && GetLastError() == (DWORD)NTE_BAD_KEYSET) { +- success = CryptAcquireContext(, NULL, NULL, +- PROV_RSA_FULL, CRYPT_NEWKEYSET); +- } +- if (success) { +- success = CryptGenRandom(hProv, (DWORD)nbytes, (BYTE*)buf); +- CryptReleaseContext(hProv, 0); +- if (success) ++#if defined(HAVE_BCRYPT_H) && !defined(__CYGWIN__) ++ BCRYPT_ALG_HANDLE algo_handle; ++ NTSTATUS ret = BCryptOpenAlgorithmProvider(_handle, BCRYPT_RNG_ALGORITHM, ++ MS_PRIMITIVE_PROVIDER, 0); ++ if (BCRYPT_SUCCESS(ret)) { ++ ret = BCryptGenRandom(algo_handle, buf, nbytes, 0); ++ BCryptCloseAlgorithmProvider(algo_handle, 0); ++ if (BCRYPT_SUCCESS(ret)) + return ARCHIVE_OK; + } + /* TODO: Does this case really happen? */ +diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c +index 3399c0b5..38e4a839 100644 +--- a/libarchive/archive_util.c b/libarchive/archive_util.c +@@ -42,8 +42,8 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_util.c 201098 2009-12-28 02:58:1 + #ifdef HAVE_STRING_H + #include + #endif +-#if defined(HAVE_WINCRYPT_H) && !defined(__CYGWIN__) +-#include ++#if defined(HAVE_BCRYPT_H) && !defined(__CYGWIN__) ++#include + #endif + #ifdef HAVE_ZLIB_H + #include +@@ -233,14 +233,14 @@ __archive_mktemp(const char *tmpdir) + L'm', L'n', L'o', L'p', L'q', L'r', L's', L't', + L'u', L'v', L'w', L'x', L'y', L'z' + }; +- HCRYPTPROV hProv; ++ BCRYPT_ALG_HANDLE algo_handle; + struct archive_wstring temp_name; + wchar_t *ws; + DWORD attr; + wchar_t *xp, *ep; + int fd; + +- hProv = (HCRYPTPROV)NULL; ++ algo_handle = NULL; + fd = -1; + ws = NULL; + archive_string_init(_name); +@@ -302,8 +302,8 @@ __archive_mktemp(const char *tmpdir) + ep = temp_name.s + archive_strlen(_name); + xp = ep - wcslen(suffix); + +- if (!CryptAcquireContext(, NULL, NULL, PROV_RSA_FULL, +- CRYPT_VERIFYCONTEXT)) { ++ if (!BCRYPT_SUCCESS(BCryptOpenAlgorithmProvider(_handle, BCRYPT_RNG_ALGORITHM, ++ MS_PRIMITIVE_PROVIDER, 0))) { +
[vlc-commits] contrib: flac: update the winstore fixes for 1.3.3
vlc | branch: master | Steve Lhomme | Fri Apr 3 13:26:27 2020 +0200| [079eb01b962620baaa8df78efe4a01ec086f9219] | committer: Steve Lhomme contrib: flac: update the winstore fixes for 1.3.3 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=079eb01b962620baaa8df78efe4a01ec086f9219 --- contrib/src/flac/console_write.patch | 37 ++- contrib/src/flac/no-createfilea.patch | 69 ++- 2 files changed, 48 insertions(+), 58 deletions(-) diff --git a/contrib/src/flac/console_write.patch b/contrib/src/flac/console_write.patch index 8015fd4970..0a95534f10 100644 --- a/contrib/src/flac/console_write.patch +++ b/contrib/src/flac/console_write.patch @@ -1,5 +1,22 @@ flac.orig/src/share/win_utf8_io/win_utf8_io.c 2017-01-02 18:07:08.794676209 -0500 -+++ flac/src/share/win_utf8_io/win_utf8_io.c 2017-01-02 18:10:16.633867994 -0500 +From 9d6fbddfd031852f7c6d1a10aff9fa5ef690858b Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 3 Apr 2020 13:33:26 +0200 +Subject: [PATCH 1/2] Don't call Console APIs on Winstore builds + +The API's are only available on desktop builds. +https://docs.microsoft.com/en-us/windows/console/getstdhandle +https://docs.microsoft.com/en-us/windows/console/getconsolescreenbufferinfo +https://docs.microsoft.com/en-us/windows/console/writeconsole + +Instead send logs to the debug output +--- + src/share/win_utf8_io/win_utf8_io.c | 8 + 1 file changed, 8 insertions(+) + +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index bbb6a74a..1e0c1e86 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c @@ -34,6 +34,7 @@ #endif @@ -8,7 +25,7 @@ #include "share/win_utf8_io.h" #include "share/windows_unicode_filenames.h" -@@ -164,11 +165,13 @@ +@@ -182,11 +183,13 @@ size_t strlen_utf8(const char *str) int win_get_console_width(void) { int width = 80; @@ -22,23 +39,25 @@ return width; } -@@ -176,6 +179,11 @@ +@@ -194,6 +197,10 @@ int win_get_console_width(void) static int wprint_console(FILE *stream, const wchar_t *text, size_t len) { -+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + (void)stream; + OutputDebugStringW(text); -+ return len; +#else DWORD out; int ret; -@@ -202,6 +210,7 @@ +@@ -219,6 +226,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + ret = fputws(text, stream); if (ret < 0) return ret; - return len; +#endif + return len; } - int printf_utf8(const char *format, ...) +-- +2.26.0.windows.1 + diff --git a/contrib/src/flac/no-createfilea.patch b/contrib/src/flac/no-createfilea.patch index b66f96d8e8..2831b0a79b 100644 --- a/contrib/src/flac/no-createfilea.patch +++ b/contrib/src/flac/no-createfilea.patch @@ -1,59 +1,30 @@ flac-orig/src/share/win_utf8_io/win_utf8_io.c 2019-08-26 11:13:17.600801754 -0400 -+++ flac/src/share/win_utf8_io/win_utf8_io.c 2019-08-26 11:20:27.895132487 -0400 -@@ -34,8 +34,10 @@ - #endif - - #include -+#include - #include "share/win_utf8_io.h" - #include "share/windows_unicode_filenames.h" -+#include - - #define UTF8_BUFFER_SIZE 32768 - -@@ -153,7 +155,11 @@ +From 11390430fbad4a0d5a70671f922bd374defc715b Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 3 Apr 2020 13:25:14 +0200 +Subject: [PATCH 2/2] Don't call CreateFileA on Winstore builds + +The API is only available on desktop builds. +https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea +--- + src/share/win_utf8_io/win_utf8_io.c | 4 + 1 file changed, 4 insertions(+) + +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index 1e0c1e86..e634efd9 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +@@ -154,7 +154,11 @@ int get_utf8_argv(int *argc, char ***argv) HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) { if (!flac_internal_get_utf8_filenames()) { +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); +#else -+return INVALID_HANDLE_VALUE; ++ return INVALID_HANDLE_VALUE; +#endif } else { wchar_t *wname; HANDLE handle = INVALID_HANDLE_VALUE; -@@ -182,11 +188,13 @@ - int win_get_console_width(void) - { - int width = 80; -+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - CONSOLE_SCREEN_BUFFER_INFO csbi; - HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); - if(hOut
[vlc-commits] contrib: libarchive: Fix winrt build
vlc | branch: master | Steve Lhomme | Mon Apr 9 09:59:27 2018 +0200| [a4106108162d541bcdeda499755bce7c7344cf7a] | committer: Steve Lhomme contrib: libarchive: Fix winrt build don't force compilation for Windows XP don't call DebugBreak() (in debug builds) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4106108162d541bcdeda499755bce7c7344cf7a --- contrib/src/libarchive/winrt.patch | 393 ++--- 1 file changed, 238 insertions(+), 155 deletions(-) diff --git a/contrib/src/libarchive/winrt.patch b/contrib/src/libarchive/winrt.patch index 50258dfe91..ca30be82bf 100644 --- a/contrib/src/libarchive/winrt.patch +++ b/contrib/src/libarchive/winrt.patch @@ -1,68 +1,64 @@ libarchive/libarchive/archive_read_support_filter_program.c 2017-02-05 20:28:19.0 +0100 -+++ libarchive_new/libarchive/archive_read_support_filter_program.c 2017-06-26 14:58:46.35904 +0200 -@@ -82,6 +82,8 @@ - return (archive_read_support_filter_program_signature(a, cmd, NULL, 0)); - } - -+ #if !defined(_WIN32) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -+ - /* - * The bidder object stores the command and the signature to watch for. - * The 'inhibit' entry here is used to ensure that unchecked filters never -@@ -105,7 +107,7 @@ - */ - struct program_filter { - struct archive_string description; --#if defined(_WIN32) && !defined(__CYGWIN__) -+#if defined(_WIN32) && !defined(__CYGWIN__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - HANDLE child; - #else - pid_tchild; -@@ -254,7 +256,7 @@ - state->waitpid_return - = waitpid(state->child, >exit_status, 0); - } while (state->waitpid_return == -1 && errno == EINTR); --#if defined(_WIN32) && !defined(__CYGWIN__) -+#if defined(_WIN32) && !defined(__CYGWIN__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - CloseHandle(state->child); - #endif - state->child = 0; -@@ -309,7 +311,7 @@ - struct program_filter *state = self->data; - ssize_t ret, requested, avail; - const char *p; --#if defined(_WIN32) && !defined(__CYGWIN__) -+#if defined(_WIN32) && !defined(__CYGWIN__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - HANDLE handle = (HANDLE)_get_osfhandle(state->child_stdout); +From 48367c03f82ab2787fc167099f98677f2693fee3 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 27 Mar 2020 16:25:36 +0100 +Subject: [PATCH 4/4] WIP fix compilation for Universal Windows + +--- + libarchive/archive_check_magic.c | 3 ++- + libarchive/archive_entry.h | 2 +- + libarchive/archive_read_support_filter_bzip2.c | 4 + libarchive/archive_read_support_filter_grzip.c | 4 + libarchive/archive_read_support_filter_lrzip.c | 4 + libarchive/archive_read_support_filter_lz4.c | 4 + libarchive/archive_read_support_filter_lzop.c| 4 + libarchive/archive_read_support_filter_program.c | 14 +- + libarchive/archive_read_support_filter_xz.c | 12 + libarchive/archive_read_support_filter_zstd.c| 4 + libarchive/archive_read_support_format_mtree.c | 10 ++ + libarchive/archive_string.c | 2 +- + libarchive/archive_util.c| 9 - + libarchive/archive_windows.h | 6 ++ + 14 files changed, 73 insertions(+), 9 deletions(-) + +diff --git a/libarchive/archive_check_magic.c b/libarchive/archive_check_magic.c +index 288ce233..d209ed0f 100644 +--- a/libarchive/archive_check_magic.c b/libarchive/archive_check_magic.c +@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_check_magic.c 201089 2009-12-28 + #if defined(_WIN32) && !defined(__CYGWIN__) + #include + #include ++#include #endif -@@ -317,7 +319,7 @@ + #include "archive_private.h" +@@ -65,7 +66,7 @@ errmsg(const char *m) + static __LA_DEAD void + diediedie(void) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) ++#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) && !WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) + /* Cause a breakpoint exception */ + DebugBreak(); + #endif +diff --git a/libarchive/archive_entry.h b/libarchive/archive_entry.h +index 71cc6365..34da3226 100644 +--- a/libarchive/archive_entry.h b/libarchive/archive_entry.h +@@ -303,7 +303,7 @@ __LA_DECL int archive_entry_is_encrypted(struct archive_entry *); - for (;;) { - do { --#if defined(_WIN32) && !defined(__CYGWIN__) -+#if defined(_WIN32) && !defined(__CYGWIN__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - /* Avoid infinity wait. -* Note: If there is no data in the pipe, ReadFile() -* called in read() never returns and so we won't -@@ -437,7 +439,7 @@ -
[vlc-commits] modules: remove unneeded signal.h include
vlc | branch: master | Steve Lhomme | Thu Apr 30 07:08:49 2020 +0200| [4d2df8f8791e2fbe03ee8a4306fcfe64570d3d64] | committer: Steve Lhomme modules: remove unneeded signal.h include > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d2df8f8791e2fbe03ee8a4306fcfe64570d3d64 --- modules/access_output/file.c | 1 - modules/control/rc.c | 1 - 2 files changed, 2 deletions(-) diff --git a/modules/access_output/file.c b/modules/access_output/file.c index 036a0ceda6..9e7e5c2f6b 100644 --- a/modules/access_output/file.c +++ b/modules/access_output/file.c @@ -30,7 +30,6 @@ #endif #include -#include #include #include #include diff --git a/modules/control/rc.c b/modules/control/rc.c index 8f7161ecd6..c992d00066 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -30,7 +30,6 @@ #endif #include /* ENOMEM */ -#include #include #include ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: gcrypt: use bcrypt rather than wincrypt
vlc | branch: master | Steve Lhomme | Thu Apr 5 13:29:40 2018 +0200| [7f2ee886713dcebb5197033b1d127a0f4c27db75] | committer: Steve Lhomme contrib: gcrypt: use bcrypt rather than wincrypt > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f2ee886713dcebb5197033b1d127a0f4c27db75 --- contrib/src/gcrypt/winrt.patch | 245 +++-- 1 file changed, 164 insertions(+), 81 deletions(-) diff --git a/contrib/src/gcrypt/winrt.patch b/contrib/src/gcrypt/winrt.patch index fdceb26fea..c01ec2d3ba 100644 --- a/contrib/src/gcrypt/winrt.patch +++ b/contrib/src/gcrypt/winrt.patch @@ -1,91 +1,162 @@ libgcrypt/random/rndw32.c 2015-09-08 08:17:06.0 +0200 -+++ libgcrypt/random/rndw32.c.winrt2016-05-24 14:07:35.202767500 +0200 -@@ -96,8 +96,13 @@ +--- gcrypt/random/rndw32.c 2017-05-03 12:45:22.0 +0200 gcrypt/random/rndw32.c.bcrypt 2018-04-05 13:11:54.339814800 +0200 +@@ -96,8 +96,8 @@ value in a newer release. So we use a far larger value. */ #define SIZEOF_DISK_PERFORMANCE_STRUCT 256 - + +-/* We don't include wincrypt.h so define it here. */ +-#define HCRYPTPROV HANDLE +#include -+#if (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -+#include -+#else - /* We don't include wincrypt.h so define it here. */ - #define HCRYPTPROV HANDLE -+#endif - - ++#include + + /* When we query the performance counters, we allocate an initial buffer and -@@ -234,7 +239,9 @@ static NTQUERYSYSTEMINFORMATION pNtQuer +@@ -140,25 +140,13 @@ typedef DWORD (WINAPI *NTPOWERINFORMATIO + ULONG inputBufferLength, PVOID outputBuffer, ULONG outputBufferLength ); + + /* Type definitions for function pointers to call CryptoAPI functions. */ +-typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *phProv, +- LPCTSTR pszContainer, +- LPCTSTR pszProvider, +- DWORD dwProvType, +- DWORD dwFlags); +-typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen, +- BYTE *pbBuffer); +-typedef BOOL (WINAPI *CRYPTRELEASECONTEXT)(HCRYPTPROV hProv, DWORD dwFlags); +- +-/* Somewhat alternative functionality available as a direct call, for +- Windows XP and newer. This is the CryptoAPI RNG, which isn't anywhere +- near as good as the HW RNG, but we use it if it's present on the basis +- that at least it can't make things any worse. This direct access version +- is only available under Windows XP, we don't go out of our way to access +- the more general CryptoAPI one since the main purpose of using it is to +- take advantage of any possible future hardware RNGs that may be added, +- for example via TCPA devices. */ +-typedef BOOL (WINAPI *RTLGENRANDOM)(PVOID RandomBuffer, +-ULONG RandomBufferLength); ++typedef NTSTATUS (WINAPI *CRYPTOPENALGORITHMPROVIDER)(BCRYPT_ALG_HANDLE *phAlgorithm, ++ LPCWSTR pszAlgId, ++ LPCWSTR pszImplementation, ++ DWORD dwFlags); ++typedef NTSTATUS (WINAPI *CRYPTGENRANDOM)(BCRYPT_ALG_HANDLE hAlgorithm, UCHAR *pbBuffer, ++ ULONG cbBuffer, ULONG dwFlags); ++typedef BOOL (WINAPI *CRYPTCLOSEALGORITHMPROVIDER)(BCRYPT_ALG_HANDLE hAlgorithm, DWORD dwFlags); + + + +@@ -234,16 +222,17 @@ static NTQUERYSYSTEMINFORMATION pNtQuer static NTQUERYINFORMATIONPROCESS pNtQueryInformationProcess; static NTPOWERINFORMATIONpNtPowerInformation; - -+#if (WINAPI_FAMILY != WINAPI_FAMILY_PC_APP && WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) - static HANDLE hAdvAPI32; + +-static HANDLE hAdvAPI32; +-static CRYPTACQUIRECONTEXT pCryptAcquireContext; +-static CRYPTGENRANDOM pCryptGenRandom; +-static CRYPTRELEASECONTEXT pCryptReleaseContext; +-static RTLGENRANDOMpRtlGenRandom; ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++static HANDLE hBcrypt; +#endif - static CRYPTACQUIRECONTEXT pCryptAcquireContext; - static CRYPTGENRANDOM pCryptGenRandom; - static CRYPTRELEASECONTEXT pCryptReleaseContext; -@@ -259,6 +266,12 @@ init_system_rng (void) ++static CRYPTOPENALGORITHMPROVIDER pBCryptOpenAlgorithmProvider; ++static CRYPTGENRANDOM pBCryptGenRandom; ++static CRYPTCLOSEALGORITHMPROVIDER pBCryptCloseAlgorithmProvider; + + + /* Other module global variables. */ + static int system_rng_available; /* Whether a system RNG is available. */ +-static HCRYPTPROV hRNGProv; /* Handle to Intel RNG CSP. */ ++static BCRYPT_ALG_HANDLE hRNGProv; /* Handle to Intel RNG CSP. */ + + static int debug_me; /* Debug flag. */ + +@@ -259,21 +248,22 @@ init_system_rng (void) system_rng_available = 0; hRNGProv = NULL; - -+#if (WINAPI_FAMILY ==
[vlc-commits] contrib: harfbuzz: fix winstore API detection in mingw64
vlc | branch: master | Steve Lhomme | Fri Apr 3 13:10:31 2020 +0200| [2146608cc60b74dd7e61c70c2bc67dc43bcf8c91] | committer: Steve Lhomme contrib: harfbuzz: fix winstore API detection in mingw64 WINAPI_FAMILY_PC_APP and WINAPI_FAMILY_PHONE_APP are not available but it's OK. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2146608cc60b74dd7e61c70c2bc67dc43bcf8c91 --- ...3-Fix-winstore-app-detection-with-mingw64.patch | 84 ++ contrib/src/harfbuzz/rules.mak | 1 + 2 files changed, 85 insertions(+) diff --git a/contrib/src/harfbuzz/0003-Fix-winstore-app-detection-with-mingw64.patch b/contrib/src/harfbuzz/0003-Fix-winstore-app-detection-with-mingw64.patch new file mode 100644 index 00..3550dd0072 --- /dev/null +++ b/contrib/src/harfbuzz/0003-Fix-winstore-app-detection-with-mingw64.patch @@ -0,0 +1,84 @@ +From 6b1c0cb9a88424f4d1af769067acf1f6fea66ece Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 3 Apr 2020 13:05:14 +0200 +Subject: [PATCH 3/3] Fix winstore app detection with mingw64 + +mingw64 doesn't have WINAPI_FAMILY_PC_APP and WINAPI_FAMILY_PHONE_APP but the +same detection can be achieved by testing WINAPI_PARTITION_DESKTOP. +--- + src/hb-blob.cc | 6 +++--- + src/hb-mutex.hh | 2 +- + src/hb.hh | 5 +++-- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/hb-blob.cc b/src/hb-blob.cc +index 2e72683c..609b87d8 100644 +--- a/src/hb-blob.cc b/src/hb-blob.cc +@@ -581,7 +581,7 @@ fail_without_close: + wchar_t * wchar_file_name = (wchar_t *) malloc (sizeof (wchar_t) * size); + if (unlikely (wchar_file_name == nullptr)) goto fail_without_close; + mbstowcs (wchar_file_name, file_name, size); +-#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) ++#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + { + CREATEFILE2_EXTENDED_PARAMETERS ceparams = { 0 }; + ceparams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); +@@ -602,7 +602,7 @@ fail_without_close: + + if (unlikely (fd == INVALID_HANDLE_VALUE)) goto fail_without_close; + +-#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) ++#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + { + LARGE_INTEGER length; + GetFileSizeEx (fd, ); +@@ -615,7 +615,7 @@ fail_without_close: + #endif + if (unlikely (file->mapping == nullptr)) goto fail; + +-#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) ++#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + file->contents = (char *) MapViewOfFileFromApp (file->mapping, FILE_MAP_READ, 0, 0); + #else + file->contents = (char *) MapViewOfFile (file->mapping, FILE_MAP_READ, 0, 0, 0); +diff --git a/src/hb-mutex.hh b/src/hb-mutex.hh +index e7f8b1c4..f48d6b29 100644 +--- a/src/hb-mutex.hh b/src/hb-mutex.hh +@@ -64,7 +64,7 @@ typedef pthread_mutex_t hb_mutex_impl_t; + #include + typedef CRITICAL_SECTION hb_mutex_impl_t; + #define HB_MUTEX_IMPL_INIT{0} +-#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) + #define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0) + #else + #define hb_mutex_impl_init(M) InitializeCriticalSection (M) +diff --git a/src/hb.hh b/src/hb.hh +index fcbd3305..492b9848 100644 +--- a/src/hb.hh b/src/hb.hh +@@ -334,8 +334,9 @@ extern "C" void hb_free_impl(void *ptr); + # if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 + #undef _WIN32_WINNT + # endif ++# include + # ifndef _WIN32_WINNT +-#if !defined(WINAPI_FAMILY) || !(WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + # define _WIN32_WINNT 0x0600 + #endif + # endif +@@ -356,7 +357,7 @@ extern "C" void hb_free_impl(void *ptr); + # define HB_NO_SETLOCALE + # define HB_NO_ERRNO + #endif +-# elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) ++# elif !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + #ifndef HB_NO_GETENV + # define HB_NO_GETENV + #endif +-- +2.26.0.windows.1 + diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak index 9f8b01f837..eb140ea4dd 100644 --- a/contrib/src/harfbuzz/rules.mak +++ b/contrib/src/harfbuzz/rules.mak @@ -16,6 +16,7 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz .sum-harfbuzz $(UNPACK) $(APPLY) $(SRC)/harfbuzz/0001-fix-OSAtomic-calls-for-AArch64.patch $(APPLY) $(SRC)/harfbuzz/0002-Update-the-bundled-ax_pthread.m4.patch + $(APPLY) $(SRC)/harfbuzz/0003-Fix-winstore-app-detection-with-mingw64.patch $(MOVE) DEPS_harfbuzz = freetype2 $(DEPS_freetype2) ___
[vlc-commits] contrib: libarchive: don't force the Windows version to target
vlc | branch: master | Steve Lhomme | Thu Apr 2 15:37:54 2020 +0200| [497622119be27f2972ae7d0541a9f11ea56c1e01] | committer: Steve Lhomme contrib: libarchive: don't force the Windows version to target We may want to build for Win10/UWP via the command-line. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=497622119be27f2972ae7d0541a9f11ea56c1e01 --- ...-windows-versions-if-they-are-set-in-the-.patch | 44 ++ contrib/src/libarchive/rules.mak | 1 + 2 files changed, 45 insertions(+) diff --git a/contrib/src/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch b/contrib/src/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch new file mode 100644 index 00..37af69a79a --- /dev/null +++ b/contrib/src/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch @@ -0,0 +1,44 @@ +From a4fa6bef8bdb141d629d79d8d1f3e67448bd67e1 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Thu, 2 Apr 2020 15:33:40 +0200 +Subject: [PATCH 5/5] don't force windows versions if they are set in the + environment + +--- + configure.ac | 20 +--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7312c4d5..05ca4955 100644 +--- a/configure.ac b/configure.ac +@@ -244,9 +244,23 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ]) + # Set up defines needed before including any headers + case $host in + *mingw* | *cygwin* | *msys* ) +- AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) +- AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) +- AC_DEFINE([NTDDI_VERSION], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) ++ AC_PREPROC_IFELSE([AC_LANG_PROGRAM( ++[[#ifdef _WIN32_WINNT ++ # error _WIN32_WINNT already defined ++ #endif ++]],[[;]]) ++ ],[ ++AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) ++AC_DEFINE([NTDDI_VERSION], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) ++ ]) ++ AC_PREPROC_IFELSE([AC_LANG_PROGRAM( ++[[#ifdef WINVER ++ # error WINVER already defined ++ #endif ++]],[[;]]) ++ ],[ ++AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) ++ ]) + ;; + esac + +-- +2.26.0.windows.1 + diff --git a/contrib/src/libarchive/rules.mak b/contrib/src/libarchive/rules.mak index 34f9fc2ba0..1677987721 100644 --- a/contrib/src/libarchive/rules.mak +++ b/contrib/src/libarchive/rules.mak @@ -35,6 +35,7 @@ ifdef HAVE_WINSTORE $(APPLY) $(SRC)/libarchive/winrt.patch endif $(APPLY) $(SRC)/libarchive/fix-types.patch + $(APPLY) $(SRC)/libarchive/0005-don-t-force-windows-versions-if-they-are-set-in-the-.patch $(call pkg_static,"build/pkgconfig/libarchive.pc.in") $(MOVE) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: libarchive: use the proper define for the internal mode_t
vlc | branch: master | Steve Lhomme | Fri Mar 27 16:33:33 2020 +0100| [adc9535f9c2200f3a9a59def29036892db7f725e] | committer: Steve Lhomme contrib: libarchive: use the proper define for the internal mode_t > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=adc9535f9c2200f3a9a59def29036892db7f725e --- contrib/src/libarchive/fix-types.patch | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/contrib/src/libarchive/fix-types.patch b/contrib/src/libarchive/fix-types.patch index 3285058337..14c3216e13 100644 --- a/contrib/src/libarchive/fix-types.patch +++ b/contrib/src/libarchive/fix-types.patch @@ -1,6 +1,17 @@ libarchive/libarchive/archive_entry.c 2017-07-18 15:27:58.259298500 +0200 -+++ libarchive/libarchive/archive_entry.c.types2017-07-18 15:21:43.800236200 +0200 -@@ -348,7 +348,7 @@ archive_entry_devminor(struct archive_en +From 93a8b303904e40261ac58fbd95eb338d6b9cb1df Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 27 Mar 2020 16:26:07 +0100 +Subject: [PATCH 2/4] archive_entry: use the proper define for mode_t + +--- + libarchive/archive_entry.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libarchive/archive_entry.c b/libarchive/archive_entry.c +index 72c644e6..7afec1b1 100644 +--- a/libarchive/archive_entry.c b/libarchive/archive_entry.c +@@ -353,7 +353,7 @@ archive_entry_devminor(struct archive_entry *entry) return minor(entry->ae_stat.aest_dev); } @@ -9,7 +20,7 @@ archive_entry_filetype(struct archive_entry *entry) { return (AE_IFMT & entry->acl.mode); -@@ -520,7 +520,7 @@ archive_entry_ino64(struct archive_entry +@@ -525,7 +525,7 @@ archive_entry_ino64(struct archive_entry *entry) return (entry->ae_stat.aest_ino); } @@ -18,7 +29,7 @@ archive_entry_mode(struct archive_entry *entry) { return (entry->acl.mode); -@@ -593,7 +593,7 @@ _archive_entry_pathname_l(struct archive +@@ -598,7 +598,7 @@ _archive_entry_pathname_l(struct archive_entry *entry, return (archive_mstring_get_mbs_l(>ae_pathname, p, len, sc)); } @@ -27,3 +38,6 @@ archive_entry_perm(struct archive_entry *entry) { return (~AE_IFMT & entry->acl.mode); +-- +2.26.0.windows.1 + ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: gcrypt: fix getpid usage in winstore builds
vlc | branch: master | Steve Lhomme | Thu Apr 30 15:17:43 2020 +0200| [bc123afaba142bc07617a35ee31ab679a933e75a] | committer: Steve Lhomme contrib: gcrypt: fix getpid usage in winstore builds > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc123afaba142bc07617a35ee31ab679a933e75a --- ...ide-a-getpid-replacement-that-works-on-Wi.patch | 30 ++ contrib/src/gcrypt/rules.mak | 1 + 2 files changed, 31 insertions(+) diff --git a/contrib/src/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch b/contrib/src/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch new file mode 100644 index 00..fd19010a54 --- /dev/null +++ b/contrib/src/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch @@ -0,0 +1,30 @@ +From 838958b93cea04466bb4d745e62b54f9dad595b6 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Thu, 30 Apr 2020 15:15:51 +0200 +Subject: [PATCH] compat: provide a getpid replacement that works on Windows + XP+ + +GetCurrentProcessId() is available since Windows XP + +getpid() is not allowed in UCRT builds. +https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps +--- + compat/getpid.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/compat/getpid.c b/compat/getpid.c +index 032387c3..eb0a4899 100644 +--- a/compat/getpid.c b/compat/getpid.c +@@ -14,7 +14,7 @@ + #include + #endif + +-#ifdef HAVE_W32CE_SYSTEM ++#ifdef _WIN32 + #include + #include + +-- +2.26.0.windows.1 + diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak index a92790fe7f..625ff30d71 100644 --- a/contrib/src/gcrypt/rules.mak +++ b/contrib/src/gcrypt/rules.mak @@ -18,6 +18,7 @@ gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt $(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch $(APPLY) $(SRC)/gcrypt/0001-random-Don-t-assume-that-_WIN64-implies-x86_64.patch $(APPLY) $(SRC)/gcrypt/0002-aarch64-mpi-Fix-building-the-mpi-aarch64-assembly-fo.patch + $(APPLY) $(SRC)/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch ifdef HAVE_WINSTORE $(APPLY) $(SRC)/gcrypt/winrt.patch endif ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: libarchive: fix winrt patches
vlc | branch: master | Steve Lhomme | Thu Apr 2 14:58:53 2020 +0200| [d3b67e26cc40e787693f7353d6504a9a2b199f4f] | committer: Steve Lhomme contrib: libarchive: fix winrt patches > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3b67e26cc40e787693f7353d6504a9a2b199f4f --- contrib/src/libarchive/no-windows-files.patch | 11 --- 1 file changed, 11 deletions(-) diff --git a/contrib/src/libarchive/no-windows-files.patch b/contrib/src/libarchive/no-windows-files.patch index e5300aaef0..aa6ec78536 100644 --- a/contrib/src/libarchive/no-windows-files.patch +++ b/contrib/src/libarchive/no-windows-files.patch @@ -8,14 +8,3 @@ AM_CONDITIONAL([INC_WINDOWS_FILES], [test $inc_windows_files = yes]) AM_CONDITIONAL([INC_CYGWIN_FILES], [test $inc_cygwin_files = yes]) libarchive/libarchive/archive_entry.h.old 2017-06-06 16:19:37.998058703 +0200 -+++ libarchive/libarchive/archive_entry.h 2017-06-06 16:19:41.830066940 +0200 -@@ -294,7 +294,7 @@ - - __LA_DECL voidarchive_entry_set_atime(struct archive_entry *, time_t, long); - __LA_DECL void archive_entry_unset_atime(struct archive_entry *); --#if defined(_WIN32) && !defined(__CYGWIN__) -+#if defined(_WIN32) && !defined(__CYGWIN__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - __LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, BY_HANDLE_FILE_INFORMATION *); - #endif - __LA_DECL voidarchive_entry_set_birthtime(struct archive_entry *, time_t, long); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] update: do not launch the downloaded exe in Winstore builds
vlc | branch: master | Steve Lhomme | Thu Apr 9 11:55:16 2020 +0200| [0bb6e050d43bc862a3cdda908ac57e237598be03] | committer: Steve Lhomme update: do not launch the downloaded exe in Winstore builds The API is forbidden. It could be done with this winrt API: https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-the-default-app-for-a-file > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bb6e050d43bc862a3cdda908ac57e237598be03 --- src/misc/update.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/misc/update.c b/src/misc/update.c index ac1a565bb0..a4c9349153 100644 --- a/src/misc/update.c +++ b/src/misc/update.c @@ -725,9 +725,11 @@ static void* update_DownloadReal( void *obj ) psz_msg ); if(answer == 1) { +#ifndef VLC_WINSTORE_APP wchar_t psz_wdestfile[MAX_PATH]; MultiByteToWideChar( CP_UTF8, 0, psz_destfile, -1, psz_wdestfile, MAX_PATH ); answer = (int)ShellExecuteW( NULL, L"open", psz_wdestfile, NULL, NULL, SW_SHOW); +#endif if(answer > 32) libvlc_Quit(vlc_object_instance(p_udt)); } ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits