common.go 546 B

1234567891011121314151617181920212223242526
  1. package codecs
  2. func min(a, b int) int {
  3. if a < b {
  4. return a
  5. }
  6. return b
  7. }
  8. // audioDepacketizer is a mixin for audio codec depacketizers
  9. type audioDepacketizer struct{}
  10. func (d *audioDepacketizer) IsPartitionTail(marker bool, payload []byte) bool {
  11. return true
  12. }
  13. func (d *audioDepacketizer) IsPartitionHead(payload []byte) bool {
  14. return true
  15. }
  16. // videoDepacketizer is a mixin for video codec depacketizers
  17. type videoDepacketizer struct{}
  18. func (d *videoDepacketizer) IsPartitionTail(marker bool, payload []byte) bool {
  19. return marker
  20. }