-
Notifications
You must be signed in to change notification settings - Fork 1
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
CEF audio #16
base: master
Are you sure you want to change the base?
CEF audio #16
Conversation
fix: disable precompiled headers to enable debug builds
This reverts commit c9b5a33.
Upgrade deps
fix: remove unused stuff
Co-authored-by: Jesper Ek <[email protected]>
|
||
void set_audio(caspar::array<int32_t>&& data, int64_t pts) | ||
{ | ||
frame.set_audio_data(std::move(data)); |
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.
frame.set_audio_data(std::move(data)); | |
frame.audio_data() = std::move(data); |
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.
Obviously! Good catch 👍 I'm still not 100% used to the rvalue special functions. That just shows how long it's been since i actually coded c++ on a regular basis before this.
@niklaspandersson this is waiting for a fix of the initial glitching samples |
Thanks for starting on this, this inspired me to take a look at this, and I have reworked this a bit in my own prototype implementation CasparCG#1517. I have a theory on the glitching audio, in some cases inside these bits of code https://github.com/nxtedition/casparcg/blob/cef-audio/src/modules/html/producer/html_producer.cpp#L236-L247 you will need to wrap the returned frame with I encountered a similar thing, when pausing/resuming a low framerate video, fixed by adding those calls in https://github.com/CasparCG/server/blob/feat/cef-audio/src/modules/html/producer/html_producer.cpp#L263-L273 The code around here has diverged a bit by now, so may take some thought to translate across I don't think this implementation is very efficient on memory copying. By moving the casparcg/src/modules/html/producer/html_producer.cpp Lines 491 to 492 in d655390
try_pop . This delays the copy to being done just before the mixer wants to composite with it, rather than 2-4 frames in advance.
Additionally, I count that for each frame CEF paints, you are copying into a gpu buffer (as before) and then copying from that gpu buffer into I would suggest that instead of this, it would be more efficient to use the layering nature of |
commit 7e2f134 Author: Julian Waller <[email protected]> Date: Fri Jan 5 16:36:53 2024 +0000 chore: format commit 91e9954 Author: Julian Waller <[email protected]> Date: Fri Jan 5 16:34:23 2024 +0000 wip: rework frame flow commit 0ce2bfd Author: Julian Waller <[email protected]> Date: Fri Jan 5 16:11:02 2024 +0000 wip: inspired by #16
commit 7e2f134 Author: Julian Waller <[email protected]> Date: Fri Jan 5 16:36:53 2024 +0000 chore: format commit 91e9954 Author: Julian Waller <[email protected]> Date: Fri Jan 5 16:34:23 2024 +0000 wip: rework frame flow commit 0ce2bfd Author: Julian Waller <[email protected]> Date: Fri Jan 5 16:11:02 2024 +0000 wip: inspired by #16
No description provided.