網頁

2016年1月29日 星期五

unix shell command

for i in `find .. -name '*.c' -print`
> do
> echo $i
> grep "vlm_ExecuteCommand" $i
> if [ ${?} == "0" ]
> then
> read -p $i any
> fi
> done

aaa.sh >a.out 2>&1

tail -f a.out

常用 vi 命令
移動游標 h, j, k, l
輸入 i, a
連接兩行 J
刪除 dd
拷貝 yy
貼上 p
紀錄位置 ma
跳到先前紀錄的位置 `a
暫時跳到 :!sh
不存檔離開 :q!
存檔離開 :wq
自動加入內縮:set ai
取消自動加入內縮:set noai

使用UTF-8編碼,且有 BOM
~/.vimrc
set bomb
set fileencoding=utf-8

VLC CLI snapshot command 程式追蹤

share/lua/modules/common.lua
function snapshot()
    local vout = vlc.object.vout()
    if not vout then return end
    vlc.var.set(vout,"video-snapshot",nil)
end

以下是啟動時建立物件
modules/lua/intf.c
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
-> luaopen_object( L );
-> luaopen_vlm( L );

modules/lua/libs/objects.c
static const luaL_Reg vlclua_object_reg[] = {
    { "input", vlclua_get_input },
    { "playlist", vlclua_get_playlist },
    { "libvlc", vlclua_get_libvlc },
    { "find", vlclua_object_find },
    { "vout", vlclua_get_vout},
    { "aout", vlclua_get_aout},
    { NULL, NULL }
};
void luaopen_object( lua_State *L )
{
    lua_newtable( L );
    luaL_register( L, NULL, vlclua_object_reg );
    lua_setfield( L, -2, "object" );
}

src/video_output/video_output.c
vout_thread_t *vout_Request(vlc_object_t *object, const vout_configuration_t *cfg)
-> VoutCreate(object, cfg);
static vout_thread_t *VoutCreate(vlc_object_t *object, const vout_configuration_t *cfg)
-> vout_IntfInit(vout);
在此宣告出 SnapshotCallback
void vout_IntfInit( vout_thread_t *p_vout )
-> var_Create( p_vout, "video-snapshot", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
-> var_Change( p_vout, "video-snapshot", VLC_VAR_SETTEXT, &text, NULL );
-> var_AddCallback( p_vout, "video-snapshot", SnapshotCallback, NULL );

以下是執行 snapshot 命令
./modules/lua/libs/variables.c
{ "trigger_callback", vlclua_trigger_callback },
{ "set", vlclua_var_set },
static int vlclua_var_set( lua_State *L )
-> var_Set( *pp_obj, psz_var, val );
static int vlclua_trigger_callback( lua_State *L )
-> var_TriggerCallback( *pp_obj, psz_var );

很多地方都使用 var_TriggerCallback 執行 snapshot
./lib/video.c
-> var_TriggerCallback( p_vout, "video-snapshot" );
./modules/control/oldrc.c
-> psz_variable = "video-snapshot";
-> var_TriggerCallback( p_vout, psz_variable );
./modules/control/hotkeys.c
-> case ACTIONID_SNAPSHOT:
-> var_TriggerCallback( p_vout, "video-snapshot" );

./src/misc/variables.c
var_TriggerCallback -> TriggerCallback
var_Set -> var_SetChecked -> TriggerCallback

src/video_output/vout_intf.c
static int SnapshotCallback( vlc_object_t *p_this, char const *psz_cmd, vlc_value_t oldval, vlc_value_t newval, void *p_data )
SnapshotCallback -> VoutSaveSnapshot -> vout_snapshot_SaveImage
SnapshotCallback -> VoutSaveSnapshot -> VoutOsdSnapshot
msg_Dbg( p_vout, "snapshot taken (%s)", psz_filename );


VLC 之 VLM command 追蹤

share/lua/intf/cli.lua
function client_command( client )
-> call_command(cmd,client,arg) 呼叫 CLI commands
-> call_vlm_command(cmd,client,arg) 呼叫 VLM command
function call_vlm_command(cmd,client,arg)
-> vlm:execute_command( cmd )

modules/lua/intf.c
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
-> luaopen_vlm( L );

modules/lua/libs/vlm.c
static const luaL_Reg vlclua_vlm_reg[] = {
    { "execute_command", vlclua_vlm_execute_command },
    { NULL, NULL }
};
void luaopen_vlm( lua_State *L )
{
    lua_pushcfunction( L, vlclua_vlm_new );
    lua_setfield( L, -2, "vlm" );
}
static int vlclua_vlm_new( lua_State *L )
-> luaL_register( L, NULL, vlclua_vlm_reg );
static int vlclua_vlm_execute_command( lua_State *L )
-> i_ret = vlm_ExecuteCommand( *pp_vlm, psz_command, &message );

src/input/vlm.c
int vlm_ExecuteCommand( vlm_t *p_vlm, const char *psz_command, vlm_message_t **pp_message)
-> i_result = ExecuteCommand( p_vlm, psz_command, pp_message );

src/input/vlmshell.c
int ExecuteCommand( vlm_t *p_vlm, const char *psz_command, vlm_message_t **pp_message )
del -> ExecuteDel
show -> ExecuteShow
help -> ExecuteHelp
control -> ExecuteControl
save -> ExecuteSave
export -> ExecuteExport
load -> ExecuteLoad
new -> ExecuteNew
setup -> ExecuteSetup
static int ExecuteControl( vlm_t *p_vlm, const char *psz_name, const int i_arg, char ** ppsz_arg, vlm_message_t **pp_status )
play -> vlm_ControlInternal
stop -> vlm_ControlInternal
pause -> vlm_ControlInternal
seek -> vlm_ControlInternal



VLC 之 lua 程式除錯追蹤

vlc.msg.dbg("debug message")
vlc.msg.err("error message")

modules/lua/intf.c
static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
-> luaopen_msg( L );

modules/lua/libs/messages.c
static const luaL_Reg vlclua_msg_reg[] = {
    { "dbg", vlclua_msg_dbg },
    { "warn", vlclua_msg_warn },
    { "err", vlclua_msg_err },
    { "info", vlclua_msg_info },
    { NULL, NULL }
};
void luaopen_msg( lua_State *L )
{
    lua_newtable( L );
    luaL_register( L, NULL, vlclua_msg_reg );
    lua_setfield( L, -2, "msg" );
}
static int vlclua_msg_err( lua_State *L )
{
    int i_top = lua_gettop( L );
    vlc_object_t *p_this = vlclua_get_this( L );
    int i;
    for( i = 1; i <= i_top; i++ )
        msg_Err( p_this, "%s", luaL_checkstring( L, i ) );
    return 0;
}

主要除錯資料輸出
vlc_object_t *p_this = vlclua_get_this( L );
msg_Err( p_this, "error message");

2016年1月27日 星期三

VLC command

vlc.exe --help
vlc.exe --intf="telnet"
vlc.exe --intf="http"
vlc.exe --intf="dummy"

除圖形介面外,額外使用 telnet 介面
vlc.exe --extraintf="telnet"

產生訊息
-vvv

產生訊息於檔案
--verbose=2 --file-logging --logfile=vlc-log.txt

網路 caching 5秒
--network-caching=5000

vlc.exe --intf="telnet" --telnet-host="0.0.0.0" --telnet-port="4212" --telnet-password="1234" --verbose=2 --file-logging --logfile=vlc-log.txt

vlc.exe --extraintf="http" --http-host="127.0.0.1:9090"

使用本機的 webcam
vlc.exe -vvv dshow:// --dshow-vdev="Integrated Camera"

螢幕錄影
vlc.exe screen:// --screen-fps=24 --screen-follow-mouse --screen-mouse-image="Mouse_pointer_small.png" --sout "#transcode{vcodec=h264,venc=x264{scenecut=100,bframes=0,keyint=10},vb=1024,scale=1,vfilter=croppadd{cropleft=0,croptop=0,cropright=0,cropbottom=0}}:duplicate{dst=std{access=file,mux=mp4,dst="R:\Temp\aaa.mp4"}}"

不顯示影像
vlc.exe rtsp://169.254.1.168:554/live2.sdp --sout "#duplicate{dst=display,select='novideo'}" --verbose=2 --file-logging --logfile=vlc-log.txt

不顯示控制介面,使用telnet控制,並且延遲5秒
vlc.exe rtsp://169.254.1.168:554/live2.sdp --network-caching=5000 --vout dummy --intf telnet --telnet-host="0.0.0.0" --telnet-port="4212" --telnet-password="1234" --verbose=2 --file-logging --logfile=vlc-log.txt

顯示時間
vlc.exe rtsp://169.254.1.168:554/live2.sdp --sub-source "marq{marquee=%Y/%m/%d %H:%M:%S,x=10,y=50}"
vlc.exe rtsp://169.254.1.168:554/live2.sdp --sub-filter "marq{marquee=%Y/%m/%d %H:%M:%S,position=6}"

vlc.exe rtsp://169.254.1.168:554/live2.sdp --sout file/avi:"R:\temp\aaa.avi"
vlc.exe rtsp://169.254.1.168:554/live2.sdp --sout="#std{access=file,mux=avi,dst='R:\temp\aaa.avi'}"
vlc.exe rtsp://169.254.1.168:554/live2.sdp --intf dummy --sout file/avi:"R:\temp\aaa.avi"
vlc.exe rtsp://169.254.1.168:554/live2.sdp --snapshot-path="R:\temp" --snapshot-prefix="aaa" --snapshot-format=jpg --intf="telnet" --telnet-host="0.0.0.0" --telnet-port="4212" --telnet-password="1234" --sout file/avi:"R:\temp\aaa.avi" -vvv --file-logging --logfile=vlc-log.txt

VLC 設定檔

C:\Users\UserName\AppData\Roaming\vlc\vlcrc


new ch1 broadcast enabled
setup ch1 input screen:// :screen-fps=24 :screen-follow-mouse 
setup ch1 input rtsp://169.254.1.168:554/live2.sdp
setup ch1 output #file{mux=ps,dst='R:\temp\aaa.ps'}
setup ch1 output #file{mux=avi,dst='R:\temp\aaa.avi'}
control ch1 play
snapshot
control ch1 stop

shutdown

人力發電機 & 電表

  • 手搖充電器

材料使用吸管,磁鐵,漆包線,二極體

  • 轉動充電器




材料使用無刷馬達,二極體,3D列印轉軸


  • 充電&LED燈

材料使用鎳氫電池, HT7733A電壓轉換


  • 功率電表&電壓電流分配器



  • 手搖充電器 測試

測試結果:450mJ-分,平均5mA
推測 2700mA-1.2V 鎳氫電池,約430小時充飽

  • 轉動充電器 測試

測試結果:50J-分,平均450mA
推測 2700mA-1.2V 鎳氫電池,約4小時充飽

PowerMeter

電壓表
SW 電壓 分壓電阻 放大倍數 放大阻值
0



1 200V (100k)+900k+9M *1
2 20V (100k+900k)+9M *1
3 2V 100k+900k+9M *1
4 200mV 100k+900k+9M *10 11k
5 20mV 100k+900k+9M *100 1.02k

電流表
SW 電流 串聯電阻 放大倍數 放大阻值
0



1 10A 0.05ohm/5W *5 24.9k
2 1A(0.5) 0.1ohm/0.5W *20 5.23k
3 200mA 1ohm *10 11k
4 20mA 10ohm *10 11k
5 2mA 10ohm *100 1.02k

LCD1602
工作電壓:4.5~5.5V
PIC16F877 0V 5V 10kVR D1(p20) D3(p22) D2(p21)



D4(p27) D5(p28) D6(p29) D7(p30) 5V+10ohm 0V
LCD1602 VSS(p1) VDD(p2) VL(p3) RS(p4) R/W(p5) E(p6) D0(p7) D1(p8) D2(p9) D3(p10) D4(p11) D5(p12) D6(p13) D7(p14) BLA(p15) BLK(p16)

A2D
AN0 AN1 AN2 Vref AN4
p2 p3 p4 p5 p7

A2D選擇判斷
AN0 B2(p35) B1(p34) B0(p33)
AN1 B5(p38) B4(p37) B3(p36)
AN2 C2(p17) C1(p16) C0(p15)
AN4 E2(p10) E1(p9) E0(p8)

其他
Tx(p25) Rs232
Rx(p26) Rs232
C3(p18) LED
C4(p23) 累積
C5(p24) 清除

電源
5V: 6.6-(0.83*2)=4.93
TL431: (6.6-2.57)/1k=3.85mA

TL431
Vout = (R1+R2)*2.5/R2
1mA < (Vcc-Vout)/R3 < 500mA

Rsup R1 R2
5V 220 27.4k 27.4k
2.5V 1k 0ohm 0ohm



不論 PIC16F877 或 PIC16F877A 在使用 20MHz 時,
A/D 模組不能使用 Vref`,其轉換結果會失去2-3位的精確度,
b2, b1, b0 皆為零。

AD623
R-C濾波器-3dB時的截止頻率
1/(6.28*R*C) = f
R1=R2=330k C1=C2=0.022uF f=21.9
R1+R2=660k C3=1uF f=0.2

每個輸入與接地線之間加入高量的電阻,可以提供必要的偏壓電流回流路徑。
Ground Returns for Input Bias Currents
訊號接地電阻22M
未接22M
接上22M,或以示波器連接AD623的地和代測訊號

未接去耦電容

接上去耦電容

過多的去耦電容似乎沒有用



MAX232 會造成電源不穩定,使用磁珠隔離可以有效抑制,
但最後發現,MAX232相關電路的地和電源,分別連結後,
再與系統的地和電源連結,效果比磁珠好
電源不穩定 Pk-Pk 90-120mV,常有突波 160mV
 電路整理後 Pk-Pk 40-70mV,但偶而還是有突波 120mV

2016年1月26日 星期二

二 VideoLAN Compile 完成篇

成功的媽媽有好幾個!
媽媽教的智慧可不能忘!

進入 BIOS 在 Security/Virtualization 開啟 VT-x
download ubuntu-15.04-desktop-amd64.iso
使用 VMware 開啟 iso 檔
使用 Firefox 確認可以上網
點選左上角 Search your computer and online sources
填入 terminal,點選 Terminal
點選右上角的齒輪,選擇 Shutdown
sudo passwd root
先輸入自己密碼,再輸入 root 密碼
su - root

