Skip to content

Commit

Permalink
Merge pull request #3 from Init-INK/master
Browse files Browse the repository at this point in the history
添加小班课功能
  • Loading branch information
elesos authored Jun 24, 2019
2 parents 62e7379 + 5ee170b commit 4c8d849
Show file tree
Hide file tree
Showing 47 changed files with 293 additions and 39 deletions.
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# starrtc windows示例程序


![主界面](assets/主界面.png)
![主界面](assets/demo.png)

本产品完全免费,并且提供免费的私有部署服务端程序,支持全部功能,并提供第三方拉流、推流功能。

Expand All @@ -28,9 +28,12 @@ https://github.com/starrtc/starrtc-server

IM
====
![IM_一对一](assets/IM_一对一.png)
![IM_一对一](assets/IM_OneToOne.png)

![聊天室](assets/聊天室.png)
聊天室
====

![聊天室](assets/Chatroom.png)

VOIP视频通话
====
Expand All @@ -39,17 +42,29 @@ VOIP视频通话

多人会议
====
![多人会议](assets/多人会议.png)
![多人会议](assets/Meeting.png)


互动直播
====
![互动直播](assets/互动直播.png)
![互动直播](assets/Live.png)


监控
====
![监控](assets/监控.png)
![监控](assets/Monitor.png)

语音聊天室
====
![语音聊天室](assets/AudioChatroom.png)

内网直连
====

小班课
====
![监控](assets/MinClass.png)


更新记录
=====
Expand Down
Binary file added assets/AudioChatroom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/MinClass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added assets/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/主界面.png
Binary file not shown.
Binary file modified release/starrtc-demo/libstarRTC.dll
Binary file not shown.
Binary file modified release/starrtc-demo/starrtccoreDll.dll
Binary file not shown.
Binary file modified release/starrtc-demo/starrtcdemo.exe
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/CAudioChatroomDlg.cpp
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/CChatroomDlg.cpp
Binary file not shown.
6 changes: 5 additions & 1 deletion starrtcdemo/starrtcdemo/CDataControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ DWORD WINAPI GetCameraDataThread(LPVOID p)
Mat frame;

CImage image;
pDataControl->addUpId();
if (pDataControl->m_bInsertData)
{
pDataControl->addUpId();
}

