mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-14 23:58:17 +03:00
media-converter: Add an option to disable dumping audio to disk
CW-Bug-Id: #19009
This commit is contained in:
parent
ac2caa3e54
commit
4aac973ecf
@ -204,6 +204,14 @@ static DUMP_FOZDB: Lazy<Mutex<Option<fossilize::StreamArchive>>> = Lazy::new(||
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
static DUMPING_DISABLED: Lazy<bool> = Lazy::new(|| {
|
||||||
|
let v = match std::env::var("MEDIACONV_AUDIO_DONT_DUMP") {
|
||||||
|
Err(_) => { return false; },
|
||||||
|
Ok(c) => c,
|
||||||
|
};
|
||||||
|
return v != "0";
|
||||||
|
});
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct NeedTranscodeHead {
|
struct NeedTranscodeHead {
|
||||||
wmaversion: i32,
|
wmaversion: i32,
|
||||||
@ -368,6 +376,9 @@ impl StreamState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !found {
|
if !found {
|
||||||
|
if *DUMPING_DISABLED {
|
||||||
|
gst_trace!(CAT, "dumping disabled, so not recording stream id {}", self.cur_hash);
|
||||||
|
} else {
|
||||||
gst_trace!(CAT, "recording stream id {}", self.cur_hash);
|
gst_trace!(CAT, "recording stream id {}", self.cur_hash);
|
||||||
db.write_entry(AUDIOCONV_FOZ_TAG_CODECINFO,
|
db.write_entry(AUDIOCONV_FOZ_TAG_CODECINFO,
|
||||||
self.buffers[0].0,
|
self.buffers[0].0,
|
||||||
@ -390,6 +401,7 @@ impl StreamState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user