This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for filename in *.mp4; do | |
mp3="${filename%.mp4}.mp3" | |
echo "$filename ===> $mp3" | |
ffmpeg -i $filename -vn $mp3 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExtraModuleNames.Add(“AgoraUnrealSample”); | |
ExtraModuleNames.Add(“AgoraPlugin”); | |
if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.Mac) | |
{ | |
bOverrideBuildEnvironment = true; | |
AdditionalCompilerArguments = “-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor”; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input: [1,2] | |
public static int[] ParseOneDimArray(string str) | |
{ | |
string text = str.Substring(1, str.Length-2); | |
int [] arrayint = text.Split(',').Select(x=> int.Parse(x)).ToArray(); | |
return arrayint; | |
} | |
// input: [[1,2],[3,4]] | |
public static int[][] ParseTwoDimArray(string str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Runtime.InteropServices; | |
using UnityEngine.UI; | |
/**!! This version of the script is non-official. use it on your own risk! */ | |
/* | |
* This example script demonstrates how to attachThis example | |
* video content to a 3D object (chenzhenyong@agora.io) | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
using agora_gaming_rtc; | |
using agora_utilities; | |
using System; | |
using System.Collections; | |
// this is an example of using Agora Unity SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region =========== Push Video ================= | |
public const TextureFormat ConvertFormat = TextureFormat.BGRA32; // RGBA will be compatible with Web | |
public const VIDEO_PIXEL_FORMAT PixelFormat = VIDEO_PIXEL_FORMAT.VIDEO_PIXEL_BGRA; // note: RGBA is available from v3.0.1 and on | |
Texture2D BufferTexture; | |
bool _isRunning; | |
IEnumerator CoShareRenderData() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Push frame to the remote client | |
IEnumerator PushFrame(byte[] bytes, int width, int height, System.Action onFinish) | |
{ | |
if (bytes == null || bytes.Length == 0) | |
{ | |
Debug.LogError("Zero bytes found!!!!"); | |
yield break; | |
} | |
IRtcEngine rtc = IRtcEngine.QueryEngine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string AppID; | |
public string ChannelName; | |
VideoSurface myView; | |
VideoSurface remoteView; | |
IRtcEngine mRtcEngine; | |
void Awake() | |
{ | |
// SetupUI(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get Image from the AR Camera, extract the raw data from the image | |
private unsafe void CaptureARBuffer() | |
{ | |
// Get the image in the ARSubsystemManager.cameraFrameReceived callback | |
XRCameraImage image; | |
if (!cameraManager.TryGetLatestImage(out image)) | |
{ | |
Debug.LogWarning("Capture AR Buffer returns nothing!!!!!!"); | |
return; |
NewerOlder