Skip to content

Commit 9bcecbc

Browse files
committed
Initial commit
0 parents  commit 9bcecbc

File tree

255 files changed

+16401
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+16401
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add any directories, files, or patterns you don't want to be tracked by version control
2+
lib/
3+
bin/
4+
CMakeLists.txt.user

CMakeLists.txt

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
cmake_minimum_required(VERSION 3.5.1)
2+
project(aasdk CXX)
3+
4+
set(base_directory ${CMAKE_CURRENT_SOURCE_DIR})
5+
set(sources_directory ${base_directory}/src)
6+
7+
set(include_directory ${base_directory}/include)
8+
set(include_ut_directory ${base_directory}/include_ut)
9+
10+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${base_directory}/lib)
11+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${base_directory}/lib)
12+
13+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${base_directory}/bin)
14+
set(EXECUTABLE_OUTPUT_PATH ${base_directory}/bin)
15+
16+
SET(CMAKE_CXX_STANDARD 14)
17+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake_modules/")
18+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -fPIC -Wall -pedantic")
19+
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
20+
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3")
21+
22+
set(Boost_USE_STATIC_LIBS OFF)
23+
set(Boost_USE_MULTITHREADED ON)
24+
set(Boost_USE_STATIC_RUNTIME OFF)
25+
26+
add_definitions(-DBOOST_ALL_DYN_LINK)
27+
28+
include(ExternalGtest)
29+
add_subdirectory(aasdk_proto)
30+
31+
find_package(Boost REQUIRED COMPONENTS system log OPTIONAL_COMPONENTS unit_test_framework)
32+
find_package(libusb-1.0 REQUIRED)
33+
find_package(Protobuf REQUIRED)
34+
35+
set(AASDK_PROTO_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
36+
set(AASDK_PROTO_LIBRARIES "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libaasdk_proto.a")
37+
38+
include_directories(${AASDK_PROTO_INCLUDE_DIRS}
39+
${Boost_INCLUDE_DIRS}
40+
${LIBUSB_1_INCLUDE_DIRS}
41+
${PROTOBUF_INCLUDE_DIR}
42+
${GTEST_INCLUDE_DIRS}
43+
${GMOCK_INCLUDE_DIRS}
44+
${include_directory}
45+
${include_ut_directory})
46+
47+
file(GLOB_RECURSE source_files ${sources_directory}/*.cpp)
48+
file(GLOB_RECURSE include_files ${include_directory}/*.hpp)
49+
file(GLOB_RECURSE tests_source_files ${sources_directory}/*.ut.cpp)
50+
file(GLOB_RECURSE tests_include_files ${include_ut_directory}/*.hpp)
51+
52+
list(REMOVE_ITEM source_files ${tests_source_files})
53+
54+
add_library(aasdk SHARED
55+
${source_files}
56+
${include_files})
57+
58+
add_dependencies(aasdk aasdk_proto)
59+
target_link_libraries(aasdk
60+
${AASDK_PROTO_LIBRARIES}
61+
${Boost_LIBRARIES}
62+
${LIBUSB_1_LIBRARIES}
63+
${PROTOBUF_LIBRARIES}
64+
ssl
65+
crypto)
66+
67+
add_executable(aasdk_ut EXCLUDE_FROM_ALL
68+
${tests_source_files}
69+
${tests_include_files})
70+
71+
add_dependencies(aasdk_ut aasdk)
72+
target_link_libraries(aasdk_ut
73+
aasdk
74+
${GMOCK_LIBRARY_PATH}
75+
${GTEST_LIBRARY_PATH})
76+
77+
if(CODE_COVERAGE)
78+
include(CodeCoverage)
79+
append_coverage_compiler_flags()
80+
setup_target_for_coverage(NAME aasdk_coverage EXECUTABLE aasdk_ut DEPENDENCIES aasdk_ut)
81+
endif(CODE_COVERAGE)

aasdk_proto/AVChannelData.proto

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
import "AVStreamTypeEnum.proto";
22+
import "AudioTypeEnum.proto";
23+
import "AudioConfigData.proto";
24+
import "VideoConfigData.proto";
25+
26+
package f1x.aasdk.proto.data;
27+
28+
message AVChannel
29+
{
30+
enums.AVStreamType.Enum stream_type = 1;
31+
enums.AudioType.Enum audio_type = 2;
32+
repeated AudioConfig audio_configs = 3;
33+
repeated VideoConfig video_configs = 4;
34+
bool available_while_in_call = 5;
35+
}
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
package f1x.aasdk.proto.ids;
22+
23+
message AVChannelMessage
24+
{
25+
enum Enum
26+
{
27+
AV_MEDIA_WITH_TIMESTAMP_INDICATION = 0x0000;
28+
AV_MEDIA_INDICATION = 0x0001;
29+
SETUP_REQUEST = 0x8000;
30+
START_INDICATION = 0x8001;
31+
STOP_INDICATION = 0x8002;
32+
SETUP_RESPONSE = 0x8003;
33+
AV_MEDIA_ACK_INDICATION = 0x8004;
34+
AV_INPUT_OPEN_REQUEST = 0x8005;
35+
AV_INPUT_OPEN_RESPONSE = 0x8006;
36+
VIDEO_FOCUS_REQUEST = 0x8007;
37+
VIDEO_FOCUS_INDICATION = 0x8008;
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
package f1x.aasdk.proto.messages;
22+
23+
message AVChannelSetupRequest
24+
{
25+
uint32 config_index = 1;
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto2";
20+
21+
import "AVChannelSetupStatusEnum.proto";
22+
23+
package f1x.aasdk.proto.messages;
24+
25+
message AVChannelSetupResponse
26+
{
27+
required enums.AVChannelSetupStatus.Enum media_status = 1;
28+
required uint32 max_unacked = 2;
29+
repeated uint32 configs = 3;
30+
}
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
package f1x.aasdk.proto.enums;
22+
23+
message AVChannelSetupStatus
24+
{
25+
enum Enum
26+
{
27+
NONE = 0;
28+
FAIL = 1;
29+
OK = 2;
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
package f1x.aasdk.proto.messages;
22+
23+
message AVChannelStartIndication
24+
{
25+
int32 session = 1;
26+
uint32 config = 2;
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
package f1x.aasdk.proto.messages;
22+
23+
message AVChannelStopIndication
24+
{
25+
}

aasdk_proto/AVInputChannelData.proto

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
import "AVStreamTypeEnum.proto";
22+
import "AudioConfigData.proto";
23+
24+
package f1x.aasdk.proto.data;
25+
26+
message AVInputChannel
27+
{
28+
enums.AVStreamType.Enum stream_type = 1;
29+
AudioConfig audio_config = 2;
30+
bool available_while_in_call = 3;
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto3";
20+
21+
package f1x.aasdk.proto.messages;
22+
23+
message AVInputOpenRequest
24+
{
25+
bool open = 1;
26+
bool anc = 2;
27+
bool ec = 3;
28+
int32 max_unacked = 4;
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* This file is part of aasdk library project.
3+
* Copyright (C) 2018 f1x.studio (Michal Szwaj)
4+
*
5+
* aasdk is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation; either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* aasdk is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with aasdk. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
syntax="proto2";
20+
21+
package f1x.aasdk.proto.messages;
22+
23+
message AVInputOpenResponse
24+
{
25+
required int32 session = 1;
26+
required uint32 value = 2;
27+
}

0 commit comments

Comments
 (0)