# Migrating kodecs-vaapi
## kodecs-vaapi 0.2 -> 0.3
`encode::Config` is `#[non_exhaustive]`, so struct literals and struct
update syntax no longer compile outside the crate. Build it with
`Config::new(width, height, framerate, bitrate, gop)`, which picks H.264,
the first render node that encodes it, `Color::infer(height)`, and the
default QP range, then assign the fields you change:
```rust,no_run
use std::num::NonZeroU32;
use kodecs_vaapi::Codec;
use kodecs_vaapi::encode::{Config, DEFAULT_MIN_QP};
let mut config = Config::new(1280, 720, 30, 2_000_000, NonZeroU32::new(60).unwrap());
config.codec = Codec::H265;
config.qp = DEFAULT_MIN_QP..=34;
```
## From moq-vaapi
Depend on `kodecs-vaapi` and change imports to `kodecs_vaapi`. moq-vaapi's
`encode::Config::new` takes the same arguments.