I am just trying to have a snapshot of my video feed save on my hard drive. I have searched around a bit, found a few examples, but mine will still not work. I get the feeling that I am missing somethign simple. To the extent of my knowledge, once I have a video feed playing, all I need to do is call the libvlc_video_take_snapshot function, and it should work. Many people that post problems about this state that a file is created but it is of size zero. For me on the other hand, there is never any file created. No exception is raised, but nothing seems to happen.
Code: Select all
libvlc_video_take_snapshot_dll(m_media_player, "D:\Data\picture.png", 0, 0, &ex);
I know that with my last issue with libvlc_video_set_crop_geometry not working it ended up being as simple as me needing to first add any desired crops into a list when I start vlc via "--custom-crop-ratios=<string>". Which leads me to think that maybe this snapshot problem is just as simple. This also brings me to my second question. I am not sure if I was the only one who got confused, or if my understanding of why my code now works is still incorrect. But, if it is possible I think it might be helpful for future beginners like myself if the official vlc documentation of the function mentioned any required preexisting conditions that must be met. I would happily modify that documentation if it is possible, and other more experienced developers agree it is correct.
Any help or advice on either of these matters would be greatly appreciated.