diff options
author | wm4 <wm4@nowhere> | 2014-06-10 20:46:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-11 00:34:46 +0200 |
commit | 7689f5f7cedcafe30d8ede3609cf4f2a3314a1d8 (patch) | |
tree | d46cb5666c5dcdd6582ff13e7973787fbdbf49a9 /options | |
parent | 73ac34b220d168e0f9c3399aedfb73f78e5fa455 (diff) | |
download | mpv-7689f5f7cedcafe30d8ede3609cf4f2a3314a1d8.tar.bz2 mpv-7689f5f7cedcafe30d8ede3609cf4f2a3314a1d8.tar.xz |
stream: add a generic way to setup stream priv defaults
Usually, each stream driver declares the size and option list of its
private data. This was pretty natural for when most streams still used
global variables to setup their defaults. They did by pointing
priv_defaults to the (mutable) struct containing the option values. But
falls short when storing the option values in MPOpts. So provide a
somewhat inelegant but simple way to let the stream implementation setup
the priv struct at initialization time.
This is done with the get_defaults callback. It should return a copy of
the struct used in MPOpts. (A copy, because if MPOpts is changed, string
fields might be deallocated, and if that field is not described by
stream_info.options, it won't be copied on init.)
Diffstat (limited to 'options')
0 files changed, 0 insertions, 0 deletions