-
Notifications
You must be signed in to change notification settings - Fork 1
Remove output stream logic. #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,33 +55,23 @@ public void recordFrame(Frame capturedFrame, long videoTimestamp) | |
| // This is where a frame is record, and we then need to store the timestamps, so they are synced | ||
| try | ||
| { | ||
| if (!recorder.isCloseOutputStream()) | ||
| { | ||
| recorder.record(capturedFrame); | ||
| } | ||
| recorder.record(capturedFrame); | ||
| } | ||
| catch (Exception e) | ||
| { | ||
| throw new RuntimeException(e); | ||
| } | ||
| } | ||
|
|
||
| public boolean isCloseOutputStream() | ||
| { | ||
| return recorder.isCloseOutputStream(); | ||
| } | ||
|
|
||
| public long getTimeStamp() | ||
| { | ||
| return recorder.getTimestamp(); | ||
| } | ||
|
|
||
| public void close() | ||
| { | ||
| recorder.setCloseOutputStream(true); | ||
| try | ||
| { | ||
| recorder.flush(); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| recorder.stop(); | ||
| } | ||
| catch (Exception e) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,7 @@ public void startCapture() throws Exception | |
|
|
||
| long startTime = System.currentTimeMillis(); | ||
| Frame capturedFrame; | ||
| while (!magewellMuxer.isCloseOutputStream() && ((capturedFrame = grabber.grabAtFrameRate()) != null)) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait, so were we actually using the closeOutputStream variable to signal that we wanted to stop the recording?? 😂
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added back the closed logic, but not using an unrelated internal variable |
||
| while ((capturedFrame = grabber.grabAtFrameRate()) != null) | ||
| { | ||
| long videoTimestamp = CaptureTimeTools.timeSinceStartedCaptureInSeconds(System.currentTimeMillis(), startTime); | ||
| magewellMuxer.recordFrame(capturedFrame, videoTimestamp); | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close output stream is only for when you pass one in. we're passing in a file. it's always gonna be false

