Fixed video recording problem on desktop.#30114
Open
MHTBeelal wants to merge 3 commits intotelegramdesktop:devfrom
Open
Fixed video recording problem on desktop.#30114MHTBeelal wants to merge 3 commits intotelegramdesktop:devfrom
MHTBeelal wants to merge 3 commits intotelegramdesktop:devfrom
Conversation
23rd
reviewed
Dec 16, 2025
| if (s.empty()) { | ||
| // empty means "default" — keep it as the first option if nothing else | ||
| // but avoid duplicate empties | ||
| if (std::find(candidates.begin(), candidates.end(), std::string()) == candidates.end()) |
23rd
reviewed
Dec 16, 2025
| // Build candidate device IDs: original first, then simple heuristics to | ||
| // prefer non-IR / RGB variants (common naming pattern: "... I" vs "... R", | ||
| // or "IR" tokens). These heuristics are intentionally conservative. | ||
| const std::string base = startDeviceId.toStdString(); |
Contributor
Please report back when you test, most likely the code has to be moved to lib_webrtc, that's where the logic of creating the camera list resides |
Author
Sorry I am replying really late, I am not able to build the telegram on my machine because I am really confused about getting the API access to build and test the program! I tried to submit my application but there was an error which I don't know. can you please help me with that??? |
Contributor
|
Use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR improves webcam initialization on Linux when starting video message recording.
Some USB webcams (notably devices exposing both RGB and IR entries, e.g. Lenovo 510) take longer to initialize or expose multiple device names (… I / … R). Telegram Desktop may time out or select the IR entry first, causing “Could not start video recording. Please check your camera.” even though the camera works correctly.
Changes
Results:
NOT TESTED YET