Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sample] GStreamer media receiver #1963

Merged
merged 24 commits into from
Apr 11, 2024
Merged

[Sample] GStreamer media receiver #1963

merged 24 commits into from
Apr 11, 2024

Conversation

niyatim23
Copy link
Contributor

@niyatim23 niyatim23 commented Apr 3, 2024

Issue #, if available:
#1946

What was changed?

  • Introduced GStAudioVideoReceiver.c and kvsWebrtcClientViewerGstSample to write media received by either the master or the viewer by setting receiveAudioVideoSource appropriately

Why was it changed?

  • Currently there is no way to consume the media received by the viewer. We just log it. Instead, with this change, we would now write it to a file using GStreamer

How was it changed?

  • Introduced kvsWebrtcClientViewerGstSample
  • Introduced GStAudioVideoReceiver contains the transceiver callbacks, the receiveGstreamerAudioVideo which contains the GStreamer pipeline to obtain media via appsrc
  • Updated one of the builds to run with ENABLE_GST_SAMPLE_RECEIVER
  • Added an H265 / AAC source pipeline to kvsWebrtcClientMasterGstSample

What testing was done for the changes?

  • Tested the kvsWebrtcClientViewer with the kvsWebrtcClientMasterGstSample for H265/AAC to verify that the media
  • Tested the kvsWebrtcClientViewer with the kvsWebrtcClientMaster for H265/AAC, H264/OPUS, H265/OPUS to verify that the media
  • Tested the kvsWebrtcClientMasterGstSample and kvsWebrtcClientViewer with the browser's viewer but it runs into matroskamux matroska-mux.c:1134:gst_matroska_mux_video_pad_setcaps:<mux> error: Caps changes are not supported by Matroska from time to time but not always as the browser's changes the level while sending the media sometimes. This may require a more complex parsing logic.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.77%. Comparing base (5b98fc0) to head (4c61c55).

❗ Current head 4c61c55 differs from pull request most recent head e2e902e. Consider uploading reports for the commit e2e902e to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1963      +/-   ##
===========================================
- Coverage    88.79%   88.77%   -0.03%     
===========================================
  Files           45       45              
  Lines        12508    12510       +2     
===========================================
- Hits         11107    11106       -1     
- Misses        1401     1404       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niyatim23 niyatim23 requested review from disa6302 and sirknightj April 3, 2024 23:28
@niyatim23 niyatim23 marked this pull request as ready for review April 3, 2024 23:32
@niyatim23 niyatim23 changed the title GStreamer media receiver [Sample] GStreamer media receiver Apr 3, 2024
README.md Outdated Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Outdated Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Show resolved Hide resolved
samples/Samples.h Outdated Show resolved Hide resolved
samples/kvsWebRTCClientMasterGstSample.c Outdated Show resolved Hide resolved
samples/Samples.h Outdated Show resolved Hide resolved
sirknightj
sirknightj previously approved these changes Apr 5, 2024
.github/workflows/ci.yml Outdated Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Outdated Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Outdated Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Outdated Show resolved Hide resolved
samples/GstAudioVideoReceiver.c Outdated Show resolved Hide resolved
@niyatim23 niyatim23 merged commit a07a25c into develop Apr 11, 2024
30 checks passed
@niyatim23 niyatim23 deleted the viewer_gstreamer branch April 11, 2024 20:53
niyatim23 added a commit that referenced this pull request May 1, 2024
* create the gst receiver

* fix ci

* cmake flag

* clang format, add cmake flag in ci

* install gstreamer on ci

* use macos12

* use defined values

* indent

* clang-format

* readme and commentsa

* clang :(

* install glib to fix ci

* -DCOMPILER_WARNINGS=FALSE to fix the CI

* fix macos version for clang

* address comments and cleanup

* new viewer with gst

* clang-format

* missing null check

* address comments

* -DCOMPILER_WARNINGS=TRUE

* clang-format

* gst_init_check

* fix CI

* fix CI
@niyatim23 niyatim23 mentioned this pull request May 1, 2024
disa6302 pushed a commit that referenced this pull request May 2, 2024
* create the gst receiver

* fix ci

* cmake flag

* clang format, add cmake flag in ci

* install gstreamer on ci

* use macos12

* use defined values

* indent

* clang-format

* readme and commentsa

* clang :(

* install glib to fix ci

* -DCOMPILER_WARNINGS=FALSE to fix the CI

* fix macos version for clang

* address comments and cleanup

* new viewer with gst

* clang-format

* missing null check

* address comments

* -DCOMPILER_WARNINGS=TRUE

* clang-format

* gst_init_check

* fix CI

* fix CI
niyatim23 added a commit that referenced this pull request May 2, 2024
* create the gst receiver

* fix ci

* cmake flag

* clang format, add cmake flag in ci

* install gstreamer on ci

* use macos12

* use defined values

* indent

* clang-format

* readme and commentsa

* clang :(

* install glib to fix ci

* -DCOMPILER_WARNINGS=FALSE to fix the CI

* fix macos version for clang

* address comments and cleanup

* new viewer with gst

* clang-format

* missing null check

* address comments

* -DCOMPILER_WARNINGS=TRUE

* clang-format

* gst_init_check

* fix CI

* fix CI
@niyatim23 niyatim23 mentioned this pull request May 2, 2024
niyatim23 added a commit that referenced this pull request May 9, 2024
* Add H265 and AAC frames (#1962)

* aac and h265 frames

* update readme

* update cmake with h265 and aac

* clang formay

* [Sample] GStreamer media receiver (#1963)

* create the gst receiver

* fix ci

* cmake flag

* clang format, add cmake flag in ci

* install gstreamer on ci

* use macos12

* use defined values

* indent

* clang-format

* readme and commentsa

* clang :(

* install glib to fix ci

* -DCOMPILER_WARNINGS=FALSE to fix the CI

* fix macos version for clang

* address comments and cleanup

* new viewer with gst

* clang-format

* missing null check

* address comments

* -DCOMPILER_WARNINGS=TRUE

* clang-format

* gst_init_check

* fix CI

* fix CI

* [Bug] GStreamer sample (#1972)

* gst-sample-fix

* modify the message

* fix windows

* set to null

* fix pts and eos in sample

* unused var removed

* move null init

* Version check job (#1974)

* Version check job

* Working Version check template

* Retest with dev

* Version lint

* Version lint

* use new frames (#1978)

* Sample TWCC implementation (#1957)

* encoder bitrate change based on twcc

* Change to 5% inc and dec

* modify percentages

* ema based calc

* EMa fix

* Nits

* Readme

* flip

* memset remove

* Readme update, move enable flags to createSampleConfiguration

* Add codecov token

* [Feature] Add H265 support with SDP, RTP payloader-deplayloader (#1965)

* Add RtpH265Payloader.c and RtpH265Payloader.h

* Add support for H265 in PeerConnection/SessionDescription

* Add support for H265 in PeerConnection/PeerConnection

* Add support for H265 in PeerConnection/Rtp

* Add support for H265 in samples/Common.c

* Add support for H265 in samples/kvsWebRTCClientMaster.c

* rtp, sdp fix, flag removed, clang fixed, windows build fixed, new test added

* test fix

* cleanup

* cleanup

* remove #if 0

* clang

* presentation ts fix

* clang-format fix

* PKG_CONFIG_PATH in kvscommon

* missing bracket

* fix all builds

* ci

* cleanup

* fix windows build, rename h265 defs

* remove duplicate line from h264 and h265

* sample changes

* address comments

* clang-format

* gst sample

* cleanup args

* clang-format

* cleanup

* add sdp tests

* address comments

* address commentas

* set default payload type only once

* address comments

* fix height and width

* sdp change

---------

Co-authored-by: Hongli Wang <[email protected]>

* Version bump, fix tests, remove enableIceStats

* Remove AAC related changes

* Remove AAC frames

* Clang format

* fix kvsWebrtcClientMasterGstSample.c name in CMakeLists

---------

Co-authored-by: Divya Sampath Kumar <[email protected]>
Co-authored-by: Hongli Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants