Possible Memory Leak with SMEM
Posted: 18 Jun 2014 16:30
Hello,
I´m actually facing a possible memory leak with the vlc lib.
What I´m doing:
- Reading a rtsp stream from a webcam - url rtsp://192.168.0.1:554/axis-media/media.amp?resolution=1280x720&compression=50&fps=20" (as some of you can see its an axis camera).
- this one I want to read with vlc so I start the vlc instance with following arguments:
-> the code works and I get a correct image into the buffer s_VideoData ( I can save the image and handle the content)
My problem is that when I start the videostreaming the buffer increases slowly - very slowy. Instead of redirecting the output of transcode to smem I tried vmem and voila -> no memory increasing!! So I guess it has something to do with smem. Can someone try to reproduce the problem?! Any ideas how to counter/verify the problem!?!? I actually the check my code and I´m sure that its not a problem on my side.
Thanks for any ideas....
Additional infos:
Win7
vlc lib version 2.1.4
I´m actually facing a possible memory leak with the vlc lib.
What I´m doing:
- Reading a rtsp stream from a webcam - url rtsp://192.168.0.1:554/axis-media/media.amp?resolution=1280x720&compression=50&fps=20" (as some of you can see its an axis camera).
- this one I want to read with vlc so I start the vlc instance with following arguments:
Code: Select all
char smem_options[1000];
sprintf(smem_options, "#transcode{vcodec=RV32,fps=%d,width=%d,height=%d}:smem{audio-prerender-callback=%lld,video-prerender-callback=%lld,audio-postrender-callback=%lld,video-postrender-callback=%lld,audio-data=%lld,video-data=%lld}",
m_FPS,
m_ImageSizeX,
m_ImageSizeY,
(long long int) (intptr_t) (void *) &lockAudio,
(long long int) (intptr_t) (void *) &lockVideo,
(long long int) (intptr_t) (void *) &unlockAudio,
(long long int) (intptr_t) (void *) &unlockVideo,
(long long int) (intptr_t) (void *) &s_AudioData,
(long long int) (intptr_t) (void *) &s_VideoData
);
/* Set arguments */
const char * const l_VlcArgs[] =
{
"-I", "dummy", // Don't use any interface
"--verbose=2", // Be verbose
"--no-sout-smem-time-sync", // deactivate time sync
"--sout", smem_options // Stream to memory
};
int l_VlcArgsLength = sizeof(l_VlcArgs) / sizeof(*l_VlcArgs);
/* Create vlc instance */
m_VLCMediaInstance = libvlc_new(l_VlcArgsLength, l_VlcArgs);
My problem is that when I start the videostreaming the buffer increases slowly - very slowy. Instead of redirecting the output of transcode to smem I tried vmem and voila -> no memory increasing!! So I guess it has something to do with smem. Can someone try to reproduce the problem?! Any ideas how to counter/verify the problem!?!? I actually the check my code and I´m sure that its not a problem on my side.
Thanks for any ideas....
Additional infos:
Win7
vlc lib version 2.1.4