while (pDataControl->m_bExit == false && pDataControl->m_bStop == false)
{
cap >> frame;
Expand Down
2 changes: 1 addition & 1 deletion starrtcdemo/starrtcdemo/CDataShowView.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CDataShowView
int getUserCount();
string changeShowStyle(string strUserId, bool bBigPic);
void setDrawRect(CRect drawRect);
void setShowPictures();
virtual void setShowPictures();
void drawPic(YUV_TYPE type, string userId, int w, int h, uint8_t* videoData, int videoDataLen);
void drawPic(string userId, int w, int h, CImage image);
public:
Expand Down
17 changes: 15 additions & 2 deletions starrtcdemo/starrtcdemo/CInterfaceUrls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void CInterfaceUrls::demoRequestMiniClassList(list<ChatroomInfo>& listData, CUse
{
listData.clear();
string strData = "appid=";
strData = strData + pUserManager->m_ServiceParam.m_strAgentId.c_str();
strData = strData + "stargWeHN8Y7";

CString strContent = "";
CHttpClient httpClient;
Expand Down Expand Up @@ -415,6 +415,19 @@ void CInterfaceUrls::demoRequestAudioLiveList(list<ChatroomInfo>& listData, CUse
{
livePro.m_strCreaterId = data[i]["Creator"].asCString();
}
if (data[i].isMember("liveState"))
{
string strStatus = data[i]["liveState"].asCString();
if (strStatus == "1")
{
livePro.m_bLive = true;
}
else
{
livePro.m_bLive = false;
}
}


listData.push_back(livePro);
}
Expand Down Expand Up @@ -452,7 +465,7 @@ void CInterfaceUrls::demoReportAudioLive(string liveID, string liveName, string
//上报小班课
void CInterfaceUrls::demoReportMiniClass(string liveID, string liveName, string creatorID, CUserManager* pUserManager)
{
string url = REPORT_MINI_CLASS_INFO_URL + "?ID=" + liveID + "&Name=" + liveName + "&Creator=" + creatorID + "&appid=" + pUserManager->m_ServiceParam.m_strAgentId;
string url = REPORT_MINI_CLASS_INFO_URL + "?ID=" + liveID + "&Name=" + liveName + "&Creator=" + creatorID + "&appid=" + "stargWeHN8Y7";
string strData = "";
std::string strVal = "";
std::string strErrInfo = "";
Expand Down
41 changes: 41 additions & 0 deletions starrtcdemo/starrtcdemo/CMinClassDataShowView.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#include "stdafx.h"
#include "CMinClassDataShowView.h"


CMinClassDataShowView::CMinClassDataShowView()
{
}


CMinClassDataShowView::~CMinClassDataShowView()
{
}

void CMinClassDataShowView::setShowPictures()
{
CUpUserInfo* pUpUserInfo = NULL;
int useIndex = 1;
EnterCriticalSection(&m_critPicture);
int nSize = (int)m_upUserInfoArr.size();
CRect rect = m_DrawRect;

int nHeight = (int)(rect.Height()*0.25f);
if (nSize > 4)
{
nHeight = (int)(rect.Height()/ (float)nSize);
}

for (int i = 0; i < nSize; i++)
{
CRect smallRect;
smallRect.left = rect.left;
smallRect.top = rect.top + i *nHeight;
smallRect.right = rect.right;
smallRect.bottom = smallRect.top + nHeight;
m_upUserInfoArr[i]->m_showRect = smallRect;
m_upUserInfoArr[i]->m_pPictureControl->MoveWindow(smallRect);
m_upUserInfoArr[i]->m_pPictureControl->ShowWindow(SW_SHOW);

}
LeaveCriticalSection(&m_critPicture);
}
12 changes: 12 additions & 0 deletions starrtcdemo/starrtcdemo/CMinClassDataShowView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once
#include "CDataShowView.h"
class CMinClassDataShowView :
public CDataShowView
{
public:
CMinClassDataShowView();
virtual ~CMinClassDataShowView();

virtual void setShowPictures();
};

Binary file added starrtcdemo/starrtcdemo/CMinClassDlg.cpp
Binary file not shown.
Binary file added starrtcdemo/starrtcdemo/CMinClassDlg.h
Binary file not shown.
Binary file added starrtcdemo/starrtcdemo/CMinClassListDlg.cpp
Binary file not shown.
Binary file added starrtcdemo/starrtcdemo/CMinClassListDlg.h
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/CMultipleMeetingDialog.cpp
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/CStarRTCMenuDialog.cpp
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/CStarRTCMenuDialog.h
Binary file not shown.
71 changes: 71 additions & 0 deletions starrtcdemo/starrtcdemo/CStarWhitePanel.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#include "stdafx.h"
#include "CStarWhitePanel.h"


CStarWhitePanel::CStarWhitePanel()
{
m_bDraw = false;
m_bLaserOn = false;
}


CStarWhitePanel::~CStarWhitePanel()
{
m_bDraw = false;
}
BEGIN_MESSAGE_MAP(CStarWhitePanel, CStatic)
ON_WM_LBUTTONDOWN()
ON_WM_MOUSEMOVE()
ON_WM_LBUTTONUP()
//ON_WM_PAINT()
END_MESSAGE_MAP()


void CStarWhitePanel::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
AfxMessageBox("111");
m_bDraw = true;
m_StartPoint = point;
CStatic::OnLButtonDown(nFlags, point);
}


void CStarWhitePanel::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CClientDC dc(this);
if (m_bDraw)
{
dc.MoveTo(m_StartPoint);
dc.LineTo(point);
m_StartPoint = point;
}
CStatic::OnMouseMove(nFlags, point);
}


void CStarWhitePanel::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
m_bDraw = false;
CStatic::OnLButtonUp(nFlags, point);
}
//
//
//void CStarWhitePanel::OnPaint()
//{
// CPaintDC dc(this);
// //dc.SetBkMode(TRANSPARENT);
//}
//
//打开激光笔
void CStarWhitePanel::laserPenOn()
{
m_bLaserOn = true;
}
//关闭激光笔
void CStarWhitePanel::laserPenOff()
{
m_bLaserOn = false;
}
27 changes: 27 additions & 0 deletions starrtcdemo/starrtcdemo/CStarWhitePanel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once
#include <afxwin.h>


class CStarWhitePanel :
public CStatic
{
public:
CStarWhitePanel();
~CStarWhitePanel();
DECLARE_MESSAGE_MAP()
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//afx_msg void OnPaint();
public:
//´ňżŞź¤šâąĘ
void laserPenOn();
//šŘąŐź¤šâąĘ
void laserPenOff();

private:
bool m_bDraw;
bool m_bLaserOn;
CPoint m_StartPoint;
};

Binary file added starrtcdemo/starrtcdemo/CWhitePanelDlg.cpp
Binary file not shown.
Binary file added starrtcdemo/starrtcdemo/CWhitePanelDlg.h
Binary file not shown.
22 changes: 22 additions & 0 deletions starrtcdemo/starrtcdemo/IWhitePanelCallback.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once
#include "WhitePanelActionType.h"
#include "atltypes.h"
class CScreenPoint
{
public:
double x;
double y;
};

class CWhitePanelInfo
{
public:
WHITE_PANEL_ACTION type;
CScreenPoint point;
int lineColor;
};
class IWhitePanelCallback
{
public:
virtual void actionCallback(WHITE_PANEL_ACTION type, CScreenPoint& point, int lineColor) = 0;
};
20 changes: 20 additions & 0 deletions starrtcdemo/starrtcdemo/WhitePanelActionType.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once


enum WHITE_PANEL_ACTION {
WHITE_PANEL_EMPTY, //0 无
WHITE_PANEL_START, //1 笔画起点
WHITE_PANEL_MOVE, //2 笔画移动
WHITE_PANEL_END, //3 笔画终点
WHITE_PANEL_REVOKE, //4 撤销
WHITE_PANEL_SERIAL, //5
WHITE_PANEL_CLEAR, //6 清除
WHITE_PANEL_CLEAR_ACK, //7 清除反馈
WHITE_PANEL_SYNC_REQUEST, //8 同步请求
WHITE_PANEL_SYNC, //9 同步
WHITE_PANEL_SYNC_PREPARE, //10 同步准备
WHITE_PANEL_SYNC_PREPARE_ACK,//11 同步准备反馈
WHITE_PANEL_LASER_PEN, //12 激光笔
WHITE_PANEL_LASER_PEN_END, //13 激光笔结束
WHITE_PANEL_FILE //14 文件
};
Binary file removed starrtcdemo/starrtcdemo/chatDB.db
Binary file not shown.
21 changes: 0 additions & 21 deletions starrtcdemo/starrtcdemo/param.ini

This file was deleted.

Binary file modified starrtcdemo/starrtcdemo/resource.h
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/starrtcdemo.aps
Binary file not shown.
Binary file modified starrtcdemo/starrtcdemo/starrtcdemo.rc
Binary file not shown.
13 changes: 12 additions & 1 deletion starrtcdemo/starrtcdemo/starrtcdemo.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@
<ClInclude Include="CLiveUserInfo.h" />
<ClInclude Include="CLocalDataControlListener.h" />
<ClInclude Include="CMessageBean.h" />
<ClInclude Include="CMinClassDataShowView.h" />
<ClInclude Include="CMinClassDlg.h" />
<ClInclude Include="CMinClassListDlg.h" />
<ClInclude Include="CMultipleMeetingDialog.h" />
<ClInclude Include="CNewDlg.h" />
<ClInclude Include="CPicControl.h" />
Expand All @@ -264,23 +267,26 @@
<ClInclude Include="CSoundManager.h" />
<ClInclude Include="CSqliteDB.h" />
<ClInclude Include="CStarRTCMenuDialog.h" />
<ClInclude Include="CStarWhitePanel.h" />
<ClInclude Include="CUserInformation.h" />
<ClInclude Include="CVoipDataShowView.h" />
<ClInclude Include="CVoipDlg.h" />
<ClInclude Include="CVoipP2PDlg.h" />
<ClInclude Include="CvvImage.h" />
<ClInclude Include="CWhitePanelDlg.h" />
<ClInclude Include="HttpClient.h" />
<ClInclude Include="IButtonCallback.h" />
<ClInclude Include="IShowLiveCallback.h" />
<ClInclude Include="ISoundCallback.h" />
<ClInclude Include="json\json.h" />
<ClInclude Include="IWhitePanelCallback.h" />
<ClInclude Include="PlaySound.h" />
<ClInclude Include="RecodeSound.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="starrtcdemo.h" />
<ClInclude Include="starrtcdemoDlg.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="WhitePanelActionType.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CAudioChatroomDlg.cpp" />
Expand All @@ -301,6 +307,9 @@
<ClCompile Include="CInterfaceUrls.cpp" />
<ClCompile Include="CLiveProgram.cpp" />
<ClCompile Include="CMessageBean.cpp" />
<ClCompile Include="CMinClassDataShowView.cpp" />
<ClCompile Include="CMinClassDlg.cpp" />
<ClCompile Include="CMinClassListDlg.cpp" />
<ClCompile Include="CMultipleMeetingDialog.cpp" />
<ClCompile Include="CNewDlg.cpp" />
<ClCompile Include="CPicControl.cpp" />
Expand All @@ -314,10 +323,12 @@
<ClCompile Include="CSoundManager.cpp" />
<ClCompile Include="CSqliteDB.cpp" />
<ClCompile Include="CStarRTCMenuDialog.cpp" />
<ClCompile Include="CStarWhitePanel.cpp" />
<ClCompile Include="CVoipDataShowView.cpp" />
<ClCompile Include="CVoipDlg.cpp" />
<ClCompile Include="CVoipP2PDlg.cpp" />
<ClCompile Include="CvvImage.cpp" />
<ClCompile Include="CWhitePanelDlg.cpp" />
<ClCompile Include="HttpClient.cpp" />
<ClCompile Include="PlaySound.cpp" />
<ClCompile Include="RecodeSound.cpp" />
Expand Down
Loading

0 comments on commit 4c8d849

Please sign in to comment.