Skip to content

Latest commit

 

History

History
94 lines (73 loc) · 5.91 KB

README.md

File metadata and controls

94 lines (73 loc) · 5.91 KB

nope.media

tests Linux tests Mac tests Windows build Android 🤖 build iOS 🍏 coverity

Introduction

nope.media is a video playback library for fetching frames at exact times.

It can handle only one stream at a time, generally video. If audio is requested, the frame returned will be an instant video frame containing both amplitudes and frequencies information.

License

LGPL v2.1, see LICENSE.

Compilation, installation

meson setup builddir
meson compile -C builddir
meson install -C builddir

meson configure can be used to list the available options. See the Meson documentation for more information.

API Usage

For API usage, refers to nopemd.h.

Development

Running tests

Assuming nope.media is built within a builddir directory (meson builddir && meson compile -C builddir), the test can be run with meson using a command such as meson test -C builddir -v.

The testing program itself (test-prog) can be found in the build directory, along a sample player tool named nope-media (if its dependencies were met at build time), which can be used for other manual testing purposes.

Infrastructure overview

              .                             .
              .             API             .
              .                             .
              . . . . . . . . . . . . . . . .
              .                             .   .------------.               .-----------------------------------------------------.
              .                             .   | api.c      |               | control                                             |
              .                             .   +------------+               +-----------------------------------------------------+
           ===.===  nmd_create()      ======.==>|            |===  init  ===>|                                                     |
              .                             .   |            |---  start  -->|                    MANAGE THREADS                   |
           ===.===  nmd_get_*frame()      ==.==>|            |---  seek  --->|              _________/  |  \_______                |
  USER        .                             .   |            |---  stop  --->|             /            |          \               |
           ---.---  nmd_start()      -------.-->|            |===  free  ===>|            /             |           \              |
           ---.---  nmd_seek()       -------.-->|            |               |           v              v            v             |
           ---.---  nmd_seek()       -------.-->|            |               |      .----------.  .----------.  .----------.       |
              .                             .   |            |               |      | demuxer  |  | decoder  |  | filterer |       |
           ===.===  nmd_free()       =======.==>|            |               |      +----------+  +----------+  +----------+       |
              .                             .   |            |               |      | init     |  | init     |  | init     |       |
              .                             .   `------------'               |      +----------+  +----------+  +----------+       |
              .                             .                                |      |          |  |          |  |          |       |
              .                             .                                |      |  RUN     |  |  RUN     |  |  RUN     |       |
              .                             .                                |      |          |  |          |  |          |       |
                                                                             |      |          |  |          |  |          |       |
                                                                             |   O==|==O    O==|==|==O    O==|==|==O    O==|==O    |
                                                                             |      |          |  |          |  |          |       |
                                                                             |      +----------+  +----------+  +----------+       |
                                                                             |      | free     |  | free     |  | free     |       |
                                                                             |      `----------'  `----------'  `----------'       |
                                                                             |                                                     |
                                                                             |                                                     |
                                                                             |   O=====O in control queue                          |
                                                                             |                                                     |
                                                                             |   O=====O out control queue                         |
                                                                             |                                                     |
                                                                             `-----------------------------------------------------'

O====O       message queue
-- xxx -->   async operation
== xxx ==>   sync operation