Skip to content

Commit 07fb9d2

Browse files
committed
completed renaming source to input
1 parent 965e046 commit 07fb9d2

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

source/Core/FrameRecorder/Core/Engine/Recorder.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public abstract class Recorder : ScriptableObject
2020

2121
public int recordedFramesCount { get; set; }
2222

23-
protected List<RecorderInput> m_Sources;
23+
protected List<RecorderInput> m_Inputs;
2424

2525
public virtual void Reset()
2626
{
@@ -55,12 +55,12 @@ public virtual bool BeginRecording(RecordingSession session)
5555
Debug.Log("Frame recorder set fixed frame rate to " + fixedRate);
5656
}
5757

58-
m_Sources = new List<RecorderInput>();
59-
foreach (var sourceSettings in settings.m_SourceSettings)
58+
m_Inputs = new List<RecorderInput>();
59+
foreach (var inputSettings in settings.m_SourceSettings)
6060
{
61-
var source = Activator.CreateInstance(sourceSettings.inputType) as RecorderInput;
62-
source.settings = sourceSettings;
63-
m_Sources.Add(source);
61+
var input = Activator.CreateInstance(inputSettings.inputType) as RecorderInput;
62+
input.settings = inputSettings;
63+
m_Inputs.Add(input);
6464
}
6565
return recording = true;
6666
}
@@ -78,10 +78,10 @@ public virtual void EndRecording(RecordingSession ctx)
7878
Debug.Log("Frame recorder resetting fixed frame rate to original value of " + m_OriginalCaptureFrameRate);
7979
}
8080

81-
foreach (var source in m_Sources)
81+
foreach (var input in m_Inputs)
8282
{
83-
if (source is IDisposable)
84-
(source as IDisposable).Dispose();
83+
if (input is IDisposable)
84+
(input as IDisposable).Dispose();
8585
}
8686

8787
Debug.Log(string.Format("{0} recording stopped, total frame count: {1}", GetType().Name, recordedFramesCount));
@@ -103,24 +103,24 @@ public void SignalSourcesOfStage(ERecordingSessionStage stage, RecordingSession
103103
switch (stage)
104104
{
105105
case ERecordingSessionStage.BeginRecording:
106-
foreach( var source in m_Sources )
107-
source.BeginRecording(session);
106+
foreach( var input in m_Inputs )
107+
input.BeginRecording(session);
108108
break;
109109
case ERecordingSessionStage.NewFrameStarting:
110-
foreach( var source in m_Sources )
111-
source.NewFrameStarting(session);
110+
foreach( var input in m_Inputs )
111+
input.NewFrameStarting(session);
112112
break;
113113
case ERecordingSessionStage.NewFrameReady:
114-
foreach( var source in m_Sources )
115-
source.NewFrameReady(session);
114+
foreach( var input in m_Inputs )
115+
input.NewFrameReady(session);
116116
break;
117117
case ERecordingSessionStage.FrameDone:
118-
foreach( var source in m_Sources )
119-
source.FrameDone(session);
118+
foreach( var input in m_Inputs )
119+
input.FrameDone(session);
120120
break;
121121
case ERecordingSessionStage.EndRecording:
122-
foreach( var source in m_Sources )
123-
source.EndRecording(session);
122+
foreach( var input in m_Inputs )
123+
input.EndRecording(session);
124124
break;
125125
default:
126126
throw new ArgumentOutOfRangeException("stage", stage, null);

source/Core/FrameRecorder/Recorders/PNG/Engine/PNGRecorder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ string MakeFileName(RecordingSession session)
1717

1818
public override void RecordFrame(RecordingSession session)
1919
{
20-
if (m_Sources.Count != 1)
20+
if (m_Inputs.Count != 1)
2121
throw new Exception("Unsupported number of sources");
2222

23-
var source = (RenderTextureInput)m_Sources[0];
23+
var input = (RenderTextureInput)m_Inputs[0];
2424

25-
var width = source.outputRT.width;
26-
var height = source.outputRT.height;
25+
var width = input.outputRT.width;
26+
var height = input.outputRT.height;
2727
var tex = new Texture2D(width, height, TextureFormat.RGB24, false);
2828
var backupActive = RenderTexture.active;
29-
RenderTexture.active = source.outputRT;
29+
RenderTexture.active = input.outputRT;
3030
tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
3131
tex.Apply();
3232
RenderTexture.active = backupActive;

source/FrameCapturer/Recorders/EXR/EXRRecorder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ public override void EndRecording(RecordingSession session)
3636

3737
public override void RecordFrame(RecordingSession session)
3838
{
39-
if (m_Sources.Count != 1)
39+
if (m_Inputs.Count != 1)
4040
throw new Exception("Unsupported number of sources");
4141

4242
var path = BuildOutputPath(session);
43-
var source = (RenderTextureInput)m_Sources[0];
44-
var frame = source.outputRT;
43+
var input = (RenderTextureInput)m_Inputs[0];
44+
var frame = input.outputRT;
4545

4646
fcAPI.fcLock(frame, (data, fmt) =>
4747
{

source/FrameCapturer/Recorders/GIF/GIFRecorder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public override void EndRecording(RecordingSession session)
3131

3232
public override void RecordFrame(RecordingSession session)
3333
{
34-
if (m_Sources.Count != 1)
34+
if (m_Inputs.Count != 1)
3535
throw new Exception("Unsupported number of sources");
3636

37-
var source = (RenderTextureInput)m_Sources[0];
38-
var frame = source.outputRT;
37+
var input = (RenderTextureInput)m_Inputs[0];
38+
var frame = input.outputRT;
3939

4040
if(!m_ctx)
4141
{

source/FrameCapturer/Recorders/MP4/MP4Recorder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public override void EndRecording(RecordingSession session)
2929

3030
public override void RecordFrame(RecordingSession session)
3131
{
32-
if (m_Sources.Count != 1)
32+
if (m_Inputs.Count != 1)
3333
throw new Exception("Unsupported number of sources");
3434

35-
var source = (RenderTextureInput)m_Sources[0];
36-
var frame = source.outputRT;
35+
var input = (RenderTextureInput)m_Inputs[0];
36+
var frame = input.outputRT;
3737

3838
if(!m_ctx)
3939
{

source/FrameCapturer/Recorders/PNG/PNGRecorder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public override void EndRecording(RecordingSession session)
2929

3030
public override void RecordFrame(RecordingSession session)
3131
{
32-
if (m_Sources.Count != 1)
32+
if (m_Inputs.Count != 1)
3333
throw new Exception("Unsupported number of sources");
3434

3535
var path = BuildOutputPath(session);
36-
var source = (RenderTextureInput)m_Sources[0];
37-
var frame = source.outputRT;
36+
var input = (RenderTextureInput)m_Inputs[0];
37+
var frame = input.outputRT;
3838

3939
fcAPI.fcLock(frame, (data, fmt) =>
4040
{

source/FrameCapturer/Recorders/WEBM/WEBMRecorder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public override void EndRecording(RecordingSession session)
3131

3232
public override void RecordFrame(RecordingSession session)
3333
{
34-
if (m_Sources.Count != 1)
34+
if (m_Inputs.Count != 1)
3535
throw new Exception("Unsupported number of sources");
3636

37-
var source = (RenderTextureInput)m_Sources[0];
38-
var frame = source.outputRT;
37+
var input = (RenderTextureInput)m_Inputs[0];
38+
var frame = input.outputRT;
3939

4040
if (!m_ctx)
4141
{

0 commit comments

Comments
 (0)