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

Implement packet Clone method #118

Merged
merged 1 commit into from
Aug 5, 2021
Merged

Implement packet Clone method #118

merged 1 commit into from
Aug 5, 2021

Conversation

ffmiruz
Copy link
Contributor

@ffmiruz ffmiruz commented Feb 3, 2021

Clone performs deep copy on a packet to produce equivalent but independently mutable packet.

Fixes #88

@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #118 (8b7b625) into master (8b8af36) will decrease coverage by 1.38%.
The diff coverage is 100.00%.

❗ Current head 8b7b625 differs from pull request most recent head 89ef314. Consider uploading reports for the commit 89ef314 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
- Coverage   93.04%   91.65%   -1.39%     
==========================================
  Files          14       13       -1     
  Lines         920      647     -273     
==========================================
- Hits          856      593     -263     
+ Misses         46       37       -9     
+ Partials       18       17       -1     
Flag Coverage Δ
go 91.65% <100.00%> (-1.39%) ⬇️
wasm 91.03% <100.00%> (-1.58%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packet.go 86.95% <100.00%> (+1.86%) ⬆️
codecs/h265_packet.go
codecs/h264_packet.go 97.87% <0.00%> (+0.29%) ⬆️
codecs/vp9_packet.go 93.23% <0.00%> (+0.64%) ⬆️
packetizer.go 83.33% <0.00%> (+2.25%) ⬆️
codecs/vp8_packet.go 100.00% <0.00%> (+5.74%) ⬆️
codecs/opus_packet.go 100.00% <0.00%> (+6.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b8af36...89ef314. Read the comment docs.

@ffmiruz ffmiruz force-pushed the clone branch 5 times, most recently from 1ed21ec to 1774656 Compare February 3, 2021 14:01
@Sean-Der
Copy link
Member

Sean-Der commented Feb 3, 2021

Woah this is awesome @ffmiyo!

This might also be a good chance to do a /v2 break. Would you be interested? We can get it into pion/webrtc right away as well. While it would be a breaking change, I don't see anyone that depends on it.

@ffmiruz
Copy link
Contributor Author

ffmiruz commented Feb 3, 2021

@Sean-Der Ah right, should've start with # 90. Sure, I'll try to do this.

Copy link
Member

@aler9 aler9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be updated to account for #119 by same author

packet_test.go Outdated
}},
},
Version: 2,
PayloadOffset: 20,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be updated to account for #119 by same author

Clone performs deep copy on a packet to produce equivalent
but independently mutable packet.

Fixes pion#88
@Sean-Der Sean-Der merged commit b670290 into pion:master Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Clone to rtp.Packet
3 participants