Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mutext on ts/muxer and get_parameter for keep alive #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

mutext on ts/muxer and get_parameter for keep alive #9

wants to merge 1 commit into from

Conversation

LdDl
Copy link

@LdDl LdDl commented Aug 27, 2020

  1. Set method as "GET_PARAMETER"
    For cheap or old cameras "OPTIONS" caused no reconnect

  2. Add mutex on ts/muxer.go
    Working with map concurrently. So sync.Mutex has to be there anyways for thread-safe.

@deepch
Copy link
Owner

deepch commented Sep 4, 2020

Не всегда работает GET_PARAMETER возможно имеет смысл комбинировать, я гляну как сделано в ffmpeg
А зачем мютексить микшер под разучивается какое - то асинхронное использование?

@LdDl
Copy link
Author

LdDl commented Sep 4, 2020

https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-May/037193.html
Вот тут ещё ссылаются на то, как в VLC сделано: сначала GET_PARAMETER, при неудаче - OPTIONS. Цитата:

After this patch,
libavformat will still send OPTIONS keepalives if GET_PARAMETER
isn't explicitly said to be supported.

А мьютекс: да, я асинхроно работу веду для TS'к и заметил, что нет мьютекса для map. Вообще его бы везде добавить, где есть потенциальная возможность конкурентного обращения.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants