awslabs / amazon-kinesis-video-streams-pic

Apache License 2.0
50 stars 47 forks source link

[QUESTION] Is the kvspic library a superset of the other 3 libraries this repo builds? #128

Closed ericriff closed 3 years ago

ericriff commented 3 years ago

I'm trying to figure out how these libraries work. I see that the main CMakeLists defines 4 libraries: kvspic, kvspicClient, kvspicState and kvspicUtils. By inspecting the sources assigned to each one I see that the last 3 libraries build only a subset of the sources of kvspic. Is kvspic meant to be a "have it all" library that supersets the other 3? Can some of the other 3 be used by themselves or do you also need to link in kvspic? Also, what about these lines target_link_libraries(kvspicClient), target_link_libraries(kvspicState) ?? They are not linkin anything.

Thanks!

MushMal commented 3 years ago

@ericriff yes, it is. It's used for testing overall functionality. The other 3 libraries are used by other end-user projects. Client contains the KVS public interface that is used by C producer. State and Utils are shared between the C producer and KVS WebRTC solution.

You really don't need to use this repository directly. If you are using WebRTC then use that repository and it will pull down it's dependencies. Same if you are using C producer or C++ producer repositories.

MushMal commented 3 years ago

C producer: https://github.com/awslabs/amazon-kinesis-video-streams-producer-c C++ producer: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp WebRTC: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c

ericriff commented 3 years ago

My company consumes third party libraries as conan packages, so in order to use webRTC I have to package each of its dependencies individually.

Following conan conventions this repo will be a dependency of the C producer one. I'll disable the source pull by patching the main CMakeList and I'll replace it with a find_package or something to pull in the conan package instead. But to do that I kind of need to understand the intended layout of each repo.

IIUC the dependency chain is WebRTC -> CProducer -> thisRepo.

Thanks for your quick answer.

MushMal commented 3 years ago

No, if you are using WebRTC then the chain as follows

WebRTC
/ \ State Utils Common (from C producer package)
                     Utils

Basically WebRTC is using state and utils from PIC and Common from C producer. Common, in turn will also use Utils.

MushMal commented 3 years ago

Sigh, my nifty ASCII chart was butchered by markdown :(

hassanctech commented 3 years ago

Thanks @MushMal ! @ericriff can this be closed?

ericriff commented 3 years ago

Yes go ahead and close it. Thanks for the info.