3

As my target was :

  1. Stream video from IP camera using LibVLC
  2. Process the video using OpenCV
  3. Then re-stream the processed video/image over network using LibVLC so that other connected clients can see the processed video/image in real time(No storing of video/image to disk first).

I have successfully accomplished first two tasks, but now i want to stream the processed video/image over network from the memory buffer as source, memory buffer is a iplimage variable, it could Mat variable. So, if somebody know how to stream such a raw data using libvlc then please help out, or point me to the right direction or sample code or link. Would be thankful..!

shujaat
  • 43
  • 5

1 Answers1

4

Try imem, then you can use memory input as the stream source. By implementing the get-release callbacks of the module, you can point where your buffer is and set the values for decode-presentation timestamps. Here are the prototypes for get and release:

    int imemGetCallback(void *userdata, const char* cookie, int64_t *dts, int64_t *pts, unsigned *flags, size_t *bufferSize, void **buffer);
    int imemReleaseCallback(void *data, const char *cookie, size_t bufferSize, void *buffer);
flekz
  • 41
  • 1
  • 6
  • This would be better suited as a comment – Ren Apr 04 '13 at 11:53
  • Sorry. Should I delete the post? – flekz Apr 04 '13 at 11:56
  • You can improve your post by clicking the edit button and adding more detail on why this approach would be useful. Try to avoid posting answers that are dependent on links to be useful as, if the link stops working, the answer becomes useless. – Ren Apr 04 '13 at 12:08