Skip to content

Commit

Permalink
Merge tag '2022.6.0' into support/hololens2
Browse files Browse the repository at this point in the history
2022.6.0
  • Loading branch information
melpon committed Dec 8, 2022
2 parents db9344d + 1f982b4 commit d21f4ee
Show file tree
Hide file tree
Showing 19 changed files with 1,912 additions and 1,802 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/_source
/_build
/_install
*.swp
/Sora/Generated
/_source
/_build
/_install
*.swp
/Sora/Generated
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@

## develop

## 2022.6.0 (2022-12-08)

- [ADD] 実行時に音声と映像のミュート、ミュート解除をする機能を追加
- @melpon

## 2022.5.2 (2022-10-04)

- [FIX] UnityCameraCapturer がマルチスレッド下で正常に終了しないことがあるのを修正
- @melpon

## 2022.5.1 (2022-09-24)

- [UPDATE] Sora C++ SDK を `2022.12.1` に上げる
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use

## システム条件

- Sora 2022.1.1 以降
- WebRTC SFU Sora 2022.1.3 以降

## 対応プラットフォーム

Expand Down Expand Up @@ -95,6 +95,11 @@ Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use
- H.264 のハードウェアエンコードへの対応
- H.264 のハードウェアデコードへの対応

## Sora Unity SDK for MS Hololens2

- [support/hololens2](https://github.com/shiguredo/sora-unity-sdk/tree/support/hololens2) ブランチの修正や改善は有償でお受けしています
- 継続的な有償サポートは提供しておりません

## 有償での優先実装

- Windows 版 NVIDIA VIDEO CODEC SDK による H.264 エンコーダ対応
Expand All @@ -107,6 +112,8 @@ Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use
- [株式会社KDDIテクノロジー](https://kddi-tech.com/)
- Android OpenGL ES 対応
- 企業名非公開
- Microsoft HoloLens 2 対応
- [NTTコノキュー](https://www.nttqonoq.com/)

## 有償での優先実装が可能な機能一覧

Expand Down Expand Up @@ -154,3 +161,4 @@ See the License for the specific language governing permissions and
limitations under the License.
```


88 changes: 44 additions & 44 deletions Sora/Editor/SoraUnitySdkPostProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
#if UNITY_IOS

using UnityEngine;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using UnityEditor.Callbacks;

public class SoraUnitySdkPostProcessor
{
[PostProcessBuildAttribute(500)]
public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
{
if (buildTarget != BuildTarget.iOS)
{
return;
}

var projPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromFile(projPath);
#if UNITY_2019_3_OR_NEWER
string guid = proj.GetUnityFrameworkTargetGuid();
#else
string guid = proj.TargetGuidByName("Unity-iPhone");
#endif

proj.AddBuildProperty(guid, "OTHER_LDFLAGS", "-ObjC");
proj.SetBuildProperty(guid, "ENABLE_BITCODE", "NO");
proj.AddFrameworkToProject(guid, "VideoToolbox.framework", false);
proj.AddFrameworkToProject(guid, "GLKit.framework", false);
proj.AddFrameworkToProject(guid, "Network.framework", false);
// libwebrtc.a には新しい libvpx が、libiPhone-lib.a には古い libvpx が入っていて、
// デフォルトのリンク順序だと古い libvpx が使われてしまう。
// それを回避するために libiPhone-lib.a を削除して新しく追加し直すことで
// リンク順序を変えてやる。
string fileGuid = proj.FindFileGuidByProjectPath("Libraries/libiPhone-lib.a");
proj.RemoveFileFromBuild(guid, fileGuid);
proj.AddFileToBuild(guid, fileGuid);

proj.WriteToFile(projPath);
}
}

#endif
#if UNITY_IOS

using UnityEngine;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using UnityEditor.Callbacks;

public class SoraUnitySdkPostProcessor
{
[PostProcessBuildAttribute(500)]
public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject)
{
if (buildTarget != BuildTarget.iOS)
{
return;
}

var projPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromFile(projPath);
#if UNITY_2019_3_OR_NEWER
string guid = proj.GetUnityFrameworkTargetGuid();
#else
string guid = proj.TargetGuidByName("Unity-iPhone");
#endif

proj.AddBuildProperty(guid, "OTHER_LDFLAGS", "-ObjC");
proj.SetBuildProperty(guid, "ENABLE_BITCODE", "NO");
proj.AddFrameworkToProject(guid, "VideoToolbox.framework", false);
proj.AddFrameworkToProject(guid, "GLKit.framework", false);
proj.AddFrameworkToProject(guid, "Network.framework", false);
// libwebrtc.a には新しい libvpx が、libiPhone-lib.a には古い libvpx が入っていて、
// デフォルトのリンク順序だと古い libvpx が使われてしまう。
// それを回避するために libiPhone-lib.a を削除して新しく追加し直すことで
// リンク順序を変えてやる。
string fileGuid = proj.FindFileGuidByProjectPath("Libraries/libiPhone-lib.a");
proj.RemoveFileFromBuild(guid, fileGuid);
proj.AddFileToBuild(guid, fileGuid);

proj.WriteToFile(projPath);
}
}

#endif
20 changes: 20 additions & 0 deletions Sora/Sora.cs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,18 @@ public static bool IsH264Supported()
return sora_is_h264_supported() != 0;
}

public bool AudioEnabled
{
get { return sora_get_audio_enabled(p) != 0; }
set { sora_set_audio_enabled(p, value ? 1 : 0); }
}

public bool VideoEnabled
{
get { return sora_get_video_enabled(p) != 0; }
set { sora_set_video_enabled(p, value ? 1 : 0); }
}

#if UNITY_IOS && !UNITY_EDITOR
private const string DllName = "__Internal";
#else
Expand Down Expand Up @@ -734,4 +746,12 @@ public static bool IsH264Supported()
private static extern int sora_device_enum_audio_playout(DeviceEnumCallbackDelegate f, IntPtr userdata);
[DllImport(DllName)]
private static extern int sora_is_h264_supported();
[DllImport(DllName)]
private static extern int sora_get_audio_enabled(IntPtr p);
[DllImport(DllName)]
private static extern void sora_set_audio_enabled(IntPtr p, int enabled);
[DllImport(DllName)]
private static extern int sora_get_video_enabled(IntPtr p);
[DllImport(DllName)]
private static extern void sora_set_video_enabled(IntPtr p, int enabled);
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SORA_UNITY_SDK_VERSION=2022.5.1-hololens2.1
SORA_UNITY_SDK_VERSION=2022.6.0-hololens2.0
SORA_CPP_SDK_VERSION=2022.12.1-hololens2.2
WEBRTC_BUILD_VERSION=m105.5195.0.0-hololens2.1
BOOST_VERSION=1.80.0
Expand Down
Loading

0 comments on commit d21f4ee

Please sign in to comment.