Skip to content

Commit 48f6900

Browse files
committed
Updated Docs to 2.1.0 (Upcoming)
1 parent b1c1b34 commit 48f6900

File tree

127 files changed

+2663
-415
lines changed

Some content is hidden

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

127 files changed

+2663
-415
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<page>
2+
<h1>Add Incoming Video</h1>
3+
<config id="ADD_INCOMING_VIDEO_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight mark="9-13">
6+
from ntgcalls import NTgCalls
7+
...
8+
9+
app = NTgCalls()
10+
...
11+
endpoint = ...
12+
ssrc_groups = ...
13+
14+
await app.add_incoming_video(
15+
-1001185324811,
16+
endpoint,
17+
ssrc_groups,
18+
)
19+
</syntax-highlight>
20+
<separator/>
21+
<h2>Details</h2>
22+
<category-title noref="true">
23+
<shi>async</shi> <ref src="method">NTgCalls.<sb>add_incoming_video</sb></ref>() <shi>-> int</shi>
24+
</category-title>
25+
<subtext>
26+
<config id="ADD_INCOMING_VIDEO_DESC2"/>
27+
<br/>
28+
<category>
29+
<pg-title>PARAMETERS</pg-title>
30+
<subtext>
31+
<config id="ARG_INT_ID"/>
32+
<category-title><ref><sb>endpoint</sb></ref>: <shi>str</shi></category-title>
33+
<config id="ENDPOINT_DESC"/>
34+
<category-title><ref><sb>ssrc_groups</sb></ref>: <shi>list</shi>[<docs-ref link="/NTgCalls/Available Types/SsrcGroup">ntgcalls.SsrcGroup</docs-ref>]</category-title>
35+
<config id="SSRC_GROUPS_DESC"/>
36+
</subtext>
37+
</category>
38+
<br/>
39+
<category>
40+
<pg-title>RAISES</pg-title>
41+
<subtext>
42+
<config id="CONNECTION_NOT_FOUND_EXCEPTION"/>
43+
</subtext>
44+
</category>
45+
</subtext>
46+
</page>

NTgCalls/Advanced Methods/Get State.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1>Get State</h1>
33
<config id="GET_STATE_DESC"/>
44
<h3>Example</h3>
5-
<syntax-highlight mark="7-10">
5+
<syntax-highlight mark="7-9">
66
from ntgcalls import NTgCalls
77
...
88

@@ -31,7 +31,7 @@
3131
<category>
3232
<pg-title>RAISES</pg-title>
3333
<subtext>
34-
<config id="NTG_NO_GROUP_CALL"/>
34+
<config id="CONNECTION_NOT_FOUND_EXCEPTION"/>
3535
</subtext>
3636
</category>
3737
</subtext>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<page>
2+
<h1>Remove Incoming Video</h1>
3+
<config id="REMOVE_INCOMING_VIDEO_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight mark="8-11">
6+
from ntgcalls import NTgCalls
7+
...
8+
9+
app = NTgCalls()
10+
...
11+
endpoint = ...
12+
13+
await app.remove_incoming_video(
14+
-1001185324811,
15+
endpoint,
16+
)
17+
</syntax-highlight>
18+
<separator/>
19+
<h2>Details</h2>
20+
<category-title noref="true">
21+
<shi>async</shi> <ref src="method">NTgCalls.<sb>remove_incoming_video</sb></ref>()
22+
</category-title>
23+
<subtext>
24+
<config id="REMOVE_INCOMING_VIDEO_DESC2"/>
25+
<br/>
26+
<category>
27+
<pg-title>PARAMETERS</pg-title>
28+
<subtext>
29+
<config id="ARG_INT_ID"/>
30+
<category-title><ref><sb>endpoint</sb></ref>: <shi>str</shi></category-title>
31+
<config id="ENDPOINT_DESC"/>
32+
</subtext>
33+
</category>
34+
<br/>
35+
<category>
36+
<pg-title>RAISES</pg-title>
37+
<subtext>
38+
<config id="CONNECTION_NOT_FOUND_EXCEPTION"/>
39+
</subtext>
40+
</category>
41+
</subtext>
42+
</page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<page>
2+
<h1>Send External Frame</h1>
3+
<config id="SEND_EXTERNAL_FRAME_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight mark="11-21">
6+
from ntgcalls import NTgCalls
7+
from ntgcalls import StreamDevice
8+
from ntgcalls import FrameData
9+
from datetime import datetime
10+
...
11+
12+
app = NTgCalls()
13+
...
14+
pcm16_le_data = ...
15+
16+
await app.send_external_frame(
17+
-1001185324811,
18+
StreamDevice.MICROPHONE,
19+
pcm16_le_data,
20+
FrameData(
21+
int(datetime.now().timestamp()),
22+
0,
23+
0,
24+
0,
25+
)
26+
)
27+
</syntax-highlight>
28+
<separator/>
29+
<h2>Details</h2>
30+
<category-title noref="true">
31+
<shi>async</shi> <ref src="method">NTgCalls.<sb>send_external_frame</sb></ref>()
32+
</category-title>
33+
<subtext>
34+
<config id="SEND_EXTERNAL_FRAME_DESC2"/>
35+
<br/>
36+
<category>
37+
<pg-title>PARAMETERS</pg-title>
38+
<subtext>
39+
<config id="ARG_INT_ID"/>
40+
<category-title><ref><sb>device</sb></ref>: <docs-ref link="/NTgCalls/Available Enums/StreamDevice">ntgcalls.StreamDevice</docs-ref></category-title>
41+
<config id="DEVICE_DESC"/>
42+
<category-title><ref><sb>frame</sb></ref>: <shi>bytes</shi></category-title>
43+
<config id="FRAME_BUFFER_DESC"/>
44+
<category-title><ref><sb>frame_data</sb></ref>: <docs-ref link="/NTgCalls/Available Types/FrameData">ntgcalls.FrameData</docs-ref></category-title>
45+
<subtext><config id="FRAME_DATA_DESC"/></subtext>
46+
</subtext>
47+
</category>
48+
<br/>
49+
<category>
50+
<pg-title>RAISES</pg-title>
51+
<subtext>
52+
53+
</subtext>
54+
</category>
55+
</subtext>
56+
</page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<page>
2+
<h1>Send Signaling Data</h1>
3+
<config id="SEND_SIGNALING_DATA_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight mark="7-10">
6+
from ntgcalls import NTgCalls
7+
...
8+
9+
app = NTgCalls()
10+
...
11+
12+
await app.send_signaling_data(
13+
-1001185324811,
14+
"data",
15+
)
16+
</syntax-highlight>
17+
<separator/>
18+
<h2>Details</h2>
19+
<category-title noref="true">
20+
<shi>async</shi> <ref src="method">NTgCalls.<sb>send_signaling_data</sb></ref>()
21+
</category-title>
22+
<subtext>
23+
<config id="SEND_SIGNALING_DATA_DESC2"/>
24+
<br/>
25+
<category>
26+
<pg-title>PARAMETERS</pg-title>
27+
<subtext>
28+
<config id="ARG_INT_ID"/>
29+
<category-title><ref><sb>data</sb></ref>: <shi>bytes</shi></category-title>
30+
<subtext><config id="SIGNALING_DATA_DESC"/></subtext>
31+
</subtext>
32+
</category>
33+
<br/>
34+
<category>
35+
<pg-title>RAISES</pg-title>
36+
<subtext>
37+
38+
</subtext>
39+
</category>
40+
</subtext>
41+
</page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<page>
2+
<h1>ntg_add_incoming_video</h1>
3+
<config id="ADD_INCOMING_VIDEO_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight language="c" mark="14">
6+
#include &lt;stdint.h&gt;
7+
#include "ntgcalls.h"
8+
9+
int main() {
10+
uint32_t uid = ntg_init();
11+
...
12+
int64_t chatID = ...; // Obtain the chat ID
13+
char* endpoint = ...; // Obtain the endpoint of the incoming video
14+
ntg_ssrc_group_struct* ssrcGroups = ...; // Obtain the SSRC groups of the incoming video
15+
int size = ...; // Obtain the size of the SSRC groups array
16+
uint32_t ssrc_buffer;
17+
// Initialize the async struct
18+
ntg_async_struct future;
19+
ntg_add_incoming_video(uid, chatID, endpoint, ssrcGroups, &amp;ssrc_buffer, &amp;future);
20+
// Wait for the async operation to complete
21+
return 0;
22+
}
23+
</syntax-highlight>
24+
<separator/>
25+
<h2>Details</h2>
26+
<category-title noref="true">
27+
<ref><shi language="c">int</shi> <sb src="method">ntg_add_incoming_video</sb></ref>()
28+
</category-title>
29+
<subtext>
30+
<config id="ADD_INCOMING_VIDEO_DESC2"/>
31+
<br/>
32+
<category>
33+
<pg-title>PARAMETERS</pg-title>
34+
<subtext>
35+
<config id="ARG_C_UID"/>
36+
<config id="ARG_C_CHAT_ID"/>
37+
<category-title><shi language="c">char*</shi> <ref><sb>endpoint</sb></ref></category-title>
38+
<config id="ENDPOINT_DESC"/>
39+
<category-title><docs-ref link="/NTgCalls/Available Types/ntg_ssrc_group_struct">ntg_ssrc_group_struct</docs-ref><shi>*</shi> <ref><sb>ssrcGroups</sb></ref></category-title>
40+
<config id="SSRC_GROUPS_DESC"/>
41+
<category-title><shi language="c">int</shi> <ref><sb>size</sb></ref></category-title>
42+
<subtext><text>The size of the SSRC groups array.</text></subtext>
43+
<category-title><shi language="c">uint32_t*</shi> <ref><sb>buffer</sb></ref></category-title>
44+
<subtext><text>The buffer to store the SSRC of the incoming video.</text></subtext>
45+
<config id="ARG_ASYNC_STRUCT"/>
46+
</subtext>
47+
</category>
48+
<br/>
49+
<category>
50+
<pg-title>ERROR CODES</pg-title>
51+
<subtext>
52+
<config id="BASE_SYNC_C_EXCEPTION"/>
53+
</subtext>
54+
<br/>
55+
<pg-title>ASYNC ERROR CODES</pg-title>
56+
<subtext>
57+
<config id="BASE_CONNECTION_EXCEPTIONS"/>
58+
</subtext>
59+
</category>
60+
</subtext>
61+
</page>

