virtio: video: make libvda a selectable feature

For the crosvm externalization project, we want to be able to compile
video support without libvda, which is only supported on Chrome OS.

Add an explicit "libvda" feature to crosvm and make all the libvda code
depend on that feature, so any trace of libvda can effectively be
compiled out.

For compatibility, the "libvda" feature is selected by the
"video-decoder" or "video-encoder" features.

BUG=b:161774071
BUG=b:169295147
TEST=`cargo build --features="video-decoder,video-encoder"` results in a
     crosvm binary with libvda enabled.

Change-Id: Ice3d3089b73b77f6b009400953063f2cf8f385da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3026351
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
diff --git a/src/main.rs b/src/main.rs
index 7b99f96..3aaf469 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -460,10 +460,15 @@
 
 #[cfg(any(feature = "video-decoder", feature = "video-encoder"))]
 fn parse_video_options(s: Option<&str>) -> argument::Result<VideoBackendType> {
-    const VALID_VIDEO_BACKENDS: &[&str] = &["libvda"];
+    const VALID_VIDEO_BACKENDS: &[&str] = &[
+        #[cfg(feature = "libvda")]
+        "libvda",
+    ];
 
     match s {
+        #[cfg(feature = "libvda")]
         None => Ok(VideoBackendType::Libvda),
+        #[cfg(feature = "libvda")]
         Some("libvda") => Ok(VideoBackendType::Libvda),
         Some(s) => Err(argument::Error::InvalidValue {
             value: s.to_owned(),