use nihav_core::frame::*;
use nihav_core::formats;
+#[cfg(feature="decoder_fstaud")]
use nihav_core::formats::NAChannelMap;
use nihav_core::codecs::*;
+#[cfg(feature="decoder_fstvid")]
use nihav_core::io::byteio::*;
+#[cfg(feature="decoder_fstaud")]
use nihav_codec_support::codecs::imaadpcm::IMAState;
+#[cfg(feature="decoder_fstvid")]
struct FutureVisionVideoDecoder {
info: NACodecInfoRef,
pal: [u8; 768],
h: usize,
}
+#[cfg(feature="decoder_fstvid")]
struct Bits8<'a> {
src: &'a [u8],
pos: usize,
bit: u8,
}
+#[cfg(feature="decoder_fstvid")]
impl<'a> Bits8<'a> {
fn new(src: &'a [u8]) -> Self { Bits8 { src, pos: 0, buf: 0, bit: 0 } }
fn read_bit(&mut self) -> ByteIOResult<bool> {
}
}
+#[cfg(feature="decoder_fstvid")]
impl FutureVisionVideoDecoder {
fn new() -> Self {
FutureVisionVideoDecoder {
}
}
+#[cfg(feature="decoder_fstvid")]
impl NADecoder for FutureVisionVideoDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
}
}
+#[cfg(feature="decoder_fstvid")]
impl NAOptionHandler for FutureVisionVideoDecoder {
fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
fn set_options(&mut self, _options: &[NAOption]) { }
fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
}
+#[cfg(feature="decoder_fstvid")]
pub fn get_decoder_video() -> Box<dyn NADecoder + Send> {
Box::new(FutureVisionVideoDecoder::new())
}
+#[cfg(feature="decoder_fstaud")]
struct FutureVisionAudioDecoder {
ainfo: NAAudioInfo,
chmap: NAChannelMap,
count: usize,
}
+#[cfg(feature="decoder_fstaud")]
impl FutureVisionAudioDecoder {
fn new() -> Self {
FutureVisionAudioDecoder {
}
}
+#[cfg(feature="decoder_fstaud")]
impl NADecoder for FutureVisionAudioDecoder {
fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Audio(ainfo) = info.get_properties() {
}
}
+#[cfg(feature="decoder_fstaud")]
impl NAOptionHandler for FutureVisionAudioDecoder {
fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
fn set_options(&mut self, _options: &[NAOption]) { }
fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
}
+#[cfg(feature="decoder_fstaud")]
pub fn get_decoder_audio() -> Box<dyn NADecoder + Send> {
Box::new(FutureVisionAudioDecoder::new())
}
use crate::game_register_all_decoders;
use crate::game_register_all_demuxers;
+ // samples come from the Harvester game
#[test]
fn test_fst_video() {
let mut dmx_reg = RegisteredDemuxers::new();