-
Notifications
You must be signed in to change notification settings - Fork 33
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
AndroidAutoProtocol 1.6 Support #29
base: newdev
Are you sure you want to change the base?
Conversation
Slight tweaks - Add isInterleaved boolean - If message is NULL and Frame Type is MIDDLE or LAST, then look for an existing message in buffer (if the message_ is null, then we need a FIRST or BULK frame) - If message is still NULL, then we will create a new message, but recognise it as a valid frame ONLY if this is a FIRST or BULK frame because we cannot start on a MIDDLE or LAST. - Rename recentFrameType to thisFrameType for more accuracy - Only Resolve the Frame if the frame is BULK or LAST and the frame is valid. - If the frame is interleaved, then we will use our interleavedPromise handler. Only resolve the main promise if the frame is not interleaved. - Also reset message once resolved. - Carry on reading if the original promise is not resolved (ie FIRST, MIDDLE, or Interleaved frame) - Add some counters for debugging purposes.
- Have adjusted the buffer mechanism so instead of using the buffer to store a message in the event of an interleaved frame, we basically perform all work on the buffer (albeit we take the existing message for the channel id from the buffer for the frame we're working on and write the message to the buffer if the message isn't resolved). - Moved writing to buffer to receiveFramePayloadHandler() function if the message is BULK or LAST and therefore not resolved. - Simplified receiveFrameHeaderHandler() so that we automatically try to find a message from the buffer and then createa message as necessary depending on the frame type. - Excellent stability with no noticeable artefacts in audio after 1 hour. - Removed majority of debugging after achieving stability.
* Restructure AASDK Proto Protobuf files for Android Auto 1.6 Support based on information from https://milek7.pl/.stuff/galdocs/readme.md This fleshes out enums and other methods with their full naming conventions for better readability and understanding. * Restructure AASDK source/header with additional renames to clarify differences between AudioService, VideoService and AVInput. Updated to MediaSinkService which is extended by AudioMediaSinkService and VideoMediaSinkService which themselves are extended by the individual service channels. * Added initial GenericNotification, MediaBrowser, MediaPlaybackStatus, PhoneStatus, Radio, VendorExtension and WifiProjection services. * Update AASDK_LOG entries for extra consistency * Simplify CMAKE to build and install keeping parameters to a minimum. Default to Release mode and Raspberry PI build unless otherwise specified.
# Conflicts: # .gitignore # CMakeLists.txt # aasdk_proto/ChannelDescriptorData.proto # aasdk_proto/VideoFPSEnum.proto # aasdk_proto/VideoFocusRequestMessage.proto # aasdk_proto/WifiSecurityRequestMessage.proto # include/aasdk/Common/Log.hpp # include/aasdk/Messenger/ChannelId.hpp # include/aasdk/Messenger/Cryptor.hpp # include/aasdk/Messenger/FrameSize.hpp # include/aasdk/Messenger/FrameType.hpp # include/aasdk/Messenger/ICryptor.hpp # include/aasdk/Messenger/MessageInStream.hpp # include/aasdk/Messenger/Messenger.hpp # src/Common/Data.cpp # src/Messenger/ChannelId.cpp # src/Messenger/Cryptor.cpp # src/Messenger/FrameSize.cpp # src/Messenger/FrameType.cpp # src/Messenger/MessageInStream.cpp # src/Messenger/MessageInStream.ut.cpp # src/Messenger/MessageOutStream.ut.cpp # src/Messenger/Messenger.cpp # src/Messenger/Messenger.ut.cpp # src/TCP/TCPEndpoint.ut.cpp # src/Transport/SSLWrapper.cpp # src/Transport/TCPTransport.ut.cpp # src/Transport/USBTransport.ut.cpp # src/USB/AOAPDevice.ut.cpp # src/USB/AccessoryModeQueryChain.ut.cpp # src/USB/AccessoryModeSendStringQuery.ut.cpp # src/USB/AccessoryModeStartQuery.ut.cpp # src/USB/ConnectedAccessoriesEnumerator.cpp # src/USB/ConnectedAccessoriesEnumerator.ut.cpp # src/USB/USBEndpoint.ut.cpp # src/USB/USBHub.ut.cpp
This requires a large review. I'll have a go at merging locally and testing. Needs a combined effort to review as I've not looked at the code in a while. @SonOfGib keen to hear your views on this as you've been updating the code recently. |
Yeah I think its worth working on, I left my thoughts on the previous pr.
From a high level I thought we might want to take the changes to the functionality / protobufs without refactoring the namespaces or changing the build setup. I am not familiar with building c++ apps/libraries so not sure if this build setup or the original setup are more "correct." |
The changes make sense and personally I think it might be better to get this tested and merged sooner as it'll be easier to work off one base. I know last time I did a major reorg I missed a few fixes due to them being written at same time and they got lost is merge conflicts. |
I've been running this (and my forthcoming merge of OpenAuto - I'll do another PR for that), quite happily. But appreciate you'll need to do some internal testing. My main goal was to bring in all the latest decoded Proto files from what appears to be a reliable source while introducing some stubs for future development and working on a little consistency in some of the naming conventions especially around sink/source etc. As there were a number of ProtoBuf's, we could either keep them together as one main proto file, or split them up. I favoured keeping them split with one proto per file, which meant restructuring the folders and trying to rationalise the difference between Service and Channel, and Sink, Output, Source and Input. I also then wanted to review the build process, so now we can build the ProtoBuf's as one shared library, then build AASDK as another shared library.... ie
I think it makes it a little simpler than having to specify the paths separately. I'm also hoping this will put us on track for going down the route of setting up our own apt repository for apt integrated updating and versioning etc. I tried not to implement modifications for the sake of it, but it did need a bit of TLC in places due to the growth of the project and to hopefully move things forward. If you need me to clarify anything though, please let me know. |
@sjdean are you able to review and resolve the merge conflicts? |
Last time I checked I didn't have permission, but I would be happy to review and merge, it looks like it should be auto mergable. |
@SonOfGib I'm away with work for a few days. Do you think you could see if this builds. I know there is another pr against openauto that is dependent on these changes. So they will need to be built together. |
I will find some time to review and build over the next couple days. I will try to take some notes on what (if anything) is required to make it build properly vs the scripts we have now. |
Thanks, on a side note did you get the slack invite? |
Oops, wasn't checking my email thanks for the heads up. |
@sjdean it's not building for me. I updated the entrypoint.sh to add the aasdk_proto build.
and protobuf/CMakeLists.txt
But when building it fails
|
It should build from a command prompt. My guess is that there's some stuff
in your docker build that's looking for things in certain locations. I'll
take a poke tomorrow if I can.
…On Thu, 9 Jan 2025, 23:15 Matthew Hilton, ***@***.***> wrote:
@sjdean <https://github.com/sjdean> it's not building for me.
I updated the entrypoint.sh to add the aasdk_proto build.
diff --git a/buildenv/entrypoint.sh b/buildenv/entrypoint.sh
index 7bbbd71..e85809d 100644
--- a/buildenv/entrypoint.sh
+++ b/buildenv/entrypoint.sh
@@ -17,6 +17,13 @@ fi
echo "Now building within docker for $ARCH"
+# Make protobuf
+mkdir protobuf/build
+cd protobuf/build
+cmake -DCMAKE_BUILD_TYPE=Release -DTARGET_ARCH=$ARCH ..
+make
+make install
+
# Clear out the /build directory
rm -f bin/*
rm -f lib/*
But when building it fails
CMake Error: Attempt to add a custom rule to output "/src/protobuf/build/InstrumentClusterInput.pb.h.rule" which already has a custom rule.
—
Reply to this email directly, view it on GitHub
<#29 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFU2N5HFCZH6DWBZ4PND3OD2J37H3AVCNFSM6AAAAABUYSXGZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBRGQZDKOJSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
(Second Attempt)
AAP-Proto 1.6 Support and Tidy Ups
This fleshes out enums and other methods with their full naming conventions for better readability and understanding.