mirror of
https://github.com/pion/webrtc.git
synced 2025-10-27 01:00:35 +08:00
Add H264 send/receive and packetization support
This commit is contained in:
committed by
John R. Bradley
parent
dfd08a5ac4
commit
cfba14cfea
@@ -32,6 +32,8 @@ func CreatePipeline(codec webrtc.TrackType) *Pipeline {
|
||||
pipelineStr += ", payload=96, encoding-name=OPUS ! rtpopusdepay ! decodebin ! autoaudiosink"
|
||||
case webrtc.VP9:
|
||||
pipelineStr += " ! rtpvp9depay ! decodebin ! autovideosink"
|
||||
case webrtc.H264:
|
||||
pipelineStr += " ! rtph264depay ! decodebin ! autovideosink"
|
||||
default:
|
||||
panic("Unhandled codec " + codec.String())
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ func CreatePipeline(codec webrtc.TrackType, in chan<- webrtc.RTCSample) *Pipelin
|
||||
pipelineStr = "videotestsrc ! vp8enc ! " + pipelineStr
|
||||
case webrtc.VP9:
|
||||
pipelineStr = "videotestsrc ! vp9enc ! " + pipelineStr
|
||||
case webrtc.H264:
|
||||
pipelineStr = "videotestsrc ! video/x-raw,format=I420 ! x264enc bframes=0 speed-preset=veryfast key-int-max=60 ! video/x-h264,stream-format=byte-stream ! " + pipelineStr
|
||||
case webrtc.Opus:
|
||||
pipelineStr = "audiotestsrc ! opusenc ! " + pipelineStr
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user