Skip to content

Commit

Permalink
viewer sample: wrap datachannel callback with ENABLE_DATA_CHANNEL (#…
Browse files Browse the repository at this point in the history
…1261)

* create data channel sample (#1203)

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* removed unused variables, moved variable declarations to the top of a block

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* Cancel the thread once mediaThreadStarted flag is set to false (#1227)

* Initial stale PR template (#1226)

* Update stale issue template

* Testing every minute

* Fix stale issue PR template (#1234)

No code changed. Just a template change. So merging

* Add bug and question label

* Switch stale PR action to daily cadence

* [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228)

* viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL`

Signed-off-by: [email protected] <[email protected]>

Co-authored-by: Niyati Maheshwari <[email protected]>
Co-authored-by: Divya Sampath Kumar <[email protected]>
Co-authored-by: ela34 <[email protected]>
  • Loading branch information
4 people authored Sep 10, 2021
1 parent 343dd35 commit c9367c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/kvsWebRTCClientViewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

extern PSampleConfiguration gSampleConfiguration;

#ifdef ENABLE_DATA_CHANNEL
// onMessage callback for a message received by the viewer on a data channel
VOID dataChannelOnMessageCallback(UINT64 customData, PRtcDataChannel pDataChannel, BOOL isBinary, PBYTE pMessage, UINT32 pMessageLen)
{
Expand All @@ -26,6 +27,7 @@ VOID dataChannelOnOpenCallback(UINT64 customData, PRtcDataChannel pDataChannel)
DLOGI("[KVS Viewer] dataChannelSend(): operation returned status code: 0x%08x \n", retStatus);
}
}
#endif

INT32 main(INT32 argc, CHAR* argv[])
{
Expand Down

0 comments on commit c9367c9

Please sign in to comment.