git clone https://github.com/videolan/vlc.git vlc

For the 64-bit version Mingw-w64
apt-get install gcc-mingw-w64-x86-64
apt-get install g++-mingw-w64-x86-64
apt-get install mingw-w64-tools
For the 32-bit version Mingw-w64
apt-get install gcc-mingw-w64-i686
apt-get install g++-mingw-w64-i686
apt-get install mingw-w64-tools

apt-get install lua5.2
apt-get install libtool
apt-get install automake
apt-get install autoconf
apt-get install autopoint
apt-get install gettext

apt-get install pkg-config
apt-get install qt4-dev-tools
apt-get install qt5-default
apt-get install subversion
apt-get install cmake
apt-get install cvs
apt-get install wine-dev
apt-get install zip
apt-get install bzip2
apt-get install p7zip-full
apt-get install nsis
apt-get install yasm
apt-get install ragel
apt-get install ant
apt-get install default-jdk
apt-get install protobuf-compiler

  • i686-w64-mingw32 for Windows 32-bits, using the Mingw-w64 toolchain
  • x86_64-w64-mingw32 for Windows 64-bits, using the Mingw-w64 toolchain
cd /root/vlc
mkdir -p contrib/win32
cd contrib/win32
../bootstrap --host=i686-w64-mingw32
../bootstrap --host=x86_64-w64-mingw32
make prebuilt
或者使用下列命令,但是失敗了
make fetch
make

cd /root/vlc
./bootstrap
mkdir win32 && cd win32

../extras/package/win32/configure.sh --host=i686-w64-mingw32
../extras/package/win32/configure.sh --host=x86_64-w64-mingw32

make package-win32-zip
產生 /root/vlc/win32/vlc-3.0.0-git-win64.zip
make package-win32-exe
產生 /root/vlc/win32/vlc-3.0.0-git-win64.exe
雖然可以安裝,但是不能執行

使用
vlc/share/lua/intf/telnet.lua
vlc/share/lua/intf/cli.lua
vlc/share/lua/intf/modules/host.lua
vlc/share/lua/modules/common.lua
原始檔,覆蓋下列被編譯過的 Object 檔
lua/intf/telnet.luac
lua/intf/cli.luac
lua/intf/modules/host.luac
lua/modules/common.luac
因為在 modules/lua/vlc.c 中的 luaL_dofile 無法使用 Object 檔
至於錯誤的原因是什麼?是個謎!
幸好 luaL_dofile 可以使用原始檔


    一 VideoLAN Compile 失敗篇

    進入 BIOS 在 Security/Virtualization 開啟 VT-x
    download
    ubuntu-14.04.3-desktop-i386.iso
    ubuntu-14.04.3-desktop-amd64.iso
    ubuntu-15.04-desktop-amd64.iso
    使用 VMware 開啟 iso 檔
    使用 Firefox 確認可以上網
    點選左上角 Search your computer and online sources
    填入 terminal,點選 Terminal
    點選右上角的齒輪,選擇 Shutdown
    sudo passwd root
    先輸入自己密碼,再輸入 root 密碼
    su - root

    root@ubuntu:~/vlc/win32# for i in `find . -name 'Makefile*' -print`
    > do
    > echo $i
    > grep LTLIBgme $i
    > done

    apt-get install git
    git clone https://github.com/videolan/vlc.git vlc
    或直接下載 http://www.videolan.org/vlc/download-sources.html

    ftp://ftp.videolan.org/pub/videolan/contrib/

    For the 64-bit version Mingw-w64
    apt-get install gcc-mingw-w64-x86-64
    apt-get install g++-mingw-w64-x86-64
    apt-get install mingw-w64-tools
    For the 32-bit version Mingw-w64
    apt-get install gcc-mingw-w64-i686
    apt-get install g++-mingw-w64-i686
    apt-get install mingw-w64-tools

    dpkg -l
    apt-cache showpkg gcc-mingw-w64-i686
    sudo apt-cache madison ^gcc-mingw-w64

    apt-get install lua5.2
    apt-get install libtool
    apt-get install automake
    apt-get install autoconf
    apt-get install autopoint
    apt-get install gettext

    apt-get install pkg-config
    apt-get install qt4-dev-tools
    apt-get install qt5-default
    apt-get install subversion
    apt-get install cmake
    apt-get install cvs
    apt-get install wine-dev
    apt-get install zip
    apt-get install bzip2
    apt-get install p7zip-full
    apt-get install nsis
    • i686-w64-mingw32 for Windows 32-bits, using the Mingw-w64 toolchain
    • x86_64-w64-mingw32 for Windows 64-bits, using the Mingw-w64 toolchain
    編輯 /usr/bin/x86_64-w64-mingw32-pkg-config 內容
    編輯 /usr/bin/i686-w64-mingw32-pkg-config 內容
    PKG_CONFIG_LIBDIR=/usr/lib/${triplet}/pkgconfig:/usr/${triplet}/lib/pkgconfig pkg-config $@
    改成
    if [ -n "$PKG_CONFIG_LIBDIR" ]; then
    EXISTING=":$PKG_CONFIG_LIBDIR"
    fi
    PKG_CONFIG_LIBDIR=/usr/lib/${triplet}/pkgconfig:/usr/${triplet}/lib/pkgconfig${EXISTING} pkg-config $@
    並注意此檔連結到 /usr/share/pkg-config-crosswrapper
    cd /root/vlc
    mkdir -p contrib/win32
    cd contrib/win32
    ../bootstrap --host=i686-w64-mingw32
    ../bootstrap --host=x86_64-w64-mingw32
    make prebuilt

    rm -f ../i686-w64-mingw32/bin/moc ../i686-w64-mingw32/bin/uic ../i686-w64-mingw32/bin/rcc

    cd /root/vlc
    ./bootstrap
    mkdir win32 && cd win32

    export PKG_CONFIG_LIBDIR=$HOME/vlc/contrib/i686-w64-mingw32/lib/pkgconfig
    ../extras/package/win32/configure.sh --host=i686-w64-mingw32 --disable-taglib --disable-x265
    export PKG_CONFIG_LIBDIR=$HOME/vlc/contrib/x86_64-w64-mingw32/lib/pkgconfig
    ../extras/package/win32/configure.sh --host=x86_64-w64-mingw32 --disable-taglib --disable-x265 --disable-skins2

    export LIBVLC_CFLAGS="-I/root/vlc/win32/_win32/include"
    export LIBVLC_LIBS="-L/root/vlc/win32/lib -lvlc"
    make package-win32-7zip
    產生 /root/vlc/win32/vlc-3.0.0-git-win64.7z
    make package-win32-zip
    產生 /root/vlc/win32/vlc-3.0.0-git-win64.zip
    make package-win32-exe
    產生 /root/vlc/win32/vlc-3.0.0-git-win64.exe

    vi /root/vlc/win32/modules/Makefile
    #LTLIBgme = libgme_plugin.la
    #LTLIBsid = libsid_plugin.la
    #LTLIBmkv = libmkv_plugin.la
    #LTLIBtaglib = libtaglib_plugin.la

    vi /root/vlc/win32/modules/misc/Makefile
    #LTLIBgnutls = libgnutls_plugin.la
    vi /root/vlc/win32/modules/visualization/Makefile
    #LTLIBprojectm = libprojectm_plugin.la
    vi /root/vlc/win32/modules/stream_out/Makefile
    #LTLIBstream_out_chromaprint = libstream_out_chromaprint_plugin.la

    vi /root/vlc/win32/Makefile
    修改
    git clone git://git.videolan.org/npapi-vlc.git npapi-vlc ;
    成為

    出現如下錯誤
    i686-w64-mingw32-strip /root/vlc-2.2.1/win32/vlc-2.2.1/NSIS/UAC.dll
    make: *** No rule to make target `extras/package/win32/NSIS/nsProcess/nsProcess.c', needed by `/root/vlc-2.2.1/win32/vlc-2.2.1/NSIS/nsProcess.dll'.  Stop.
    使用 vlc-3.0.0/extras/package/win32/NSIS 下的檔案 替換 vlc-2.2.1

    出現如下錯誤
    !include: closed: "languages/welsh.nsh"
    Goto: EndLanguageCmp
    !include: could not find: "languages\albanian.nsh"
    Error in script "/root/vlc-2.2.1/win32/vlc-2.2.1/vlc.win32.nsi" on line 690 -- aborting creation process
    make: *** [package-win32-exe] Error 1

    編輯 /root/vlc-2.2.1/win32/extras/package/win32/NSIS/vlc.win32.nsi
    註解掉不支持的語系


    不論是用 32/64 位元的 ubuntu,其操作過程和結果似乎一致。

    直接 git clone https://github.com/videolan/vlc.git vlc 下來的版本
    從 make 完成產生的檔名看出,是3.0.0

    vlc-3.0.0-git-win64.exe 無法安裝,即使使用以系統管理員執行
    vlc-3.0.0-git-win64.zip 解壓縮後可以執行,但他不會產生圖形介面,需使用如下命令操作
    vlc.exe c:\path\filename.avi
    telnet 介面無法使用
    vlc.exe --intf telnet --telnet-host=0.0.0.0 --telnet-port 4212 --telnet-password 1234

    vlc-3.0.0-git-win32

    vlc-2.2.1-win64.exe 無法安裝,即使使用以系統管理員執行
    vlc-2.2.1-win64.zip 解壓縮後可以執行,但他不會產生圖形介面,需使用如下命令操作
    vlc.exe c:\path\filename.avi
    telnet 介面正常
    vlc.exe --intf telnet --telnet-host=0.0.0.0 --telnet-port 4212 --telnet-password 1234

    vlc-2.2.1-win32.exe 無法安裝,即使使用以系統管理員執行
    vlc-2.2.1-win32.zip 解壓縮後可以執行,但他不會產生圖形介面,需使用如下命令操作
    vlc.exe c:\path\filename.avi
    telnet 介面正常
    vlc.exe --intf telnet --telnet-host=0.0.0.0 --telnet-port 4212 --telnet-password 1234



    建立 vlc-3.0.0-git-win32 時產生的錯誤
      CXX      demux/adaptative/playlist/libadaptative_plugin_la-Segment.lo
      CXX      demux/adaptative/playlist/libadaptative_plugin_la-SegmentBase.lo
    In file included from /usr/include/c++/4.8/i686-w64-mingw32/bits/gthr-default.h:35:0,
                     from /usr/include/c++/4.8/i686-w64-mingw32/bits/gthr.h:148,
                     from /usr/include/c++/4.8/ext/atomicity.h:35,
                     from /usr/include/c++/4.8/bits/basic_string.h:39,
                     from /usr/include/c++/4.8/string:52,
                     from ../../extras/package/win32/../../../modules/demux/adaptative/playlist/Segment.h:28,
                     from ../../extras/package/win32/../../../modules/demux/adaptative/playlist/SegmentBase.h:28,
                     from ../../extras/package/win32/../../../modules/demux/adaptative/playlist/SegmentBase.cpp:25:
    ../../extras/package/win32/../../../include/vlc_fixups.h:165:38: error: expected unqualified-id before ‘char’
     char *strtok_r(char *, const char *, char **);
                                          ^
    ../../extras/package/win32/../../../include/vlc_fixups.h:165:38: error: expected ‘)’ before ‘char’
    ../../extras/package/win32/../../../include/vlc_fixups.h:165:38: error: expected ‘)’ before ‘char’
    ../../extras/package/win32/../../../include/vlc_fixups.h:165:38: error: expected initializer before ‘char’
    ../../extras/package/win32/../../../include/vlc_fixups.h:195:12: error: expected unqualified-id before ‘{’ token
     struct tm *gmtime_r (const time_t *, struct tm *);
                ^
    ../../extras/package/win32/../../../include/vlc_fixups.h:199:12: error: expected declaration before ‘}’ token
     struct tm *localtime_r (const time_t *, struct tm *);
                ^
    make[5]: *** [demux/adaptative/playlist/libadaptative_plugin_la-SegmentBase.lo] Error 1
    make[5]: Leaving directory `/root/vlc-3.0.0/win32/modules'
    make[4]: *** [install-recursive] Error 1
    make[4]: Leaving directory `/root/vlc-3.0.0/win32/modules'
    make[3]: *** [install] Error 2
    make[3]: Leaving directory `/root/vlc-3.0.0/win32/modules'
    make[2]: *** [install-recursive] Error 1
    make[2]: Leaving directory `/root/vlc-3.0.0/win32'
    make[1]: *** [install] Error 2
    make[1]: Leaving directory `/root/vlc-3.0.0/win32'
    make: *** [package-win-install] Error 2