Skip to content

Commit 9df8828

Browse files
committed
update 1.0.2
1 parent b59e6c2 commit 9df8828

File tree

15 files changed

+823
-725
lines changed

15 files changed

+823
-725
lines changed

Assets/FfmpegWithOpenCVForUnityExample/ArUcoCameraCalibrationFfplayExample/ArUcoCameraCalibrationFfplayExample.unity

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7784,7 +7784,7 @@ GameObject:
77847784
- component: {fileID: 1709852092}
77857785
- component: {fileID: 1709852090}
77867786
- component: {fileID: 1709852088}
7787-
- component: {fileID: 1709852089}
7787+
- component: {fileID: 1709852091}
77887788
- component: {fileID: 1709852087}
77897789
- component: {fileID: 1709852086}
77907790
m_Layer: 0
@@ -7977,14 +7977,14 @@ MonoBehaviour:
79777977
m_GameObject: {fileID: 1709852081}
79787978
m_Enabled: 0
79797979
m_EditorHideFlags: 0
7980-
m_Script: {fileID: 11500000, guid: 1074a08d2e8cd1746aad9fd5ad2b81d3, type: 3}
7980+
m_Script: {fileID: 11500000, guid: d76800fe878d16d489b8dba9e80d8f79, type: 3}
79817981
m_Name:
79827982
m_EditorClassIdentifier:
7983-
ExecuteOnStart: 0
7983+
ExecuteOnStart: 1
79847984
Options: -rtsp_transport tcp
79857985
DefaultPath: 0
79867986
InputPath: rtsp://atomcam.local:8554/video0_unicast
7987-
VideoTexture: {fileID: 1709852088}
7987+
VideoTexture: {fileID: 0}
79887988
AudioSourceComponent: {fileID: 1709852086}
79897989
PrintStdErr: 0
79907990
--- !u!114 &1709852088
@@ -8000,25 +8000,6 @@ MonoBehaviour:
80008000
m_Name:
80018001
m_EditorClassIdentifier:
80028002
VideoTexture: {fileID: 0}
8003-
--- !u!114 &1709852089
8004-
MonoBehaviour:
8005-
m_ObjectHideFlags: 0
8006-
m_CorrespondingSourceObject: {fileID: 0}
8007-
m_PrefabInstance: {fileID: 0}
8008-
m_PrefabAsset: {fileID: 0}
8009-
m_GameObject: {fileID: 1709852081}
8010-
m_Enabled: 1
8011-
m_EditorHideFlags: 0
8012-
m_Script: {fileID: 11500000, guid: 1074a08d2e8cd1746aad9fd5ad2b81d3, type: 3}
8013-
m_Name:
8014-
m_EditorClassIdentifier:
8015-
ExecuteOnStart: 0
8016-
Options:
8017-
DefaultPath: 1
8018-
InputPath: OpenCVForUnity/768x576_mjpeg.mjpeg
8019-
VideoTexture: {fileID: 1709852088}
8020-
AudioSourceComponent: {fileID: 0}
8021-
PrintStdErr: 0
80228003
--- !u!114 &1709852090
80238004
MonoBehaviour:
80248005
m_ObjectHideFlags: 0
@@ -8055,6 +8036,25 @@ MonoBehaviour:
80558036
refineMarkerDetection: 1
80568037
isImagesInputMode: 0
80578038
calibrationImagesDirectory: OpenCVForUnity/aruco/calibration_images
8039+
--- !u!114 &1709852091
8040+
MonoBehaviour:
8041+
m_ObjectHideFlags: 0
8042+
m_CorrespondingSourceObject: {fileID: 0}
8043+
m_PrefabInstance: {fileID: 0}
8044+
m_PrefabAsset: {fileID: 0}
8045+
m_GameObject: {fileID: 1709852081}
8046+
m_Enabled: 1
8047+
m_EditorHideFlags: 0
8048+
m_Script: {fileID: 11500000, guid: d76800fe878d16d489b8dba9e80d8f79, type: 3}
8049+
m_Name:
8050+
m_EditorClassIdentifier:
8051+
ExecuteOnStart: 1
8052+
Options:
8053+
DefaultPath: 1
8054+
InputPath: OpenCVForUnity/768x576_mjpeg.mjpeg
8055+
VideoTexture: {fileID: 0}
8056+
AudioSourceComponent: {fileID: 1709852086}
8057+
PrintStdErr: 0
80588058
--- !u!114 &1709852092
80598059
MonoBehaviour:
80608060
m_ObjectHideFlags: 0

Assets/FfmpegWithOpenCVForUnityExample/ArUcoFfplayExample/ArUcoFfplayExample.unity

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4798,8 +4798,8 @@ GameObject:
47984798
- component: {fileID: 1709852092}
47994799
- component: {fileID: 1709852090}
48004800
- component: {fileID: 1709852086}
4801+
- component: {fileID: 1709852091}
48014802
- component: {fileID: 1709852089}
4802-
- component: {fileID: 1709852093}
48034803
- component: {fileID: 1709852087}
48044804
m_Layer: 0
48054805
m_Name: Quad
@@ -5021,17 +5021,17 @@ MonoBehaviour:
50215021
m_PrefabInstance: {fileID: 0}
50225022
m_PrefabAsset: {fileID: 0}
50235023
m_GameObject: {fileID: 1709852081}
5024-
m_Enabled: 1
5024+
m_Enabled: 0
50255025
m_EditorHideFlags: 0
5026-
m_Script: {fileID: 11500000, guid: 1074a08d2e8cd1746aad9fd5ad2b81d3, type: 3}
5026+
m_Script: {fileID: 11500000, guid: d76800fe878d16d489b8dba9e80d8f79, type: 3}
50275027
m_Name:
50285028
m_EditorClassIdentifier:
5029-
ExecuteOnStart: 0
5030-
Options:
5031-
DefaultPath: 1
5032-
InputPath: OpenCVForUnity/768x576_mjpeg.mjpeg
5033-
VideoTexture: {fileID: 1709852086}
5034-
AudioSourceComponent: {fileID: 0}
5029+
ExecuteOnStart: 1
5030+
Options: -rtsp_transport tcp
5031+
DefaultPath: 0
5032+
InputPath: rtsp://atomcam.local:8554/video0_unicast
5033+
VideoTexture: {fileID: 0}
5034+
AudioSourceComponent: {fileID: 1709852087}
50355035
PrintStdErr: 0
50365036
--- !u!114 &1709852090
50375037
MonoBehaviour:
@@ -5064,6 +5064,25 @@ MonoBehaviour:
50645064
enableLowPassFilterToggle: {fileID: 2029186286}
50655065
positionLowPass: 0.005
50665066
rotationLowPass: 2
5067+
--- !u!114 &1709852091
5068+
MonoBehaviour:
5069+
m_ObjectHideFlags: 0
5070+
m_CorrespondingSourceObject: {fileID: 0}
5071+
m_PrefabInstance: {fileID: 0}
5072+
m_PrefabAsset: {fileID: 0}
5073+
m_GameObject: {fileID: 1709852081}
5074+
m_Enabled: 1
5075+
m_EditorHideFlags: 0
5076+
m_Script: {fileID: 11500000, guid: d76800fe878d16d489b8dba9e80d8f79, type: 3}
5077+
m_Name:
5078+
m_EditorClassIdentifier:
5079+
ExecuteOnStart: 1
5080+
Options:
5081+
DefaultPath: 1
5082+
InputPath: OpenCVForUnity/768x576_mjpeg.mjpeg
5083+
VideoTexture: {fileID: 0}
5084+
AudioSourceComponent: {fileID: 1709852087}
5085+
PrintStdErr: 0
50675086
--- !u!114 &1709852092
50685087
MonoBehaviour:
50695088
m_ObjectHideFlags: 0
@@ -5126,25 +5145,6 @@ MonoBehaviour:
51265145
m_StringArgument:
51275146
m_BoolArgument: 0
51285147
m_CallState: 2
5129-
--- !u!114 &1709852093
5130-
MonoBehaviour:
5131-
m_ObjectHideFlags: 0
5132-
m_CorrespondingSourceObject: {fileID: 0}
5133-
m_PrefabInstance: {fileID: 0}
5134-
m_PrefabAsset: {fileID: 0}
5135-
m_GameObject: {fileID: 1709852081}
5136-
m_Enabled: 0
5137-
m_EditorHideFlags: 0
5138-
m_Script: {fileID: 11500000, guid: 1074a08d2e8cd1746aad9fd5ad2b81d3, type: 3}
5139-
m_Name:
5140-
m_EditorClassIdentifier:
5141-
ExecuteOnStart: 0
5142-
Options: -rtsp_transport tcp
5143-
DefaultPath: 0
5144-
InputPath: rtsp://atomcam.local:8554/video0_unicast
5145-
VideoTexture: {fileID: 1709852086}
5146-
AudioSourceComponent: {fileID: 1709852087}
5147-
PrintStdErr: 0
51485148
--- !u!1 &1793984378
51495149
GameObject:
51505150
m_ObjectHideFlags: 0
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
using FfmpegUnity;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
using UnityEditor;
5+
using UnityEngine;
6+
7+
namespace FfmpegWithOpenCVForUnity.UnityUtils.Helper
8+
{
9+
[CustomEditor(typeof(FfmpegGetTexturePerFrameIntPtrCommandCustom))]
10+
public class FfmpegGetTexturePerFrameIntPtrCommandCustomEditor : Editor
11+
{
12+
public override void OnInspectorGUI()
13+
{
14+
Undo.RecordObject(target, "Parameter Change");
15+
16+
EditorGUI.BeginChangeCheck();
17+
18+
FfmpegPlayerCommand ffmpegPlayerCommand = (FfmpegPlayerCommand)target;
19+
20+
ffmpegPlayerCommand.ExecuteOnStart = EditorGUILayout.Toggle("Execute On Start", ffmpegPlayerCommand.ExecuteOnStart);
21+
22+
EditorGUILayout.LabelField("Input Options");
23+
ffmpegPlayerCommand.InputOptions = EditorGUILayout.TextArea(ffmpegPlayerCommand.InputOptions);
24+
25+
ffmpegPlayerCommand.DefaultPath = (FfmpegPath.DefaultPath)EditorGUILayout.EnumPopup("Default Path", ffmpegPlayerCommand.DefaultPath);
26+
ffmpegPlayerCommand.InputPath = EditorGUILayout.TextField("Input Path", ffmpegPlayerCommand.InputPath);
27+
28+
ffmpegPlayerCommand.AutoStreamSettings = EditorGUILayout.Toggle("Auto Settings", ffmpegPlayerCommand.AutoStreamSettings);
29+
if (!ffmpegPlayerCommand.AutoStreamSettings && !EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
30+
{
31+
if (ffmpegPlayerCommand.Streams == null || ffmpegPlayerCommand.Streams.Length < 2)
32+
{
33+
ffmpegPlayerCommand.Streams = new FfmpegPlayerCommand.FfmpegStream[] {
34+
new FfmpegPlayerCommand.FfmpegStream()
35+
{
36+
CodecType = FfmpegPlayerCommand.FfmpegStream.Type.VIDEO,
37+
Width = 640,
38+
Height = 480,
39+
}
40+
};
41+
}
42+
43+
Vector2Int videoSize = EditorGUILayout.Vector2IntField("Video Size",
44+
new Vector2Int(ffmpegPlayerCommand.Streams[0].Width, ffmpegPlayerCommand.Streams[0].Height));
45+
ffmpegPlayerCommand.Streams[0].Width = videoSize.x;
46+
ffmpegPlayerCommand.Streams[0].Height = videoSize.y;
47+
48+
ffmpegPlayerCommand.FrameRate = EditorGUILayout.FloatField("Video Frame Rate", ffmpegPlayerCommand.FrameRate);
49+
}
50+
51+
EditorGUILayout.LabelField("Options");
52+
ffmpegPlayerCommand.PlayerOptions = EditorGUILayout.TextArea(ffmpegPlayerCommand.PlayerOptions);
53+
54+
ffmpegPlayerCommand.VideoBuffersCount = EditorGUILayout.IntField("Video Outputs", ffmpegPlayerCommand.VideoBuffersCount);
55+
56+
ffmpegPlayerCommand.PrintStdErr = EditorGUILayout.Toggle("Print StdErr", ffmpegPlayerCommand.PrintStdErr);
57+
58+
if (EditorGUI.EndChangeCheck())
59+
{
60+
EditorUtility.SetDirty(ffmpegPlayerCommand);
61+
}
62+
}
63+
}
64+
}

Assets/FfmpegWithOpenCVForUnityExample/Editor/FfmpegGetTexturePerFrameIntPtrCommandEditor.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)