NTgCalls/Advanced Methods/ntg_calls.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
...
1818
int size = ... ; // Get the size of the call list
1919
ntg_call_struct buffer[size];
20-
ntg_async_struct future;
2120
// Initialize the async struct
21+
ntg_async_struct future;
2222
int result = ntg_calls(uid, buffer, size, &amp;future);
2323
// Wait for the async operation to complete
2424
for (int i = 0; i &lt; result; i++) {

NTgCalls/Advanced Methods/ntg_calls_count.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
...
1414
int64_t chatID = ...; // Obtain the chat ID
1515
int count = 0;
16-
ntg_async_struct future;
1716
// Initialize the async struct
17+
ntg_async_struct future;
1818
int result = ntg_calls_count(uid, &amp;count, &amp;future);
1919
// Wait for the async operation to complete
2020
printf("Number of active group calls: %d\n", count);

NTgCalls/Advanced Methods/ntg_cpu_usage.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
uint32_t uid = ntg_init();
1111
...
1212
double buffer;
13-
ntg_async_struct future;
1413
// Initialize the async struct
14+
ntg_async_struct future;
1515
int64_t usage = ntg_cpu_usage(uid, &amp;buffer, &amp;future);
1616
// Wait for the async operation to complete and use
1717
return 0;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<page>
2+
<h1>ntg_enable_g_lib_loop</h1>
3+
<config id="ENABLE_GLIB_LOOP_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight language="cpp" mark="6">
6+
#include &lt;stdint.h&gt;
7+
#include "ntgcalls.h"
8+
9+
int main() {
10+
...
11+
ntg_enable_g_lib_loop(true);
12+
return 0;
13+
}
14+
</syntax-highlight>
15+
<separator/>
16+
<h2>Details</h2>
17+
<category-title noref="true">
18+
<ref><shi language="c">int</shi> <sb src="method">ntg_enable_g_lib_loop</sb></ref>()
19+
</category-title>
20+
<subtext>
21+
<config id="ENABLE_GLIB_LOOP_DESC2"/>
22+
<br/>
23+
<category>
24+
<pg-title>PARAMETERS</pg-title>
25+
<subtext>
26+
<category-title><shi>bool</shi> <ref><sb>enable</sb></ref></category-title>
27+
<config id="ENABLE_OR_DISABLE_GLIB_DESC"/>
28+
</subtext>
29+
</category>
30+
</subtext>
31+
</page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<page>
2+
<h1>ntg_enable_h264_encoder</h1>
3+
<config id="ENABLE_H264_ENCODER_DESC"/>
4+
<h3>Example</h3>
5+
<syntax-highlight language="cpp" mark="6">
6+
#include &lt;stdint.h&gt;
7+
#include "ntgcalls.h"
8+
9+
int main() {
10+
...
11+
ntg_enable_h264_encoder(true);
12+
return 0;
13+
}
14+
</syntax-highlight>
15+
<separator/>
16+
<h2>Details</h2>
17+
<category-title noref="true">
18+
<ref><shi language="c">int</shi> <sb src="method">ntg_enable_h264_encoder</sb></ref>()
19+
</category-title>
20+
<subtext>
21+
<config id="ENABLE_H264_ENCODER_DESC2"/>
22+
<br/>
23+
<category>
24+
<pg-title>PARAMETERS</pg-title>
25+
<subtext>
26+
<category-title><shi>bool</shi> <ref>enable</ref></category-title>
27+
<config id="ENABLE_OR_DISABLE_H264_DESC"/>
28+
</subtext>
29+
</category>
30+
</subtext>
31+
</page>

0 commit comments

Comments
 (0)