-
Notifications
You must be signed in to change notification settings - Fork 866
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
Fixed StreamID and Smoother name swapping for big endian machines #644
Conversation
NOTE: the theoretical endian-swapping has been added and portable endian-swapping functions have been added to utilities, but this PR wasn't tested on any big endian machine. It was tested as little-endian and it is confirmed that these calls to |
@ethouris If you have any unit tests I can run them on a big endian machine for you. I have an IBookG4 and a PowerMacG5. I can also provide you with a QEMU Power7 Image running CentOS if you would prefer to do it yourself. |
@jlsantiago0 I don't have unit tests for that, but you can simply try to run a file transmission (srt-file-transmit or srt-test-file) between one machine with little endian and one with big endian. Apps for file transmission use the congestion controller id as "file" in the handshake extension. If the byte swapping is made wrong, the connection will be rejected (as it can't find "elif" smoother). If you specify the directory as target with the SRT receiver specified as listener, then the filename will be also passed through StreamID - so you kill two birds with one stone. So: receiver: |
Hi @ethouris I have built the current SRT Master branch with and without your patches on the following targets:
Configured as follows:
There does not appear to be an application called When running without your patch from the PPC64 host to the X86_64 host, I observe the following:
After applying your patches:
However, after the "transfer" is finished the two files are not the same.
And the file sizes of the transfered file is greatly different.
So there still appears to be some additional issue. |
Ok, so in the beginning it all works exactly failing as I expected, that's some good news. I don't get what the problem could be with the torn file - this has to be checked later. The |
@jlsantiago0 Thank you for checking this fix! |
@jlsantiago0 Losses might be related to the recent changes in |
OK. Sorry I had not had time to revisit this earlier. Should I wait until you have all that worked out and then I can test again? |
@jlsantiago0 Should be fixed now by PR #658. Please confirm. |
@maxlovic I have tested the srt-file-transmit application in both directions with the current master branch with @ethouris branch dev-fix-streamid-bigendian merged and it successfully transferred files between the BE and LE machines listed above. |
Cool. Thank you! |
Fixes #634.
The protocol definitions stays as before (that is, characters in StreamID and Smoother are fourwise inverted). There's a fix made especially for big endian machines, which turns them to the "little endian convention" for the sake of transport.