Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Eikum <aeikum@codeweavers.com>2021-10-11 21:02:23 +0300
committerAndrew Eikum <aeikum@codeweavers.com>2021-10-11 21:17:05 +0300
commitc3815897b8218ac57602e801f310cde35c5faacf (patch)
tree49032cb4fe2976a27a6f180aae4fa087b8c25748
parentf3c3f79e3547b984a1a82904c35d7d0301fbb02b (diff)
media-converter: Temporarily disable dumping audio to disk
It has some known issues, so don't waste resources on bad data. CW-Bug-Id: #19009
-rw-r--r--media-converter/src/audioconv.rs50
-rwxr-xr-xproton3
2 files changed, 34 insertions, 19 deletions
diff --git a/media-converter/src/audioconv.rs b/media-converter/src/audioconv.rs
index e845eb2b..517e4ba8 100644
--- a/media-converter/src/audioconv.rs
+++ b/media-converter/src/audioconv.rs
@@ -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)]
struct NeedTranscodeHead {
wmaversion: i32,
@@ -368,25 +376,29 @@ impl StreamState {
}
if !found {
- gst_trace!(CAT, "recording stream id {}", self.cur_hash);
- db.write_entry(AUDIOCONV_FOZ_TAG_CODECINFO,
- self.buffers[0].0,
- &mut self.codec_info.as_ref().unwrap().serialize().as_slice(),
- fossilize::CRCCheck::WithCRC)
- .map_err(|e| gst_loggable_error!(CAT, "Unable to write stream header: {:?}", e))?;
-
- db.write_entry(AUDIOCONV_FOZ_TAG_STREAM,
- self.cur_hash,
- &mut StreamStateSerializer::new(self),
- fossilize::CRCCheck::WithCRC)
- .map_err(|e| gst_loggable_error!(CAT, "Unable to write stream: {:?}", e))?;
-
- for buffer in self.buffers.iter() {
- db.write_entry(AUDIOCONV_FOZ_TAG_AUDIODATA,
- buffer.0,
- &mut buffer.1.as_slice(),
- fossilize::CRCCheck::WithCRC)
- .map_err(|e| gst_loggable_error!(CAT, "Unable to write audio data: {:?}", e))?;
+ 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);
+ db.write_entry(AUDIOCONV_FOZ_TAG_CODECINFO,
+ self.buffers[0].0,
+ &mut self.codec_info.as_ref().unwrap().serialize().as_slice(),
+ fossilize::CRCCheck::WithCRC)
+ .map_err(|e| gst_loggable_error!(CAT, "Unable to write stream header: {:?}", e))?;
+
+ db.write_entry(AUDIOCONV_FOZ_TAG_STREAM,
+ self.cur_hash,
+ &mut StreamStateSerializer::new(self),
+ fossilize::CRCCheck::WithCRC)
+ .map_err(|e| gst_loggable_error!(CAT, "Unable to write stream: {:?}", e))?;
+
+ for buffer in self.buffers.iter() {
+ db.write_entry(AUDIOCONV_FOZ_TAG_AUDIODATA,
+ buffer.0,
+ &mut buffer.1.as_slice(),
+ fossilize::CRCCheck::WithCRC)
+ .map_err(|e| gst_loggable_error!(CAT, "Unable to write audio data: {:?}", e))?;
+ }
}
}
}
diff --git a/proton b/proton
index 32f9d7a1..62d6ec74 100755
--- a/proton
+++ b/proton
@@ -1002,6 +1002,9 @@ class Session:
#disable XIM support until libx11 >= 1.7 is widespread
self.env.setdefault("WINE_ALLOW_XIM", "0")
+ #temporarily disable dumping audio to disk
+ self.env.setdefault("MEDIACONV_AUDIO_DONT_DUMP", "1")
+
if "wined3d11" in self.compat_config:
self.compat_config.add("wined3d")