[vlc-devel] [PATCH v3 00/19] Add NativeClient/PPAPI support

Dennis Hamester dhamester at jusst.de
Mon Mar 20 17:57:17 CET 2017


In v3, we no longer touch any files in src/posix, but instead solve NaCl POSIX
incompatibilities via fixups / compat.

Changes from v2 to v3:
 * posix/thread_nocancel.c from v2 is now called misc/thread_nocancel.c
 * implemented f{,un}lockfile with newlib/nacl specific functions
 * add a dummy sigwait to compat
 * add a dummy pathconf to compat
 * add posix conforming {send,recv}msg to compat
 * ensure all of RĂ©mis copyright notices are still in place

Changes from v1 to v2:
 * Move android/thread.c to posix/thread_nocancel.c to avoid code duplication in nacl/thread.c
 * video_output: Remove display.c and move NaCl specific code to window.c
 * audio_output: Fixed popping noise when no data available
 * audio_output: Fixed flushing
 * vlc_fixup: Add fixup for TCP_NODELAY
 * Patches have been reordered slightly

Original Description:
This patch series makes it possible to compile VLC for Google Chrome's Native
Client environment. NaCl uses a newlib libc plus several NaCl specific
changes/replacements. This requires some special treatment here and there.
By design most access plugins are not usable in a sane way in NaCl, but for
now UDP and RTP access are working when sufficient permissions are given to
the Chrome App.
Ontop of changes to make a build possible two new modules are added.
video_output/ppapi/: GL module to render video to the Chrome GL context
audio_output/ppapi.c: Audio output to render audio to Chrome

Building for NaCl requires usage of a NaCl toolchain from the NaCl SDK. For
convenience we use webports (https://chromium.googlesource.com/webports) to
build libvlc and it's dependencies. The patches to add libvlc in there will be
pushed for webports once these patches have landed in VLC.

Besides that a demo application using libvlc, exposing part of the libvlc API
as JavaScript, exists and will be published soonish.

Best,
Julian & Dennis

Dennis Hamester (8):
  Include sys/uio.h where necessary
  android/thread: Remove monotonic clock checks
  Rename android/thread.c to misc/thread_nocancel.c
  misc/thread_nocancel: Fall back to _SC_NPROCESSORS_ONLN
  compat: Add pathconf.c
  nacl: Implement vlc_getaddr_info_i11e
  nacl: Add custom thread implementation
  compat: Add custom implementation of recvmsg/sendmsg on NaCl

Julian Scheel (11):
  nacl: Add new system type
  newlib/nacl: Provide flockfile implementation
  compat: Add sigwait dummy for NaCl
  nacl: nacl comes with xlocale dummies for C++
  nacl: vlc_fixups: Define IOV_MAX for newlib/nacl
  configure: Enable extended C++11 support
  keystore: nacl: Include fcntl.h for flock
  nacl: vlc_fixups: Define TCP_NODELAY
  lib/media_player: Add variables for NaCl handles
  video_output: Add PPAPI plugin
  audio_output: Add PPAPI plugin

 NEWS                                             |   3 +
 compat/flockfile.c                               |  12 ++
 compat/pathconf.c                                |  36 ++++
 compat/recvmsg.c                                 |  82 +++++++
 compat/sendmsg.c                                 |  64 ++++++
 compat/sigwait.c                                 |  49 +++++
 configure.ac                                     |  14 +-
 include/vlc/libvlc_media_player.h                |  35 +++
 include/vlc_fixups.h                             |  26 ++-
 include/vlc_threads.h                            |   2 +-
 include/vlc_vout_window.h                        |   9 +
 lib/libvlc.sym                                   |   3 +
 lib/media_player.c                               |  48 +++++
 modules/access/http/h2conn.c                     |   3 +
 modules/access/http/h2output.c                   |   3 +
 modules/access/rtp/input.c                       |   3 +
 modules/access/satip.c                           |   3 +
 modules/access/udp.c                             |   3 +
 modules/audio_output/Makefile.am                 |   7 +
 modules/audio_output/ppapi.c                     | 261 +++++++++++++++++++++++
 modules/keystore/file.c                          |   4 +
 modules/misc/gnutls.c                            |   3 +
 modules/video_output/Makefile.am                 |  15 ++
 modules/video_output/flaschen.c                  |   3 +
 modules/video_output/ppapi/gl.c                  | 186 ++++++++++++++++
 modules/video_output/ppapi/window.c              | 156 ++++++++++++++
 src/Makefile.am                                  |  16 +-
 src/{android/thread.c => misc/thread_nocancel.c} |  10 +-
 src/nacl/plugin.c                                |  46 ++++
 src/nacl/thread.c                                | 176 +++++++++++++++
 src/network/getaddrinfo.c                        |   3 +-
 src/network/httpd.c                              |   3 +
 32 files changed, 1276 insertions(+), 11 deletions(-)
 create mode 100644 compat/pathconf.c
 create mode 100644 compat/sigwait.c
 create mode 100644 modules/audio_output/ppapi.c
 create mode 100644 modules/video_output/ppapi/gl.c
 create mode 100644 modules/video_output/ppapi/window.c
 rename src/{android/thread.c => misc/thread_nocancel.c} (98%)
 create mode 100644 src/nacl/plugin.c
 create mode 100644 src/nacl/thread.c

-- 
2.12.0



More information about the vlc-devel mailing list