mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
b6089f3b91
- 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
63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
#include <QObject>
|
|
#include <QGraphicsEffect>
|
|
#include <gui/SpeexProcessor.h>
|
|
#include <gui/chat/ChatWidget.h>
|
|
|
|
class QToolButton;
|
|
class QAudioInput;
|
|
class QAudioOutput;
|
|
class QVideoInputDevice ;
|
|
class QVideoOutputDevice ;
|
|
class VideoEncoder ;
|
|
class VideoDecoder ;
|
|
|
|
#define VOIP_SOUND_INCOMING_CALL "VOIP_incoming_call"
|
|
|
|
class VOIPChatWidgetHolder : public QObject, public ChatWidgetHolder
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
VOIPChatWidgetHolder(ChatWidget *chatWidget);
|
|
virtual ~VOIPChatWidgetHolder();
|
|
|
|
virtual void updateStatus(int status);
|
|
|
|
void addAudioData(const QString name, QByteArray* array) ;
|
|
void addVideoData(const QString name, QByteArray* array) ;
|
|
|
|
private slots:
|
|
void toggleAudioListen();
|
|
void toggleAudioCapture();
|
|
void toggleVideoCapture();
|
|
void hangupCall() ;
|
|
|
|
public slots:
|
|
void sendAudioData();
|
|
|
|
protected:
|
|
// Audio input/output
|
|
QAudioInput* inputAudioDevice;
|
|
QAudioOutput* outputAudioDevice;
|
|
|
|
QtSpeex::SpeexInputProcessor* inputAudioProcessor;
|
|
QtSpeex::SpeexOutputProcessor* outputAudioProcessor;
|
|
|
|
// Video input/output
|
|
QVideoOutputDevice *outputVideoDevice;
|
|
QVideoOutputDevice *echoVideoDevice;
|
|
QVideoInputDevice *inputVideoDevice;
|
|
|
|
QWidget *videoWidget ; // pointer to call show/hide
|
|
|
|
VideoEncoder *inputVideoProcessor;
|
|
VideoDecoder *outputVideoProcessor;
|
|
|
|
// Additional buttons to the chat bar
|
|
QToolButton *audioListenToggleButton ;
|
|
QToolButton *audioCaptureToggleButton ;
|
|
QToolButton *videoCaptureToggleButton ;
|
|
QToolButton *hangupButton ;
|
|
};
|
|
|