Gstreamer Development on Windows and Faster Builds on All Platforms with the Meson Build

Gstreamer Development on Windows and Faster Builds on All Platforms with the Meson Build

Nirbheek Chauhan (nirbheek on Twitter/IRC) GStreamer contributor since 2014 http://nirbheek.in nirbheek"centricu#ar.com nirbheek.chauhan"gmai#.com Centricular Ltd Nirbheek Chauhan (nirbheek on Twitter/IRC) GStreamer contributor since 2014 http://nirbheek.in nirbheek"centricu#ar.com nirbheek.chauhan"gmai#.com Centricular Ltd GStreamer de&elopment, (indows )aster bui#%s, al# platforms +eson bui#% s,stem Centricular Ltd 40 ,ears of bui#d systems GN- Make' GN- Autotools, Wa*' SCons, CMake' G,p … the #ist $oes on Centricular Ltd Centricular Ltd (0S: That graph is incomplete) #ibtoo#' con*i$!#t, con*i$!$uess' compi#e se%' tr' awk, $rep' insta##' coreuti#s Centricular Ltd Wh, do we sti## use .utotoo#s? Centricular Ltd Wh, do we sti## use .utotoo#s? $ du -sh gstreamer.git/configure 956K gstreamer.git/configure Centricular Ltd Centricular Ltd Wh, ha&e we been using .utotoo#s1 (Not rhetorica#) Centricular Ltd Wh, ha&e we been using .utotoo#s1 It works! Has serve% us we## so far Centricular Ltd Wh, ha&e we been using .utotoo#s1 Works out of the box on any 4inux %istro Cross-compi#ation Centricular Ltd Wh, ha&e we been using .utotoo#s1 )ami#iar system $tk-doc' %ocbook,$#ib-mkenums' $ettext' $ob6ect-introspection Centricular Ltd Wh, ha&e we been using .utotoo#s1 Conventions pk$5confi$' #ibrar, con&entions' etc! Centricular Ltd We nee% somethin$ better! Centricular Ltd Wh, do we need something better1 Technica# %ebt Macros that spit out +7s of she## Car$o Cult 0rogrammin$ Centricular Ltd Wh, do we need something better1 Ri%iculousl, slow Remember +Bs of she##1 10-20x slower on Win%ows & embe%%e% systems Centricular Ltd Wh, do we need something better1 9Cross5p#atform” support ... for the p#atforms of the 1970s an% 1980s Centricular Ltd $ grep -A 1 -e 197 configure # Use only awk features that work with 7th edition Unix awk (1978). # My, what an old awk you have, Mr. Solaris! Centricular Ltd Wh, do we need something better1 9Cross5p#atform” support Terrib#e experience on OS ? an% (in%ows Centricular Ltd Wh, do we need something better1 Terrib#e experience on OS ? an% (in%ows GN- &s BS@ MinG( &s C,$win Centricular Ltd Wh, do we need something better1 Terrib#e experience on OS ? an% (in%ows CanAt bui#% with native IDBs Centricular Ltd Wh, do we need something better1 Crapp, e3perience on Win%ows 9+inGW32 or MinGW64?” “MSES or MSES2?: 9m4.e3e crashes *or me” “make.exe han$s” Centricular Ltd Wh, do we need something better1 Crapp, e3perience on Win%ows 9Wh, %oes bui#%in$ a## of GStreamer take a *u## %a,1: Centricular Ltd Wh, do we need something better1 -nusab#e experience on Win%ows 9We use CFF exceptions” SG4G vs @W2EH vs SB2 Centricular Ltd Wh, do we need something better1 -nusab#e experience on Win%ows 9I want %ebu$ symbols in Hisua# Studio: @(.RF &s 0@7 Centricular Ltd Wh, do we need something better1 -nusab#e experience on Win%ows 9+, app#ication uses a symbo# server: Centricular Ltd Wh, do we need something better1 -nusab#e experience on Win%ows 9I want to bui#% ever,thin$ with MSVC: Centricular Ltd Wh, do we need something better1 -nusab#e experience on Win%ows 9I'&e a#ways %one %eve#opment insi%e Hisua# Stu%io: Centricular Ltd Wh, do we need something better1 -nusab#e experience on Win%ows 9Can I use GStreamer on Win%ows 0hone1: Centricular Ltd Wh, do we need something better1 >S ? e#ements #a$ behin% Win%ows e#ements use .0Is a%%e% in ?0 Centricular Ltd Wh, do we need something better1 The har%er it is to contribute The *ewer contributors ,ou wi## have Centricular Ltd We nee% somethin$ better! Centricular Ltd Wh, is there no alternati&e1 Centricular Ltd Wh, is there no alternati&e1 Technica# %ebt' Inertia Autotools was 9$ood enou$h: Centricular Ltd Wh, is there no alternati&e1 Apath,' Inertia 4inux users #ive in a *i#ter bubb#e Centricular Ltd Wh, is there no alternati&e1 Not se3, @i*ficult prob#em' #ots of work Centricular Ltd Well, now we have an alternati&e! Meson http://mesonbui#%.com Centricular Ltd +eson Generates Nin6a bui#% *i#es 2 ,ears of %eve#opment' 40 contributors Centricular Ltd $ cd gstreamer.git/ $ mkdir build-dir && cd build-dir $ meson .. $ ninja Centricular Ltd +eson .#wa,s bui#%s out-of-tree Auto-detects source code chan$es an% re-runs itse#* Centricular Ltd +eson Wh, %o we use it1 Centricular Ltd GStreamer ♥ +eson Centricular Ltd GStreamer ♥ +eson )ina##y a bui#% s,stem that %oes what we nee% Centricular Ltd GStreamer ♥ +eson pkg-con*i$ for e&er,thin$ Centricular Ltd GStreamer ♥ +eson $nome.mkenums() $nome!$enerateI$ir() $nome!$tk_doc()' !!! Centricular Ltd GStreamer ♥ +eson -seful cross-p#atform support Centricular Ltd GStreamer ♥ +eson )ewer %epen%encies @onAt nee% sh' m4, $rep' awk, tr' per#' coreuti#s, autocon*' automake' kitchen sink *or bui#%in$ Centricular Ltd GStreamer ♥ +eson )ewer %epen%encies 0,thon C' +eson' Nin6a F whatever actua##y bui#%s stuf* Centricular Ltd +eson ♥ 0#atforms 4inux, Win%ows' >S ?' BS@' iOS' An%roi% Inte$rate% Cross-compi#ation Centricular Ltd +eson ♥ Toolchains GCC' C#an$' MinG(' C,$win' +SHC Nin6a' MSBui#%' Hisua# Studio, ?Code Centricular Ltd GStreamer ♥ +eson Bver,thin$ bui#%s fasterJ Centricular Ltd +eson ♥ Spee% +a%e to be fast on first princip#es Written in 0ython' so coul% be even faster Centricular Ltd +eson ♥ Spee% Meson con*i$uration is fast Nin6a is faster Centricular Ltd GStreamer ♥ +eson (e porte% GStreamer to Meson Can’t $et an, c#oser to ‘en6oyment’ (when talking about bui#d s,stems) Centricular Ltd GStreamer ♥ +eson #ibffi' $#ib' orc' $streamer $st-p#ugins-base' $st-p#ugins-goo% $st-p#u$ins-ba%' $st-p#ugins-ug#,' $st-liba& $st-p,thon' $st5%evtoo#s' $st-e%itin$-ser&ices Centricular Ltd GStreamer ♥ +eson Bver,thin$ bui#%s fasterJ No *orkin$' no she##' no recursion Centricular Ltd +eson ♥ Spee% Autotools vs Meson M GCC on 4inux 64-bit, iNO4 gstreamer.git: 32s + 92s = 124s (~2 min) 3s + 67s = 70s → 44% faster Centricular Ltd +eson ♥ Spee% Autotools vs Meson M GCC on Win%ows 64-bit, iNO4 gstreamer.git: 165s + 475s = 640s (610 min) 5s + 55s = 60s → 1066% faster Centricular Ltd GStreamer ♥ +eson Sud%en#,!!! 7ui#%in$ on Win%ows %oesn’t take a %a,J Centricular Ltd GStreamer ♥ +eson Sud%en#,!!! 7ui#%in$ on embe%%e% %evices %oesn’t take 2 %a,s! Centricular Ltd GStreamer ♥ +eson New thin$s are possib#e Generate Hisua# Studio project fi#esJ Hisua# Studio %e&e#opment Centricular Ltd GStreamer ♥ +eson New thin$s are possib#e @ebu$ with Hisua# StudioJ Ful# support *or 0@B %ebu$ symbols Centricular Ltd GStreamer ♥ +eson .#ternative/para##e# bui#% s,stem *or $streamer Avai#ab#e in GStreamer 1.10 More work to %o on the port itse#* Centricular Ltd GStreamer ♥ +eson Some pro6ects ha&e a#rea%, move% to it 0iTiHi' $st-transco%er Centricular Ltd GStreamer ♥ +eson Tim an% Nirbheek 4inux support ✓ Win%ows support ✓ Centricular Ltd GStreamer ♥ +eson Tim' Nirbheek, an% youJ mac>S support ᴡɪᴘ i>S support ᴡɪᴘ An%roi% support ᴡɪᴘ Centricular Ltd The bi$$est reason we use +eson Centricular Ltd +eson ♥ GStreamer 4istens, un%erstan%s, a%apts Bugs have a#wa,s been we#comeJ Centricular Ltd +eson Wh, %o we use it1 ✓ Why shoul% you use it? Centricular Ltd +eson ♥ -sability Rea%ab#e bui#% *i#e synta3 0,thon-inspire% Centricular Ltd project!'myapp', 'c', version : '1.0'# mylib = library!'mylib', 'the-lib.c'% install : true% soversion : 1# executable!'myapp', 'the-app.c'% install : true% link_with : mylib% c_args : ['-DVER=' + meson.project_version!#># Centricular Ltd ... cdata = configuration_data!# cc = meson.get_compiler('c'# if cc.has_function!'poll'# cdata.set!'HAVE_POLL', 1# endif cdata.set!'HAVE_TIME_H', cc.has_header!'time.h'## configure_file(output : 'config.h'% configuration_data : cdata# ... Centricular Ltd meson --cross-info=info.txt [host_machine] system = 'windows' cpu_family = 7 "27 cpu = 7 "27 endian = 'little' [binaries] c = 'i686-w64-mingw32-gcc' cpp = 'i686-w64-mingw32-cpp' ar = 'i686-w64-mingw32-ar' strip = 'i686-w64-mingw32-strip' pkgconfig = 'pkg-config' exe_wrapper = 'wine' [properties] c_link_args = ['-DWINVER=0x0501', '-D_WIN32_WINNT=0x0501'] has_function_stpcpy = false Centricular Ltd +eson ♥ -sability From con*i$uration to bui#%in$ in one step In Autotools terms, automake + autoconf in one $o Centricular Ltd +eson ♥ -sability Not Turing-complete No macros, no *unction %efinitions, no in*inite #oops Centricular Ltd +eson ♥ -sability B3p#icit' For$ivin$' Bxtensib#e ;;P of thin$s work >>7' 1% are easy to *it Centricular Ltd +eson ♥ -sability Bxp#icit, )or$ivin$' Extensible Not a static p#atformJ Centricular Ltd +eson We think itAs the future Try it outJ Centricular Ltd Thanks for #istenin$J Centricular Ltd Questions? Centricular Ltd.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    81 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us