Started implementation of Video Chat (not working yet!).

- GUI part is done
- implemented a very basic JPEG codec
- added echo frame in configuration panel
- created a video capture object that uses OpenCV (should be cross systems)
Remains to do:
- serialise and send frames through p3VoRS
- use a serious codec (e.g. Theora+x264)
- add icons to reflect camera state (failure/working/sending/...)
- compilation on windows 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7449 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-07-13 13:57:25 +00:00
parent 3b88acb45d
commit b6089f3b91
18 changed files with 873 additions and 420 deletions

View file

@ -0,0 +1,52 @@
#pragma once
#include <QLabel>
class VideoEncoder ;
class CvCapture ;
// Responsible from displaying the video. The source of the video is
// a VideoDecoder object, which uses a codec.
//
class QVideoOutputDevice: public QLabel
{
public:
QVideoOutputDevice(QWidget *parent) ;
void showFrame(const QImage&) ;
};
// Responsible for grabbing the video from the webcam and sending it to the
// VideoEncoder object.
//
class QVideoInputDevice: public QObject
{
Q_OBJECT
public:
QVideoInputDevice(QWidget *parent) ;
~QVideoInputDevice() ;
// Captured images are sent to this encoder. Can be NULL.
//
void setVideoEncoder(VideoEncoder *venc) { _video_encoder = venc ; }
// All images received will be echoed to this target. We could use signal/slots, but it's
// probably faster this way. Can be NULL.
//
void setEchoVideoTarget(QVideoOutputDevice *odev) { _echo_output_device = odev ; }
void start() ;
void stop() ;
protected slots:
void grabFrame() ;
private:
VideoEncoder *_video_encoder ;
QTimer *_timer ;
CvCapture *_capture_device ;
QVideoOutputDevice *_echo_output_device ;
};