Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ jobs:
sed -i -e 's|webrtc_path = ".*"|webrtc_path = "${{ github.workspace }}/webrtc-checkout/"|g' WORKSPACE
# Don't `build ...`, as includes irrelevant targets in `webrtc-checkout`.
bazel-7.4.1 build native/...
bazel-7.4.1 build native_with_state/...
bazel-7.4.1 build web/...

- name: 🔍 Test
run: |
bazel-7.4.1 test native/...

# bazel-7.4.1 test native_with_state/... (no tests yet)
21 changes: 0 additions & 21 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,3 @@ local_repository(
name = "boringssl",
path = webrtc_path + "webrtc/third_party/boringssl/src",
)

# === Python ===
http_archive(
name = "rules_python",
sha256 = "be04b635c7be4604be1ef20542e9870af3c49778ce841ee2d92fcb42f9d9516a",
strip_prefix = "rules_python-0.35.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.35.0/rules_python-0.35.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()

load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
name = "util_deps",
requirements_lock = "//web/utils:requirements.txt",
)

load("@util_deps//:requirements.bzl", "install_deps")
install_deps()
96 changes: 96 additions & 0 deletions native_with_state/api/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

package(default_visibility = ["//visibility:private"])

cc_library(
name = "media_api_client_interface",
hdrs = [
"media_api_client_interface.h",
],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
deps = [
":media_entries_resource",
":media_stats_resource",
":participants_resource",
":session_control_resource",
":video_assignment_resource",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/types:span",
"@webrtc",
],
)

cc_library(
name = "media_api_client_factory_interface",
hdrs = ["media_api_client_factory_interface.h"],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
deps = [
":media_api_client_interface",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/status:statusor",
"@webrtc",
],
)

cc_library(
name = "media_stats_resource",
hdrs = [
"media_stats_resource.h",
],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
deps = [
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/status",
"@com_google_absl//absl/types:optional",
],
)

cc_library(
name = "participants_resource",
hdrs = [
"participants_resource.h",
],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
)

cc_library(
name = "video_assignment_resource",
hdrs = [
"video_assignment_resource.h",
],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
deps = ["@com_google_absl//absl/status"],
)

cc_library(
name = "media_entries_resource",
hdrs = [
"media_entries_resource.h",
],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
)

cc_library(
name = "session_control_resource",
hdrs = [
"session_control_resource.h",
],
visibility = ["@media_api_samples//native_with_state:__subpackages__"],
deps = ["@com_google_absl//absl/status"],
)
43 changes: 43 additions & 0 deletions native_with_state/api/media_api_client_factory_interface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef NATIVE_WITH_STATE_API_MEDIA_API_CLIENT_FACTORY_INTERFACE_H_
#define NATIVE_WITH_STATE_API_MEDIA_API_CLIENT_FACTORY_INTERFACE_H_

#include <memory>

#include "absl/base/nullability.h"
#include "absl/status/statusor.h"
#include "native_with_state/api/media_api_client_interface.h"
#include "webrtc/api/scoped_refptr.h"

namespace meet {

// Interface for instantiating MediaApiClientInterfaces.
class MediaApiClientFactoryInterface {
public:
virtual ~MediaApiClientFactoryInterface() = default;

virtual absl::StatusOr<std::unique_ptr<MediaApiClientInterface>>
CreateMediaApiClient(
const MediaApiClientConfiguration& api_config,
absl::Nonnull<rtc::scoped_refptr<MediaApiClientObserverInterface>>
api_session_observer) = 0;
};

} // namespace meet

#endif // NATIVE_WITH_STATE_API_MEDIA_API_CLIENT_FACTORY_INTERFACE_H_
Loading
Loading