Skip to content

Commit 1eabebf

Browse files
add workflow to generate the docs and upload the docs (#48)
* add workflow to generate the docs and upload the docs * remove the comments * fix the aws access variables
1 parent b9881e4 commit 1eabebf

File tree

6 files changed

+90
-12
lines changed

6 files changed

+90
-12
lines changed

.github/workflows/make-release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,10 @@ jobs:
285285
generate_release_notes: true
286286
env:
287287
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
288+
289+
# ---------- Publish Docs Job ----------
290+
publish-docs:
291+
name: Publish Documentation
292+
needs: release
293+
uses: ./.github/workflows/publish-docs.yml
294+
secrets: inherit

.github/workflows/publish-docs.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish docs
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
submodules: true
14+
lfs: true
15+
16+
# Doxygen is available on ubuntu-latest, but we install explicitly for stability
17+
- name: Install Doxygen
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y doxygen graphviz
21+
22+
- name: Build Docs (Doxygen)
23+
run: |
24+
doxygen docs/Doxyfile
25+
26+
- name: S3 Upload
27+
run: |
28+
DOCS_DIR="html"
29+
if [[ ! -d "$DOCS_DIR" ]]; then
30+
echo "Expected docs at $DOCS_DIR but directory not found."
31+
exit 1
32+
fi
33+
34+
# Upload to rolling latest (no versioned docs, always overwrite)
35+
aws s3 sync "$DOCS_DIR"/ s3://livekit-docs/cpp --delete
36+
env:
37+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
38+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
39+
AWS_DEFAULT_REGION: "us-east-1"
40+
41+
- name: Expire cloudfront cache
42+
run: |
43+
aws cloudfront create-invalidation --distribution-id EJJ40KLJ3TRY9 --paths "/cpp/*"
44+
env:
45+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
46+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
47+
AWS_DEFAULT_REGION: "us-east-1"
48+

docs/Doxyfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
# Project related configuration options
2828
#---------------------------------------------------------------------------
2929

30+
PROJECT_NAME = "LiveKit C++ SDK"
31+
3032
# This tag specifies the encoding used for all characters in the configuration
3133
# file that follow. The default is UTF-8 which is also the encoding used for all
3234
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
@@ -1005,7 +1007,7 @@ WARN_LOGFILE =
10051007
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
10061008
# Note: If this tag is empty the current directory is searched.
10071009

1008-
INPUT = ../include/livekit ../docs/index.md ../README.md ../examples/simple_rpc/README.md
1010+
INPUT = include/livekit docs/index.md README.md examples/simple_rpc/README.md
10091011

10101012
# This tag can be used to specify the character encoding of the source files
10111013
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1220,7 +1222,7 @@ FILTER_SOURCE_PATTERNS =
12201222
# (index.html). This can be useful if you have a project on for instance GitHub
12211223
# and want to reuse the introduction page also for the Doxygen output.
12221224

1223-
USE_MDFILE_AS_MAINPAGE =
1225+
USE_MDFILE_AS_MAINPAGE = docs/index.md
12241226

12251227
# If the IMPLICIT_DIR_DOCS tag is set to YES, any README.md file found in sub-
12261228
# directories of the project's root, is used as the documentation for that sub-
@@ -1429,8 +1431,8 @@ HTML_STYLESHEET =
14291431
# documentation.
14301432
# This tag requires that the tag GENERATE_HTML is set to YES.
14311433

1432-
HTML_EXTRA_STYLESHEET = customization/doxygen-awesome.css \
1433-
customization/custom.css
1434+
HTML_EXTRA_STYLESHEET = docs/customization/doxygen-awesome.css \
1435+
docs/customization/custom.css
14341436

14351437
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
14361438
# other source files which should be copied to the HTML output directory. Note
@@ -2605,7 +2607,7 @@ HIDE_UNDOC_RELATIONS = YES
26052607
# set to NO
26062608
# The default value is: NO.
26072609

2608-
HAVE_DOT = NO
2610+
HAVE_DOT = YES
26092611

26102612
# The DOT_NUM_THREADS specifies the number of dot invocations Doxygen is allowed
26112613
# to run in parallel. When set to 0 Doxygen will base this on the number of

include/livekit/audio_frame.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ class AudioFrameBufferInfo;
2727
class OwnedAudioFrameBuffer;
2828
} // namespace proto
2929

30+
/**
31+
* @brief Represents a raw PCM audio frame with interleaved int16 samples.
32+
*
33+
* AudioFrame holds decoded audio data along with metadata such as sample rate,
34+
* number of channels, and samples per channel. It is used for capturing and
35+
* processing audio in the LiveKit SDK.
36+
*/
3037
class AudioFrame {
3138
public:
3239
/**

include/livekit/audio_stream.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,14 @@ namespace proto {
3535
class FfiEvent;
3636
}
3737

38+
/**
39+
* @brief Event containing an audio frame received from an AudioStream.
40+
*
41+
* This struct wraps an AudioFrame and is used as the output type when
42+
* reading from an AudioStream.
43+
*/
3844
struct AudioFrameEvent {
39-
AudioFrame frame;
45+
AudioFrame frame; ///< The decoded PCM audio frame.
4046
};
4147

4248
/**

include/livekit/stats.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,21 @@ struct VideoSourceStats {
293293
double frames_per_second;
294294
};
295295

296+
/**
297+
* @brief Statistics for audio playout performance.
298+
*
299+
* Contains metrics about audio sample synthesis and playout timing,
300+
* useful for monitoring audio quality and detecting issues like underruns.
301+
*/
296302
struct AudioPlayoutStats {
297-
std::string kind;
298-
double synthesized_samples_duration;
299-
std::uint32_t synthesized_samples_events;
300-
double total_samples_duration;
301-
double total_playout_delay;
302-
std::uint64_t total_samples_count;
303+
std::string kind; ///< The type of media ("audio").
304+
double synthesized_samples_duration; ///< Duration of synthesized samples in
305+
///< seconds.
306+
std::uint32_t synthesized_samples_events; ///< Number of synthesis events
307+
///< (e.g., concealment).
308+
double total_samples_duration; ///< Total duration of all samples in seconds.
309+
double total_playout_delay; ///< Cumulative playout delay in seconds.
310+
std::uint64_t total_samples_count; ///< Total number of samples played out.
303311
};
304312

305313
struct PeerConnectionStats {

0 commit comments

Comments
 (0)