Skip to content

Commit

Permalink
Take in typo fixes from codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Jul 28, 2024
1 parent c022bee commit be183a0
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion addons/gst-web/src/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class WebRTCDemo {
this.onlatencymeasurement(msg.data.latency_ms);
}
} else {
this._setError("Unhandled message recevied: " + msg.type);
this._setError("Unhandled message received: " + msg.type);
}
}

Expand Down
2 changes: 1 addition & 1 deletion addons/js-interposer/js-interposer-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def make_config():
num_btns = len(cfg["btn_map"])
num_axes = len(cfg["axes_map"])

# zero fill array to max lenth.
# zero fill array to max length.
btn_map = [i for i in cfg["btn_map"]]
axes_map = [i for i in cfg["axes_map"]]

Expand Down
2 changes: 2 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ ENTRYPOINT ["/usr/bin/supervisord"]

- There should be no empty lines with whitespaces, or line endings with whitespaces. Moreover, there should be a line break at the end of each code file unless the specific code file format should not have one. If there is not, it is okay, but include the line break with your Pull Requests if possible.

- Try using [`codespell`](https://github.com/codespell-project/codespell) or any other code spelling checker that can check text spelling errors before finalizing your pull request.

## Code Guide

- When editing certain parts of the codebase, they are very likely to interact with other components in a very different location, or the same content needs to be edited in multiple different locations. Therefore, commits or Pull Requests are very likely to corrupt the repository if you do not use search capabilities across the whole codebase as often as possible.
Expand Down
2 changes: 1 addition & 1 deletion infra/gce/turn-vm/turn-mig/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "allow_stopping_for_update" {
}

variable "cloud_init_custom_var" {
description = "String passed in to the cloud-config template as custome variable."
description = "String passed in to the cloud-config template as custom variable."
type = string
default = ""
}
2 changes: 1 addition & 1 deletion infra/gke/GKE_ASM_IAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ eval $(${WORKDIR?}/create_oauth_client.sh ${CLUSTER?})

> If you want to authorize users from outside your Google Workspace Domain, you must enable External user types from the [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent?project=) settings page.
> The programatic OAuth client creation only works on projects with Internal configured OAuth Consent screens. If you previously configured the OAuth client on this project and made the OAuth client external, this script will return an error like this:
> The programmatic OAuth client creation only works on projects with Internal configured OAuth Consent screens. If you previously configured the OAuth client on this project and made the OAuth client external, this script will return an error like this:
```
ERROR: (gcloud.alpha.iap.oauth-clients.create) FAILED_PRECONDITION: Precondition check failed.
Expand Down
2 changes: 1 addition & 1 deletion infra/gke/manifests/coturn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Requires K8S Secret named turn-shared-secret which is generated from files:

TURN_SHARED_SECRET: Contains the shared secret used by coturn and apps like coturn-web or directly by the Selkies-GStreamer Python app.

Genearte a shared secret with the command below:
Generate a shared secret with the command below:

```bash
openssl rand -base64 15 > TURN_SHARED_SECRET
Expand Down
6 changes: 3 additions & 3 deletions src/selkies_gstreamer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def main():
parser.add_argument('--json_config',
default=os.environ.get(
'SELKIES_JSON_CONFIG', '/tmp/selkies_config.json'),
help='Path to the JSON file containing argument key-value pairs that are overlayed with CLI arguments or environment variables, this path must be writable')
help='Path to the JSON file containing argument key-value pairs that are overlaid with CLI arguments or environment variables, this path must be writable')
parser.add_argument('--addr',
default=os.environ.get(
'SELKIES_ADDR', '0.0.0.0'),
Expand Down Expand Up @@ -676,7 +676,7 @@ def data_channel_ready():

app.on_data_open = lambda: data_channel_ready()

# Send incomming messages from data channel to input handler
# Send incoming messages from data channel to input handler
app.on_data_message = webrtc_input.on_message

# Send video bitrate messages to app
Expand Down Expand Up @@ -831,7 +831,7 @@ def mon_rtc_config(stun_servers, turn_servers, rtc_config):
app.webrtcbin.emit("add-turn-server", turn_server)
server.set_rtc_config(rtc_config)

# Initialize periodic montior to refresh TURN RTC config when using shared secret.
# Initialize periodic monitor to refresh TURN RTC config when using shared secret.
hmac_turn_mon = HMACRTCMonitor(
args.turn_host,
args.turn_port,
Expand Down
4 changes: 2 additions & 2 deletions src/selkies_gstreamer/gamepad.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ def __make_config(self):
Requires that self.config has been set first.
'''
if not self.config:
logger.error("could not make js config becuase it has not yet been set.")
logger.error("could not make js config because it has not yet been set.")
return None

num_btns = len(self.config["btn_map"])
num_axes = len(self.config["axes_map"])

# zero fill array to max lenth.
# zero fill array to max length.
btn_map = [i for i in self.config["btn_map"]]
axes_map = [i for i in self.config["axes_map"]]

Expand Down
12 changes: 6 additions & 6 deletions src/selkies_gstreamer/gstwebrtc_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def build_video_pipeline(self):
# to generate buffers at 60 frames per second (FPS).
# The higher the FPS, the lower the latency so this parameter is one
# way to set the overall target latency of the pipeline though keep in
# mind that the pipeline may not always perfom at the full 60 FPS.
# mind that the pipeline may not always perform at the full 60 FPS.
self.ximagesrc_caps.set_value("framerate", Gst.Fraction(self.framerate, 1))

# Create a capability filter for the ximagesrc_caps
Expand Down Expand Up @@ -324,7 +324,7 @@ def build_video_pipeline(self):
# Minimize GOP-to-GOP rate fluctuations
nvh264enc.set_property("strict-gop", True)

# The NVENC encoder supports a limited nubmer of encoding presets.
# The NVENC encoder supports a limited number of encoding presets.
# These presets are different than the open x264 standard.
# The presets control the picture coding technique, bitrate,
# and encoding quality.
Expand Down Expand Up @@ -628,7 +628,7 @@ def build_video_pipeline(self):
x264enc.set_property("mb-tree", False)
x264enc.set_property("rc-lookahead", 0)
x264enc.set_property("sync-lookahead", 0)
# Set VBV/HRD buffer size (miliseconds) to optimize for live streaming
# Set VBV/HRD buffer size (milliseconds) to optimize for live streaming
x264enc.set_property("vbv-buf-capacity", int((1000 + self.framerate - 1) // self.framerate * self.vbv_multiplier_sw))
x264enc.set_property("sliced-threads", True)
x264enc.set_property("byte-stream", True)
Expand Down Expand Up @@ -700,7 +700,7 @@ def build_video_pipeline(self):

# VPX Parameters
vpenc.set_property("threads", min(16, max(1, len(os.sched_getaffinity(0)) - 1)))
# Set VBV/HRD buffer size (miliseconds) to optimize for live streaming
# Set VBV/HRD buffer size (milliseconds) to optimize for live streaming
vbv_buffer_size = int((1000 + self.framerate - 1) // self.framerate * self.vbv_multiplier_vp)
vpenc.set_property("buffer-initial-size", vbv_buffer_size)
vpenc.set_property("buffer-optimal-size", vbv_buffer_size)
Expand Down Expand Up @@ -1180,7 +1180,7 @@ def set_sdp(self, sdp_type, sdp):
sdp {object} -- SDP object
Raises:
GSTWebRTCAppError -- thrown if SDP is recevied before session has been started.
GSTWebRTCAppError -- thrown if SDP is received before session has been started.
GSTWebRTCAppError -- thrown if SDP type is not 'answer', this script initiates the call, not the peer.
"""

Expand Down Expand Up @@ -1391,7 +1391,7 @@ def send_gpu_stats(self, load, memory_total, memory_used):
Arguments:
load {float} -- utilization of GPU between 0 and 1
memory_total {float} -- total memory on GPU in MB
memory_used {float} -- memor used on GPU in MB
memory_used {float} -- memory used on GPU in MB
"""

self.__send_data_channel_message("gpu_stats", {
Expand Down
8 changes: 4 additions & 4 deletions src/selkies_gstreamer/webrtc_signalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class WebRTCSignallingErrorNoPeer(Exception):

class WebRTCSignalling:
def __init__(self, server, id, peer_id, enable_https=False, enable_basic_auth=False, basic_auth_user=None, basic_auth_password=None):
"""Initialize the signalling instnance
"""Initialize the signalling instance
Arguments:
server {string} -- websocket URI to connect to, example: ws://127.0.0.1:8080
Expand Down Expand Up @@ -119,7 +119,7 @@ async def connect(self):
self.on_disconnect()

async def send_ice(self, mlineindex, candidate):
"""Sends te ice candidate to peer
"""Sends the ice candidate to peer
Arguments:
mlineindex {integer} -- the mlineindex
Expand Down Expand Up @@ -161,8 +161,8 @@ async def start(self):
on_connect: fired when HELLO is received.
on_session: fired after setup_call() succeeds and SESSION_OK is received.
on_error(WebRTCSignallingErrorNoPeer): fired when setup_call() failes and peer not found message is received.
on_error(WebRTCSignallingError): fired when message parsing failes or unexpected message is received.
on_error(WebRTCSignallingErrorNoPeer): fired when setup_call() fails and peer not found message is received.
on_error(WebRTCSignallingError): fired when message parsing fails or unexpected message is received.
"""
async for message in self.conn:
Expand Down

0 comments on commit be183a0

Please sign in to comment.