Browse Source

move protocol-related code into internal/protocols (#2572)

pull/2580/head
Alessandro Ros 2 years ago committed by GitHub
parent
commit
99bc327d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/core/api.go
  2. 4
      internal/core/api_test.go
  3. 2
      internal/core/hls_http_server.go
  4. 2
      internal/core/metrics.go
  5. 2
      internal/core/metrics_test.go
  6. 4
      internal/core/path_test.go
  7. 2
      internal/core/pprof.go
  8. 2
      internal/core/rtmp_conn.go
  9. 2
      internal/core/rtmp_server_test.go
  10. 2
      internal/core/rtmp_source.go
  11. 2
      internal/core/rtmp_source_test.go
  12. 4
      internal/core/webrtc_http_server.go
  13. 2
      internal/core/webrtc_manager.go
  14. 2
      internal/core/webrtc_manager_test.go
  15. 2
      internal/core/webrtc_session.go
  16. 2
      internal/core/webrtc_source.go
  17. 2
      internal/core/webrtc_source_test.go
  18. 0
      internal/protocols/httpserv/handler_exit_on_panic.go
  19. 0
      internal/protocols/httpserv/handler_filter_requests.go
  20. 0
      internal/protocols/httpserv/handler_logger.go
  21. 0
      internal/protocols/httpserv/handler_server_header.go
  22. 0
      internal/protocols/httpserv/wrapped_server.go
  23. 0
      internal/protocols/httpserv/wrapped_server_test.go
  24. 0
      internal/protocols/rtmp/bytecounter/reader.go
  25. 0
      internal/protocols/rtmp/bytecounter/reader_test.go
  26. 0
      internal/protocols/rtmp/bytecounter/readwriter.go
  27. 0
      internal/protocols/rtmp/bytecounter/writer.go
  28. 0
      internal/protocols/rtmp/bytecounter/writer_test.go
  29. 0
      internal/protocols/rtmp/chunk/chunk.go
  30. 0
      internal/protocols/rtmp/chunk/chunk0.go
  31. 0
      internal/protocols/rtmp/chunk/chunk0_test.go
  32. 0
      internal/protocols/rtmp/chunk/chunk1.go
  33. 0
      internal/protocols/rtmp/chunk/chunk1_test.go
  34. 0
      internal/protocols/rtmp/chunk/chunk2.go
  35. 0
      internal/protocols/rtmp/chunk/chunk2_test.go
  36. 0
      internal/protocols/rtmp/chunk/chunk3.go
  37. 0
      internal/protocols/rtmp/chunk/chunk3_test.go
  38. 6
      internal/protocols/rtmp/conn.go
  39. 6
      internal/protocols/rtmp/conn_test.go
  40. 0
      internal/protocols/rtmp/h264conf/h264conf.go
  41. 0
      internal/protocols/rtmp/h264conf/h264conf_test.go
  42. 0
      internal/protocols/rtmp/handshake/c0s0.go
  43. 0
      internal/protocols/rtmp/handshake/c0s0_test.go
  44. 0
      internal/protocols/rtmp/handshake/c1s1.go
  45. 0
      internal/protocols/rtmp/handshake/c1s1_test.go
  46. 0
      internal/protocols/rtmp/handshake/c2s2.go
  47. 0
      internal/protocols/rtmp/handshake/c2s2_test.go
  48. 0
      internal/protocols/rtmp/handshake/dh.go
  49. 0
      internal/protocols/rtmp/handshake/handshake.go
  50. 0
      internal/protocols/rtmp/handshake/handshake_test.go
  51. 2
      internal/protocols/rtmp/message/acknowledge.go
  52. 2
      internal/protocols/rtmp/message/audio.go
  53. 2
      internal/protocols/rtmp/message/command_amf0.go
  54. 2
      internal/protocols/rtmp/message/data_amf0.go
  55. 2
      internal/protocols/rtmp/message/extended_coded_frames.go
  56. 2
      internal/protocols/rtmp/message/extended_frames_x.go
  57. 2
      internal/protocols/rtmp/message/extended_metadata.go
  58. 2
      internal/protocols/rtmp/message/extended_mpeg2ts_sequence_start.go
  59. 2
      internal/protocols/rtmp/message/extended_sequence_end.go
  60. 2
      internal/protocols/rtmp/message/extended_sequence_start.go
  61. 2
      internal/protocols/rtmp/message/message.go
  62. 4
      internal/protocols/rtmp/message/reader.go
  63. 2
      internal/protocols/rtmp/message/reader_test.go
  64. 2
      internal/protocols/rtmp/message/readwriter.go
  65. 2
      internal/protocols/rtmp/message/readwriter_test.go
  66. 2
      internal/protocols/rtmp/message/set_chunk_size.go
  67. 2
      internal/protocols/rtmp/message/set_peer_bandwidth.go
  68. 2
      internal/protocols/rtmp/message/set_window_ack_size.go
  69. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/05d2521061b772dd
  70. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/06f5bdb4e0ba6885
  71. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/2fb5da434799f2aa
  72. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/420fac969d79c3d0
  73. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/6b1d357b508b38a4
  74. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/b18a01392c7c91e9
  75. 0
      internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/f244ff2f55d1103f
  76. 2
      internal/protocols/rtmp/message/user_control_ping_request.go
  77. 2
      internal/protocols/rtmp/message/user_control_ping_response.go
  78. 2
      internal/protocols/rtmp/message/user_control_set_buffer_length.go
  79. 2
      internal/protocols/rtmp/message/user_control_stream_begin.go
  80. 2
      internal/protocols/rtmp/message/user_control_stream_dry.go
  81. 2
      internal/protocols/rtmp/message/user_control_stream_eof.go
  82. 2
      internal/protocols/rtmp/message/user_control_stream_is_recorded.go
  83. 2
      internal/protocols/rtmp/message/video.go
  84. 4
      internal/protocols/rtmp/message/writer.go
  85. 2
      internal/protocols/rtmp/message/writer_test.go
  86. 0
      internal/protocols/rtmp/rawmessage/message.go
  87. 4
      internal/protocols/rtmp/rawmessage/reader.go
  88. 4
      internal/protocols/rtmp/rawmessage/reader_test.go
  89. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/19981bffc2abbaf1
  90. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/2470f01dca6d27ef
  91. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/2c0aa0d43cf2378b
  92. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/3225fb43d226570f
  93. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/582528ddfad69eb5
  94. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/649388b35b8d7d24
  95. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/899c4ec5c6184841
  96. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/a2d2a54b9b1b0098
  97. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/ab461fd3f1e0b76d
  98. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/cf0f70a31328c9ba
  99. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/f5aad145f6286289
  100. 0
      internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzReader/2a3abe67115a80dc
  101. Some files were not shown because too many files have changed in this diff Show More

2
internal/core/api.go

@ -15,8 +15,8 @@ import ( @@ -15,8 +15,8 @@ import (
"github.com/google/uuid"
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/httpserv"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/protocols/httpserv"
)
var errAPINotFound = errors.New("not found")

4
internal/core/api_test.go

@ -25,8 +25,8 @@ import ( @@ -25,8 +25,8 @@ import (
"github.com/pion/rtp"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
var testFormatH264 = &format.H264{

2
internal/core/hls_http_server.go

@ -12,8 +12,8 @@ import ( @@ -12,8 +12,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/httpserv"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/protocols/httpserv"
)
const (

2
internal/core/metrics.go

@ -10,8 +10,8 @@ import ( @@ -10,8 +10,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/httpserv"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/protocols/httpserv"
)
func metric(key string, tags string, value int64) string {

2
internal/core/metrics_test.go

@ -14,7 +14,7 @@ import ( @@ -14,7 +14,7 @@ import (
"github.com/bluenviron/gortsplib/v4/pkg/format"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
)
func TestMetrics(t *testing.T) {

4
internal/core/path_test.go

@ -24,8 +24,8 @@ import ( @@ -24,8 +24,8 @@ import (
"github.com/pion/rtp"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
var runOnDemandSampleScript = `

2
internal/core/pprof.go

@ -8,8 +8,8 @@ import ( @@ -8,8 +8,8 @@ import (
_ "net/http/pprof"
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/httpserv"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/protocols/httpserv"
)
type pprofParent interface {

2
internal/core/rtmp_conn.go

@ -21,7 +21,7 @@ import ( @@ -21,7 +21,7 @@ import (
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/externalcmd"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
"github.com/bluenviron/mediamtx/internal/stream"
"github.com/bluenviron/mediamtx/internal/unit"
)

2
internal/core/rtmp_server_test.go

@ -12,7 +12,7 @@ import ( @@ -12,7 +12,7 @@ import (
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
)
func TestRTMPServer(t *testing.T) {

2
internal/core/rtmp_source.go

@ -13,7 +13,7 @@ import ( @@ -13,7 +13,7 @@ import (
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
"github.com/bluenviron/mediamtx/internal/stream"
"github.com/bluenviron/mediamtx/internal/unit"
)

2
internal/core/rtmp_source_test.go

@ -13,7 +13,7 @@ import ( @@ -13,7 +13,7 @@ import (
"github.com/pion/rtp"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp"
)
func TestRTMPSource(t *testing.T) {

4
internal/core/webrtc_http_server.go

@ -16,9 +16,9 @@ import ( @@ -16,9 +16,9 @@ import (
pwebrtc "github.com/pion/webrtc/v3"
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/httpserv"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/httpserv"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
//go:embed webrtc_publish_index.html

2
internal/core/webrtc_manager.go

@ -21,7 +21,7 @@ import ( @@ -21,7 +21,7 @@ import (
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/externalcmd"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
const (

2
internal/core/webrtc_manager_test.go

@ -16,7 +16,7 @@ import ( @@ -16,7 +16,7 @@ import (
pwebrtc "github.com/pion/webrtc/v3"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
func TestWebRTCRead(t *testing.T) {

2
internal/core/webrtc_session.go

@ -25,9 +25,9 @@ import ( @@ -25,9 +25,9 @@ import (
"github.com/bluenviron/mediamtx/internal/asyncwriter"
"github.com/bluenviron/mediamtx/internal/externalcmd"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
"github.com/bluenviron/mediamtx/internal/stream"
"github.com/bluenviron/mediamtx/internal/unit"
"github.com/bluenviron/mediamtx/internal/webrtc"
)
type webrtcTrackWrapper struct {

2
internal/core/webrtc_source.go

@ -12,7 +12,7 @@ import ( @@ -12,7 +12,7 @@ import (
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
type webRTCSourceParent interface {

2
internal/core/webrtc_source_test.go

@ -13,7 +13,7 @@ import ( @@ -13,7 +13,7 @@ import (
"github.com/pion/rtp"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/webrtc"
"github.com/bluenviron/mediamtx/internal/protocols/webrtc"
)
func TestWebRTCSource(t *testing.T) {

0
internal/httpserv/handler_exit_on_panic.go → internal/protocols/httpserv/handler_exit_on_panic.go

0
internal/httpserv/handler_filter_requests.go → internal/protocols/httpserv/handler_filter_requests.go

0
internal/httpserv/handler_logger.go → internal/protocols/httpserv/handler_logger.go

0
internal/httpserv/handler_server_header.go → internal/protocols/httpserv/handler_server_header.go

0
internal/httpserv/wrapped_server.go → internal/protocols/httpserv/wrapped_server.go

0
internal/httpserv/wrapped_server_test.go → internal/protocols/httpserv/wrapped_server_test.go

0
internal/rtmp/bytecounter/reader.go → internal/protocols/rtmp/bytecounter/reader.go

0
internal/rtmp/bytecounter/reader_test.go → internal/protocols/rtmp/bytecounter/reader_test.go

0
internal/rtmp/bytecounter/readwriter.go → internal/protocols/rtmp/bytecounter/readwriter.go

0
internal/rtmp/bytecounter/writer.go → internal/protocols/rtmp/bytecounter/writer.go

0
internal/rtmp/bytecounter/writer_test.go → internal/protocols/rtmp/bytecounter/writer_test.go

0
internal/rtmp/chunk/chunk.go → internal/protocols/rtmp/chunk/chunk.go

0
internal/rtmp/chunk/chunk0.go → internal/protocols/rtmp/chunk/chunk0.go

0
internal/rtmp/chunk/chunk0_test.go → internal/protocols/rtmp/chunk/chunk0_test.go

0
internal/rtmp/chunk/chunk1.go → internal/protocols/rtmp/chunk/chunk1.go

0
internal/rtmp/chunk/chunk1_test.go → internal/protocols/rtmp/chunk/chunk1_test.go

0
internal/rtmp/chunk/chunk2.go → internal/protocols/rtmp/chunk/chunk2.go

0
internal/rtmp/chunk/chunk2_test.go → internal/protocols/rtmp/chunk/chunk2_test.go

0
internal/rtmp/chunk/chunk3.go → internal/protocols/rtmp/chunk/chunk3.go

0
internal/rtmp/chunk/chunk3_test.go → internal/protocols/rtmp/chunk/chunk3_test.go

6
internal/rtmp/conn.go → internal/protocols/rtmp/conn.go

@ -9,9 +9,9 @@ import ( @@ -9,9 +9,9 @@ import (
"github.com/notedit/rtmp/format/flv/flvio"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/rtmp/handshake"
"github.com/bluenviron/mediamtx/internal/rtmp/message"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/handshake"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/message"
)
func resultIsOK1(res *message.CommandAMF0) bool {

6
internal/rtmp/conn_test.go → internal/protocols/rtmp/conn_test.go

@ -9,9 +9,9 @@ import ( @@ -9,9 +9,9 @@ import (
"github.com/notedit/rtmp/format/flv/flvio"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/rtmp/handshake"
"github.com/bluenviron/mediamtx/internal/rtmp/message"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/handshake"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/message"
)
func TestNewClientConn(t *testing.T) {

0
internal/rtmp/h264conf/h264conf.go → internal/protocols/rtmp/h264conf/h264conf.go

0
internal/rtmp/h264conf/h264conf_test.go → internal/protocols/rtmp/h264conf/h264conf_test.go

0
internal/rtmp/handshake/c0s0.go → internal/protocols/rtmp/handshake/c0s0.go

0
internal/rtmp/handshake/c0s0_test.go → internal/protocols/rtmp/handshake/c0s0_test.go

0
internal/rtmp/handshake/c1s1.go → internal/protocols/rtmp/handshake/c1s1.go

0
internal/rtmp/handshake/c1s1_test.go → internal/protocols/rtmp/handshake/c1s1_test.go

0
internal/rtmp/handshake/c2s2.go → internal/protocols/rtmp/handshake/c2s2.go

0
internal/rtmp/handshake/c2s2_test.go → internal/protocols/rtmp/handshake/c2s2_test.go

0
internal/rtmp/handshake/dh.go → internal/protocols/rtmp/handshake/dh.go

0
internal/rtmp/handshake/handshake.go → internal/protocols/rtmp/handshake/handshake.go

0
internal/rtmp/handshake/handshake_test.go → internal/protocols/rtmp/handshake/handshake_test.go

2
internal/rtmp/message/acknowledge.go → internal/protocols/rtmp/message/acknowledge.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// Acknowledge is an acknowledgement message.

2
internal/rtmp/message/audio.go → internal/protocols/rtmp/message/audio.go

@ -4,7 +4,7 @@ import ( @@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
const (

2
internal/rtmp/message/command_amf0.go → internal/protocols/rtmp/message/command_amf0.go

@ -5,7 +5,7 @@ import ( @@ -5,7 +5,7 @@ import (
"github.com/notedit/rtmp/format/flv/flvio"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// CommandAMF0 is a AMF0 command message.

2
internal/rtmp/message/data_amf0.go → internal/protocols/rtmp/message/data_amf0.go

@ -3,7 +3,7 @@ package message @@ -3,7 +3,7 @@ package message
import (
"github.com/notedit/rtmp/format/flv/flvio"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// DataAMF0 is a AMF0 data message.

2
internal/rtmp/message/extended_coded_frames.go → internal/protocols/rtmp/message/extended_coded_frames.go

@ -4,7 +4,7 @@ import ( @@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedCodedFrames is a CodedFrames extended message.

2
internal/rtmp/message/extended_frames_x.go → internal/protocols/rtmp/message/extended_frames_x.go

@ -4,7 +4,7 @@ import ( @@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedFramesX is a FramesX extended message.

2
internal/rtmp/message/extended_metadata.go → internal/protocols/rtmp/message/extended_metadata.go

@ -3,7 +3,7 @@ package message @@ -3,7 +3,7 @@ package message
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedMetadata is a metadata extended message.

2
internal/rtmp/message/extended_mpeg2ts_sequence_start.go → internal/protocols/rtmp/message/extended_mpeg2ts_sequence_start.go

@ -3,7 +3,7 @@ package message @@ -3,7 +3,7 @@ package message
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedMPEG2TSSequenceStart is a MPEG2-TS sequence start extended message.

2
internal/rtmp/message/extended_sequence_end.go → internal/protocols/rtmp/message/extended_sequence_end.go

@ -3,7 +3,7 @@ package message @@ -3,7 +3,7 @@ package message
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedSequenceEnd is a sequence end extended message.

2
internal/rtmp/message/extended_sequence_start.go → internal/protocols/rtmp/message/extended_sequence_start.go

@ -3,7 +3,7 @@ package message @@ -3,7 +3,7 @@ package message
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// ExtendedSequenceStart is a sequence start extended message.

2
internal/rtmp/message/message.go → internal/protocols/rtmp/message/message.go

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
package message
import (
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
const (

4
internal/rtmp/message/reader.go → internal/protocols/rtmp/message/reader.go

@ -4,8 +4,8 @@ import ( @@ -4,8 +4,8 @@ import (
"fmt"
"io"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
func allocateMessage(raw *rawmessage.Message) (Message, error) {

2
internal/rtmp/message/reader_test.go → internal/protocols/rtmp/message/reader_test.go

@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
"github.com/notedit/rtmp/format/flv/flvio"
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
)
var readWriterCases = []struct {

2
internal/rtmp/message/readwriter.go → internal/protocols/rtmp/message/readwriter.go

@ -3,7 +3,7 @@ package message @@ -3,7 +3,7 @@ package message
import (
"io"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
)
// ReadWriter is a message reader/writer.

2
internal/rtmp/message/readwriter_test.go → internal/protocols/rtmp/message/readwriter_test.go

@ -7,7 +7,7 @@ import ( @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
)
type duplexRW struct {

2
internal/rtmp/message/set_chunk_size.go → internal/protocols/rtmp/message/set_chunk_size.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// SetChunkSize is a set chunk size message.

2
internal/rtmp/message/set_peer_bandwidth.go → internal/protocols/rtmp/message/set_peer_bandwidth.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// SetPeerBandwidth is a set peer bandwidth message.

2
internal/rtmp/message/set_window_ack_size.go → internal/protocols/rtmp/message/set_window_ack_size.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// SetWindowAckSize is a set window acknowledgement message.

0
internal/rtmp/message/testdata/fuzz/FuzzReader/05d2521061b772dd → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/05d2521061b772dd vendored

0
internal/rtmp/message/testdata/fuzz/FuzzReader/06f5bdb4e0ba6885 → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/06f5bdb4e0ba6885 vendored

0
internal/rtmp/message/testdata/fuzz/FuzzReader/2fb5da434799f2aa → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/2fb5da434799f2aa vendored

0
internal/rtmp/message/testdata/fuzz/FuzzReader/420fac969d79c3d0 → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/420fac969d79c3d0 vendored

0
internal/rtmp/message/testdata/fuzz/FuzzReader/6b1d357b508b38a4 → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/6b1d357b508b38a4 vendored

0
internal/rtmp/message/testdata/fuzz/FuzzReader/b18a01392c7c91e9 → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/b18a01392c7c91e9 vendored

0
internal/rtmp/message/testdata/fuzz/FuzzReader/f244ff2f55d1103f → internal/protocols/rtmp/message/testdata/fuzz/FuzzReader/f244ff2f55d1103f vendored

2
internal/rtmp/message/user_control_ping_request.go → internal/protocols/rtmp/message/user_control_ping_request.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlPingRequest is a user control message.

2
internal/rtmp/message/user_control_ping_response.go → internal/protocols/rtmp/message/user_control_ping_response.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlPingResponse is a user control message.

2
internal/rtmp/message/user_control_set_buffer_length.go → internal/protocols/rtmp/message/user_control_set_buffer_length.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlSetBufferLength is a user control message.

2
internal/rtmp/message/user_control_stream_begin.go → internal/protocols/rtmp/message/user_control_stream_begin.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlStreamBegin is a user control message.

2
internal/rtmp/message/user_control_stream_dry.go → internal/protocols/rtmp/message/user_control_stream_dry.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlStreamDry is a user control message.

2
internal/rtmp/message/user_control_stream_eof.go → internal/protocols/rtmp/message/user_control_stream_eof.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlStreamEOF is a user control message.

2
internal/rtmp/message/user_control_stream_is_recorded.go → internal/protocols/rtmp/message/user_control_stream_is_recorded.go

@ -3,7 +3,7 @@ package message //nolint:dupl @@ -3,7 +3,7 @@ package message //nolint:dupl
import (
"fmt"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// UserControlStreamIsRecorded is a user control message.

2
internal/rtmp/message/video.go → internal/protocols/rtmp/message/video.go

@ -6,7 +6,7 @@ import ( @@ -6,7 +6,7 @@ import (
"github.com/notedit/rtmp/format/flv/flvio"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
const (

4
internal/rtmp/message/writer.go → internal/protocols/rtmp/message/writer.go

@ -3,8 +3,8 @@ package message @@ -3,8 +3,8 @@ package message
import (
"io"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/rtmp/rawmessage"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/rawmessage"
)
// Writer is a message writer.

2
internal/rtmp/message/writer_test.go → internal/protocols/rtmp/message/writer_test.go

@ -6,7 +6,7 @@ import ( @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
)
func TestWriter(t *testing.T) {

0
internal/rtmp/rawmessage/message.go → internal/protocols/rtmp/rawmessage/message.go

4
internal/rtmp/rawmessage/reader.go → internal/protocols/rtmp/rawmessage/reader.go

@ -7,8 +7,8 @@ import ( @@ -7,8 +7,8 @@ import (
"io"
"time"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/rtmp/chunk"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/chunk"
)
var errMoreChunksNeeded = errors.New("more chunks are needed")

4
internal/rtmp/rawmessage/reader_test.go → internal/protocols/rtmp/rawmessage/reader_test.go

@ -7,8 +7,8 @@ import ( @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/bluenviron/mediamtx/internal/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/rtmp/chunk"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/bytecounter"
"github.com/bluenviron/mediamtx/internal/protocols/rtmp/chunk"
)
var cases = []struct {

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/19981bffc2abbaf1 → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/19981bffc2abbaf1 vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/2470f01dca6d27ef → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/2470f01dca6d27ef vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/2c0aa0d43cf2378b → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/2c0aa0d43cf2378b vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/3225fb43d226570f → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/3225fb43d226570f vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/582528ddfad69eb5 → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/582528ddfad69eb5 vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/649388b35b8d7d24 → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/649388b35b8d7d24 vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/899c4ec5c6184841 → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/899c4ec5c6184841 vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/a2d2a54b9b1b0098 → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/a2d2a54b9b1b0098 vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/ab461fd3f1e0b76d → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/ab461fd3f1e0b76d vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/cf0f70a31328c9ba → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/cf0f70a31328c9ba vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/f5aad145f6286289 → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzDecoder/f5aad145f6286289 vendored

0
internal/rtmp/rawmessage/testdata/fuzz/FuzzReader/2a3abe67115a80dc → internal/protocols/rtmp/rawmessage/testdata/fuzz/FuzzReader/2a3abe67115a80dc vendored

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save