[Live-devel] HLSProxy
Andrey Shvyrkin
ashvyrkin at gosniias.ru
Wed Aug 11 04:15:10 PDT 2021
Thanks for answers.
I'm using/EventTrigger/ to exit the event loop at any point in time by changing the value of the watch variable. And then I use the previously presented code to close the session and free memory. In theory, I should free the memory used by the/MPEG2TransportStreamFromESSource/ variable before closing the session, but in this case, when/Medium::close/ is called to close the session, the application crashes in the/RTCPInstance/ destructor because/fSource /variable is invalid.
[...]
env->taskScheduler().doEventLoop(&eventLoopVar);
MediaSubsessionIterator iter(*session);
MediaSubsession* subsession;
while ((subsession = iter.next()) != NULL) {
if (subsession->sink != NULL) {
Medium::close(subsession->sink);
subsession->sink = NULL;
}
}
*Medium::close(transportStream);*
Medium::close(session);
Medium::close(rtspClient);
env->reclaim();
delete scheduler;
> “live555HLSProxy” is intended to be run as an application - i.e., in
> its own process - so that when the application (process) ends, any
> extra memory that it has allocated is automatically freed. Is there
> any reason why you have to embed this code in some other
> (longer-lasting) application? I.e., why not continue to run it as its
> own process? >/If I use 'live555HLSProxy.cpp' source code, I can free
> memory with code: /[…] But if you insist on embedding the
> “live555HLSProxy.cpp” code in your own application, then the code that
> you describe here will probably work. >/When is it correct to call
> Medium::close(transportStream)? / Anytime after it the stream no
> longer being read. I.e., you could do this in the “afterPlaying()”
> function (which you have presumably already modified to comment out
> the call to “exit(0);” :-) Ross Finlayson Live Networks, Inc.
> http://www.live555.com/ <http://www.live555.com/>
--
С уважением, Андрей Швыркин
Начальник группы "Технологии анализа движения и видеонаблюдения"
ФГУП "ГосНИИАС"
Моб.: +7 903 135-10-63
Best regards, Andrey Shvyrkin
Head of group "Technologies of video surveillance"
FGUP "GosNIIAS"
Cell: +7 903 135-10-63
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20210811/ac4010bd/attachment.htm>
More information about the live-devel
mailing list