chore(media): remove audio sink setting and improve logging
- commit
- 89e5e2217f4ad88faad00b9db1845d5cb98573f9
- author
- bnema · · 2025-11-13 20:07 UTC
- committer
- bnema · · 2025-11-13 22:04 UTC
- parent
- 6120f51
- signature
- unsigned
1 file · +2 -8
M internal/app/environment/media.go +2 -8
| @@ -15,18 +15,12 @@ func SetupMediaPipeline() { | |||
| 15 | 15 | log.Printf("Warning: failed to set GST_PLUGIN_FEATURE_RANK: %v", err) | |
| 16 | 16 | } | |
| 17 | 17 | } | |
| 18 | - | // Provide a safe audio sink to avoid autoaudiosink failures | |
| 19 | - | if os.Getenv("GST_AUDIO_SINK") == "" { | |
| 20 | - | if err := os.Setenv("GST_AUDIO_SINK", "fakesink"); err != nil { | |
| 21 | - | log.Printf("Warning: failed to set GST_AUDIO_SINK: %v", err) | |
| 22 | - | } | |
| 23 | - | } | |
| 24 | - | // Optionally disable media stream features that can engage complex pipelines | |
| 18 | + | // Optionally disable media stream features that can engage complex pipelines (webcam/mic) | |
| 25 | 19 | if os.Getenv("WEBKIT_DISABLE_MEDIA_STREAM") == "" { | |
| 26 | 20 | if err := os.Setenv("WEBKIT_DISABLE_MEDIA_STREAM", "1"); err != nil { | |
| 27 | 21 | log.Printf("Warning: failed to set WEBKIT_DISABLE_MEDIA_STREAM: %v", err) | |
| 28 | 22 | } | |
| 29 | 23 | } | |
| 30 | - | log.Printf("[media] Safe mode enabled (override with DUMBER_MEDIA_SAFE=0)") | |
| 24 | + | log.Printf("[media] Safe mode enabled: VAAPI demoted, webcam/mic disabled (override with DUMBER_MEDIA_SAFE=0)") | |
| 31 | 25 | } | |
| 32 | 26 | } | |
| @@ -15,18 +15,12 @@ func SetupMediaPipeline() { | |||||
| 15 | log.Printf("Warning: failed to set GST_PLUGIN_FEATURE_RANK: %v", err) | 15 | log.Printf("Warning: failed to set GST_PLUGIN_FEATURE_RANK: %v", err) | ||
| 16 | } | 16 | } | ||
| 17 | } | 17 | } | ||
| 18 | - | // Provide a safe audio sink to avoid autoaudiosink failures | 18 | + | // Optionally disable media stream features that can engage complex pipelines (webcam/mic) |
| 19 | - | if os.Getenv("GST_AUDIO_SINK") == "" { | |||
| 20 | - | if err := os.Setenv("GST_AUDIO_SINK", "fakesink"); err != nil { | |||
| 21 | - | log.Printf("Warning: failed to set GST_AUDIO_SINK: %v", err) | |||
| 22 | - | } | |||
| 23 | - | } | |||
| 24 | - | // Optionally disable media stream features that can engage complex pipelines | |||
| 25 | if os.Getenv("WEBKIT_DISABLE_MEDIA_STREAM") == "" { | 19 | if os.Getenv("WEBKIT_DISABLE_MEDIA_STREAM") == "" { | ||
| 26 | if err := os.Setenv("WEBKIT_DISABLE_MEDIA_STREAM", "1"); err != nil { | 20 | if err := os.Setenv("WEBKIT_DISABLE_MEDIA_STREAM", "1"); err != nil { | ||
| 27 | log.Printf("Warning: failed to set WEBKIT_DISABLE_MEDIA_STREAM: %v", err) | 21 | log.Printf("Warning: failed to set WEBKIT_DISABLE_MEDIA_STREAM: %v", err) | ||
| 28 | } | 22 | } | ||
| 29 | } | 23 | } | ||
| 30 | - | log.Printf("[media] Safe mode enabled (override with DUMBER_MEDIA_SAFE=0)") | 24 | + | log.Printf("[media] Safe mode enabled: VAAPI demoted, webcam/mic disabled (override with DUMBER_MEDIA_SAFE=0)") |
| 31 | } | 25 | } | ||
| 32 | } | 26 | } | ||