Commit 88e87c6b authored by atraczyk's avatar atraczyk Committed by Andreas Traczyk

videopage: implement fulscreen toggle

- Adds the ability to double-click the video page in order to
  toggle full-screen mode.

- Adds .appx files to the .gitignore

- Changes the output path of libqrencode

Change-Id: I3b78fbf603df3d6ed570f0dbd551d833655cf98d
Tuleap: #1514
parent f15a1224
......@@ -80,6 +80,7 @@ artifacts/
*.pidb
*.svclog
*.scc
*.appx
# Chutzpah Test files
_Chutzpah*
......
......@@ -72,7 +72,7 @@
VerticalScrollBarVisibility="Hidden">
<StackPanel MaxWidth="500"
Width="310">
<TextBlock Text="Ring version: 2017/1/3"
<TextBlock Text="Ring version: 2017/2/13"
TextWrapping="Wrap"
TextAlignment="Justify"
Margin="0,0,0,24"
......
......@@ -20,6 +20,7 @@
#include "LoadingPage.xaml.h"
#include "MainPage.xaml.h"
#include "Wizard.xaml.h"
#include "VideoPage.xaml.h"
using namespace Windows::ApplicationModel::Core;
using namespace Windows::Foundation;
......
......@@ -11,7 +11,8 @@ public enum class CallStatus {
PAUSED,
PEER_PAUSED,
ENDED,
TERMINATING
TERMINATING,
CONNECTED
};
public enum class LookupStatus {
......
......@@ -78,6 +78,7 @@ MainPage::MainPage()
auto videoPage = dynamic_cast<VideoPage^>(_videoFrame_->Content);
videoPage->pressHangUpCall += ref new RingClientUWP::PressHangUpCall(this, &RingClientUWP::MainPage::OnpressHangUpCall);
auto messageTextFrame = dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content);
messageTextFrame->closeMessageTextPage += ref new RingClientUWP::CloseMessageTextPage(this, &RingClientUWP::MainPage::OncloseMessageTextPage);
......@@ -102,6 +103,8 @@ MainPage::MainPage()
auto brush = ref new Windows::UI::Xaml::Media::SolidColorBrush(col);
_loadingStatus_->Foreground = brush;
});
RingD::instance->toggleFullScreen += ref new RingClientUWP::ToggleFullScreen(this, &RingClientUWP::MainPage::OnToggleFullScreen);
}
void
......@@ -378,3 +381,17 @@ void RingClientUWP::MainPage::OnvolatileDetailsChanged(const std::string &accoun
{
showLoadingOverlay(false, false);
}
void RingClientUWP::MainPage::OnToggleFullScreen(bool state)
{
static bool openState;
if (state == true) {
openState = _innerSplitView_->IsPaneOpen;
_innerSplitView_->IsPaneOpen = false;
_innerSplitView_->CompactPaneLength = 0;
}
else {
_innerSplitView_->IsPaneOpen = openState;
_innerSplitView_->CompactPaneLength = 60;
}
}
\ No newline at end of file
......@@ -64,6 +64,7 @@ private:
void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
void OnsummonMessageTextPage();
void OnToggleFullScreen(bool state);
void OnsummonWelcomePage();
void OnsummonPreviewPage();
void OnhidePreviewPage();
......
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap uap3 mp">
<Identity Name="Savoir-faireLinux.GNURing" Publisher="CN=8121A5F7-3CA1-4CAA-92B2-4F595B011941" Version="1.1.21.0" />
<Identity Name="Savoir-faireLinux.GNURing" Publisher="CN=8121A5F7-3CA1-4CAA-92B2-4F595B011941" Version="1.1.62.0" />
<mp:PhoneIdentity PhoneProductId="2385953f-9019-423d-aa82-d1bbacfa258b" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>GNU Ring</DisplayName>
......
......@@ -47,14 +47,13 @@ using namespace RingClientUWP;
using namespace RingClientUWP::Utils;
using namespace RingClientUWP::ViewModel;
using namespace Windows::UI::ViewManagement;
using namespace Windows::System;
void
RingClientUWP::RingD::reloadAccountList()
{
//RingClientUWP::ViewModel::AccountsViewModel::instance->clearAccountList();
std::vector<std::string> accountList = DRing::getAccountList();
/* if for any reason there is no account at all, screen the wizard */
......@@ -593,13 +592,13 @@ RingD::registerCallbacks()
static const unsigned int profileSize = VCardUtils::PROFILE_VCF.size();
for (auto i : payloads) {
MSG_(i.first);
if (i.first.compare(0, profileSize, VCardUtils::PROFILE_VCF) == 0) {
MSG_("payload.first = " + i.first);
MSG_("payload.second = " + i.second);
int res = contact->getVCard()->receiveChunk(i.first, i.second);
return;
}
auto payload = Utils::toPlatformString(i.second);
CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(
CoreDispatcherPriority::High, ref new DispatchedHandler([=]()
......@@ -1343,7 +1342,6 @@ RingClientUWP::CallStatus RingClientUWP::RingD::translateCallStatus(String^ stat
if (state == "PEER_PAUSED")
return CallStatus::PEER_PAUSED;
return CallStatus::NONE;
}
......@@ -1367,3 +1365,22 @@ Vector<String^>^ RingClientUWP::RingD::translateKnownRingDevices(const std::map<
return devicesList;
}
void RingClientUWP::RingD::raiseToggleFullScreen()
{
ApplicationView^ view = ApplicationView::GetForCurrentView();
if (view->IsFullScreenMode) {
view->ExitFullScreenMode();
toggleFullScreen(false);
MSG_("Successfully exited fullscreen");
}
else {
if (view->TryEnterFullScreenMode()) {
MSG_("Successfully entered fullscreen");
toggleFullScreen(true);
}
else {
ERR_("Unsuccessfully entered fullscreen");
}
}
}
......@@ -54,6 +54,7 @@ delegate void CallsListRecieved(const std::vector<std::string>& callsList);
delegate void AudioMuted(const std::string& callId, bool state);
delegate void VideoMuted(const std::string& callId, bool state);
delegate void NameRegistred(bool status);
delegate void ToggleFullScreen(bool state);
delegate void VolatileDetailsChanged(const std::string& accountId, const std::map<std::string, std::string>& details);
using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
......@@ -139,6 +140,8 @@ internal:
String^ getUserName();
Vector<String^>^ translateKnownRingDevices(const std::map<std::string, std::string> devices);
void raiseToggleFullScreen();
void hangUpCall2(String^ callId);
void pauseCall(String ^ callId);
void unPauseCall(String ^ callId);
......@@ -183,6 +186,7 @@ internal:
event AudioMuted^ audioMuted;
event VideoMuted^ videoMuted;
event NameRegistred^ nameRegistred;
event ToggleFullScreen^ toggleFullScreen;
event VolatileDetailsChanged^ volatileDetailsChanged;
private:
......
......@@ -60,7 +60,7 @@ VideoCaptureManager::VideoCaptureManager():
})
{
deviceList = ref new Vector<Device^>();
InitializeCopyFrameDispatcher(30);
InitializeCopyFrameDispatcher(60);
captureTaskTokenSource = new cancellation_token_source();
}
......
......@@ -174,7 +174,9 @@
<!-- video -->
<Image Name="IncomingVideoImage"
Grid.Column="0"
Canvas.ZIndex="-1"/>
Canvas.ZIndex="-1"
DoubleTapped="IncomingVideoImage_DoubleTapped"
/>
<TextBlock Name="_callPaused_"
Grid.Column="0"
Text="&#xE769;"
......
......@@ -135,12 +135,17 @@ VideoPage::VideoPage()
break;
}
case CallStatus::ENDED:
{
Video::VideoManager::instance->rendererManager()->raiseClearRenderTarget();
if (Windows::UI::ViewManagement::ApplicationView::GetForCurrentView()->IsFullScreen)
RingD::instance->raiseToggleFullScreen();
/* "close" the chat panel */
_rowChatBx_->Height = 0;
break;
}
case CallStatus::PEER_PAUSED:
case CallStatus::PAUSED:
_callPaused_->Visibility = Windows::UI::Xaml::Visibility::Visible;
......@@ -449,3 +454,9 @@ void RingClientUWP::Views::VideoPage::OnvideoMuted(const std::string &callId, bo
_txbkVideoMuted_->Visibility = (state) ? Windows::UI::Xaml::Visibility::Visible
: Windows::UI::Xaml::Visibility::Collapsed;
}
void RingClientUWP::Views::VideoPage::IncomingVideoImage_DoubleTapped(Platform::Object^ sender, Windows::UI::Xaml::Input::DoubleTappedRoutedEventArgs^ e)
{
RingD::instance->raiseToggleFullScreen();
}
\ No newline at end of file
......@@ -112,6 +112,7 @@ private:
void _btnMicrophone__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void OnaudioMuted(const std::string &callId, bool state);
void OnvideoMuted(const std::string &callId, bool state);
void IncomingVideoImage_DoubleTapped(Platform::Object^ sender, Windows::UI::Xaml::Input::DoubleTappedRoutedEventArgs^ e);
};
}
}
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -38,6 +38,7 @@
<ProjectGuid>{9A90BF5C-84B0-41F6-B83C-C20EADC1F46C}</ProjectGuid>
<RootNamespace>qrcodelib</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|Win32'" Label="Configuration">
......@@ -139,6 +140,9 @@
<OutDir>../.build/$(Configuration)\</OutDir>
<IntDir>../.build/$(ProjectName)/$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Lib|x64'">
<OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Dll|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
......
......@@ -9,9 +9,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ring-client-uwp", "ring-cli
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ring-daemon", "..\ring-daemon\MSVC\ring-daemon.vcxproj", "{79F8DE42-595D-49D9-A66F-55244FD9DCC3}"
ProjectSection(ProjectDependencies) = postProject
{6BD59A09-0768-40D3-A04B-10F95555689B} = {6BD59A09-0768-40D3-A04B-10F95555689B}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contrib daemon", "contrib daemon", "{96846C59-E0A1-4132-B779-065C2EAE3E51}"
EndProject
......
......@@ -147,7 +147,7 @@
<CompileAsWinRT>true</CompileAsWinRT>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)..\ring-daemon\contrib\build\boost\stage\lib;$(SolutionDir)..\ring-daemon\contrib\build\bin\x64;$(SolutionDir)..\ring-daemon\contrib\build\lib\x64;$(SolutionDir)..\ring-daemon\MSVC\x64\ReleaseLib\bin;$(SolutionDir)x64\Release-Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)..\ring-daemon\contrib\build\boost\stage\lib;$(SolutionDir)..\ring-daemon\contrib\build\bin\x64;$(SolutionDir)..\ring-daemon\contrib\build\lib\x64;$(SolutionDir)..\ring-daemon\MSVC\x64\ReleaseLib\bin;$(SolutionDir)x64\Release-Lib;$(SolutionDir)contrib\qrencode-win32\vc8\qrcodelib\x64\Release-Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
......@@ -267,6 +267,9 @@
<None Include="..\ring-daemon\contrib\build\FFmpegInterop\ffmpeg\Build\Windows10\x64\bin\avutil-55.dll">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="..\ring-daemon\contrib\build\FFmpegInterop\ffmpeg\Build\Windows10\x64\bin\postproc-54.dll">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
</None>
<None Include="..\ring-daemon\contrib\build\FFmpegInterop\ffmpeg\Build\Windows10\x64\bin\swresample-2.dll">
<DeploymentContent>true</DeploymentContent>
</None>
......
......@@ -250,6 +250,9 @@
<None Include="..\ring-daemon\contrib\build\FFmpegInterop\ffmpeg\Build\Windows10\x64\bin\swscale-4.dll">
<Filter>Assets\Dlls</Filter>
</None>
<None Include="..\ring-daemon\contrib\build\FFmpegInterop\ffmpeg\Build\Windows10\x64\bin\postproc-54.dll">
<Filter>Assets\Dlls</Filter>
</None>
<None Include="..\ring-daemon\contrib\build\restbed\dependency\openssl\out32dll\libeay32.dll">
<Filter>Assets\Dlls</Filter>
</None>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment