mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
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:
parent
3b88acb45d
commit
b6089f3b91
18 changed files with 873 additions and 420 deletions
52
plugins/VOIP/gui/QVideoDevice.h
Normal file
52
plugins/VOIP/gui/QVideoDevice.h
Normal 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 ;
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue