Ticket #193 (assigned enhancement)

Opened 4 years ago

Last modified 3 years ago

Implement webcam receiving/sending

Reported by: diederik Owned by: diederik
Priority: major Milestone: kmess-3.0
Component: Protocol - P2P/DC Version: 1.5
Keywords: Cc:

Description (last modified by sjors) (diff)

Being able to use your webcam is a highly requested feature, in fact a reason for users to ignore KMess at this moment. Therefore I'd like to have this feature in the next version.

There is libmimic for the video frames part. It's also said some webcam transfers (guess 2-way) happen over RTP.

Attachments

webcam-firststeps.patch Download (56.4 KB) - added by diederik 3 years ago.
First steps to implement webcam, which I wrote a few weeks ago. Avoid keeping this on my harddrive..

Change History

Changed 4 years ago by diederik

  • version changed from 1.5-pre2 to 1.5

Changed 4 years ago by diederik

  • description modified (diff)

Changed 4 years ago by diederik

  • status changed from new to assigned

Changed 3 years ago by diederik

First steps to implement webcam, which I wrote a few weeks ago. Avoid keeping this on my harddrive..

Changed 3 years ago by valerio

It seems the patch is already in SVN, am I wrong? If it has been committed already, the patch here can be removed!

Changed 3 years ago by diederik

hmm yes, I've commited that patch a while ago at Akademy. New changes are also in, but I'm surprised I didn't update this ticket yet with the revision numbers.

Anyways, to try webcam, I used to same trick as MSNP15: cmake -D KMESS_ENABLE_WEBCAM=1 ....

Currently KMess is able to accept a webcam invitation, and establish the connection. The actual video frames are sent by the remote client too. That's where the next challenge starts: parsing the headers and video data.

Kopete already has a nice libmimic wrapper we can refactor for KMess.

Changed 3 years ago by diederik

Next challenges as I see it now:

  • Start handling the video frame headers.
  • Receive the video frame itself.
  • Implement the libmimic wrapper.
  • Send the proper 'ack' messages so the remote client keeps sending data.
  • Forward the resuling bitmap to the chat window (if possible with a short route, e.g. pass a "VideoDisplay" pointer to the connection. That could be an interface which the chat window implements.)
  • Implement the viewer controls. Either a separate sidebar pane, or have a multi-functional ContactFrame.
  • Implement the proper close/abort messages.

And then for sending:

  • Do hardware detection
  • Be able to receive video frames.
  • Implement the invite messages.
  • Implement the sending of video data.

Changed 3 years ago by diederik

(this is just the order of things to do)

Changed 3 years ago by valerio

  • milestone changed from kmess-2.0 to kmess-2.1

Changed 3 years ago by diederik

Something to add, to access the webcam API I'd suggest to use libv4l.

There are a lot of pixel formats coming out of the webcam drivers. The libv4l library makes sure that doesn't have to be implemented in every application.

Changed 3 years ago by sjors

  • description modified (diff)

I already wrote v4l2 code a while ago which I can port to kmess. Currently, webcam receiving works fine, except it doesn't work at all over a NAT or the internet which is probably the most important thing about webcam support ;)

Note: See TracTickets for help on using tickets.