kmsquire/AV.jl — pull request #4 by kmsquire (2014-07-22 23:24:16+00:00)
Title: Major refactor of AV.jl

I've done a major refactor of the AV.jl structure.

At this point, ffmpeg 2.2 and 2.3 and libav 0.8, 9, and 10 should be automatically detected and supported, although in this version, libav 0.8 and libav-10 have only had very minimal testing.

I've also added `BinDeps` support, but have only minimally tested on Linux.

If people could test this PR and post back with success, or open issues/PRs/commits to fix issues, that would be great. If there's nothing too major (or if there is no response), I'll commit and we can pick up the broken pieces later. ;-)

-----------------------------------

Other changes:
* Updated the `README`
* Added a separate `README` in the `util` directory talking about wrapping the libraries.
* Added `examples/playvid.jl`, a much simpler video player than the tutorial player

For the refactor, I've separated ffmpeg and libav libraries, and created one directory in each for each of the libraries (libavcodec -> AVCodecs, libavdevice -> AVDevice, etc.). In theory, these should be mostly compatible, but I was finding enough differences that I thought it best to start here.

Each of the library directories also functions as a submodule of AV, so that each module can be loaded separately.

The directory structure looks something like this:

```
src
src/ffmpeg
src/ffmpeg/AVCodecs
src/ffmpeg/AVCodecs/src
src/ffmpeg/AVCodecs/v53
src/ffmpeg/AVCodecs/v54
src/ffmpeg/AVCodecs/v55
src/ffmpeg/AVDevice
src/ffmpeg/AVDevice/src
src/ffmpeg/AVDevice/v53
...
src/libav
src/libav/AVCodecs
src/libav/AVCodecs/src
src/libav/AVCodecs/v53
src/libav/AVDevice
src/libav/AVDevice/src
src/libav/AVDevice/v53
src/libav/AVDevice/v54
...
```

At the top level, `AV.jl` is loaded. It detects the library versions for each library, which are made available to the submodules. Each submodule can then load the appropriate set of wrappers.

Right now, `AVUtil`, `AVFormat`, `AVCodecs`, and `SWScale` are loaded by `AV.jl`, which enables basic video functionality.

Additionally `av_capture.jl` provides a minimal wrapper, which is used by `examples/playvid.jl`.

Since the information in this comment isn't available elsewhere, I'm going to add it to the README.

-----------

Questions/comments/suggestions for changes, and most importantly, pull requests (or commits) with fixes and more functionality, are most welcome.

I'm planning to release an initial version after merging this.