From 7ff94efc1c42866646b688b3dbc8e42fc877ae71 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Mon, 1 Aug 2011 12:57:45 +0000 Subject: Re #1327: Very early version of simple video GUI, built on Qt, should run on win/lin/mac. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3686 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/vidgui/vidgui.h | 93 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 pjsip-apps/src/vidgui/vidgui.h (limited to 'pjsip-apps/src/vidgui/vidgui.h') diff --git a/pjsip-apps/src/vidgui/vidgui.h b/pjsip-apps/src/vidgui/vidgui.h new file mode 100644 index 00000000..7d53e18a --- /dev/null +++ b/pjsip-apps/src/vidgui/vidgui.h @@ -0,0 +1,93 @@ +/* $Id$ */ +/* + * Copyright (C) 2011-2011 Teluu Inc. (http://www.teluu.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef VIDGUI_H_ +#define VIDGUI_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class VidWin; + +class MainWin : public QWidget +{ + Q_OBJECT + +public: + MainWin(QWidget *parent = 0); + virtual ~MainWin(); + + static MainWin *instance(); + + bool initStack(); + void showError(const char *title, pj_status_t status); + void showStatus(const char *); + +public: + void on_reg_state(pjsua_acc_id acc_id); + void on_call_state(pjsua_call_id call_id, pjsip_event *e); + void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, pjsip_rx_data *rdata); + void on_call_media_state(pjsua_call_id call_id); + +public slots: + void preview(); + void call(); + void hangup(); + void quit(); + +private: + static MainWin *theInstance_; + pjsua_acc_id accountId_; + pjsua_call_id currentCall_; + bool preview_on; + + void onNewCall(pjsua_call_id cid, bool incoming); + void onCallReleased(); + +private: + QPushButton *callButton_, + *hangupButton_, + *quitButton_, + *previewButton_; + QLineEdit *url_; + VidWin *video_; + VidWin *video_prev_; + //QStatusBar *statusBar_; + QLabel *statusBar_; + QLabel *localUri_; + + QVBoxLayout *vbox_left; + + void initLayout(); + void init_video_window(); +}; + + + +#endif /* VIDGUI_H_ */ -- cgit v1.2.3