Tweak g722 support code

* allow GST examples to use g722
* Assume G722 is mono -- that's what chrome likes,
  and i don't know if anyone's doing stereo g722 anyway

Relates to #283
This commit is contained in:
Woodrow Douglass
2018-12-17 09:05:12 -05:00
committed by Woodrow Douglass
parent 7cc44ba79b
commit c1bfcc8367
2 changed files with 5 additions and 3 deletions

View File

@@ -43,6 +43,8 @@ func CreatePipeline(codecName string, in chan<- media.RTCSample) *Pipeline {
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
case webrtc.G722:
pipelineStr = "audiotestsrc ! avenc_g722 ! " + pipelineStr
default:
panic("Unhandled codec " + codecName)
}