Skip to content

Commit b0501fd

Browse files
committed
more cleanup
1 parent 730473b commit b0501fd

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Basis/Packages/com.basis.mediaplayer/Runtime/BasisMediaPlayer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ private void Update()
829829
// ready/size/EOS/error events, then mirror status. No CPU frame queue.
830830
if (nativeEngine != null)
831831
{
832-
nativeEngine.Pump();
832+
nativeEngine.Pump(VerboseLogging);
833833
DrainPendingEvents();
834834
PollNativeEngineStatus();
835835
HandleRestartTimer();

Basis/Packages/com.basis.mediaplayer/Runtime/Native/BasisNativeVideoSource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private void PollTrackStateOnce()
208208
}
209209

210210
// Main-thread tick: drive the render-thread texture update and surface events.
211-
public void Pump()
211+
public void Pump(bool verboseLogging = false)
212212
{
213213
if (handle == IntPtr.Zero || disposed) return;
214214

@@ -280,6 +280,7 @@ public void Pump()
280280
// log shows whether frames keep flowing (frames climbing), the stream
281281
// ended (state=Ended), or the texture froze (frames stuck but no error).
282282
pumpCount++;
283+
if (!verboseLogging) return;
283284
BasisMediaEngineState hb = State;
284285
if (hb != lastLoggedState || (pumpCount % 120) == 0)
285286
{

0 commit comments

Comments
 (0)