2014-03-03, 20:37
So a little background is probably needed first,
I've been attempting to improve xbmc running on the boxeebox. The audio sink is where I started first as I had quite a few issues getting things to work properly. Well to make a long story short. I got them to work.. but not without introducing new issues. Unfortunately my changes seem to have made the audio go out of sync when passthrough is enabled.
So I went back to the old boxee source to see how they handled A/V sync, they appear to have used the PTS setting when creating audio buffers. Their audio renderer AddPackets added the pts parameter to be sent from the DVDAudio class.
I do not want to be making changes to xbmc classes unless absolutely necessary, which is why I am here. So my question is three-fold...
1. How does the GetDelay/GetLatency settings of the sink currently affect the A/V sync. Can I use these to somehow match the sync. I have attempted to modify these values sent back but without any success in getting any changes.
2. Is there another way from the Sink for me to handle the sync issue.
3. If the answer to 1&2 is I can't fix it that way, what are the feelings about changing the interfaces to allow PTS to be sent with the audio packets? I realize this discussion may be bad timing with Gotham approaching and I am not intending these to be handled immediately. While I do not mind making the change, I would at least like to have some design discussions with someone familiar with the audio architecture.
I know I'm knew to this forum, but feel free to let me know if you see something differently than I do. I'm still becoming familiar with the xbmc codebase and can be completely in left field here, so feel free to give other suggestions.
I've been attempting to improve xbmc running on the boxeebox. The audio sink is where I started first as I had quite a few issues getting things to work properly. Well to make a long story short. I got them to work.. but not without introducing new issues. Unfortunately my changes seem to have made the audio go out of sync when passthrough is enabled.
So I went back to the old boxee source to see how they handled A/V sync, they appear to have used the PTS setting when creating audio buffers. Their audio renderer AddPackets added the pts parameter to be sent from the DVDAudio class.
I do not want to be making changes to xbmc classes unless absolutely necessary, which is why I am here. So my question is three-fold...
1. How does the GetDelay/GetLatency settings of the sink currently affect the A/V sync. Can I use these to somehow match the sync. I have attempted to modify these values sent back but without any success in getting any changes.
2. Is there another way from the Sink for me to handle the sync issue.
3. If the answer to 1&2 is I can't fix it that way, what are the feelings about changing the interfaces to allow PTS to be sent with the audio packets? I realize this discussion may be bad timing with Gotham approaching and I am not intending these to be handled immediately. While I do not mind making the change, I would at least like to have some design discussions with someone familiar with the audio architecture.
I know I'm knew to this forum, but feel free to let me know if you see something differently than I do. I'm still becoming familiar with the xbmc codebase and can be completely in left field here, so feel free to give other suggestions.