debug needed
This commit is contained in:
@@ -73,6 +73,7 @@ func (w *WavFIFODriver) Properties() []prop.Media {
|
||||
}
|
||||
|
||||
func (w *WavFIFODriver) AudioRecord(p prop.Media) (audio.Reader, error) {
|
||||
logrus.Debugf("wave header: %v", w.waveHeader)
|
||||
offset := FmtHeaderOffset + FmtHeaderIDSize + FmtHeaderChunkSizeSize + int64(w.waveHeader.Size) + DataChunkIDSize + DataChunkSizeSize
|
||||
if _, err := w.f.Seek(
|
||||
offset,
|
||||
@@ -105,6 +106,7 @@ func (w *WavFIFODriver) AudioRecord(p prop.Media) (audio.Reader, error) {
|
||||
case <-w.closed:
|
||||
return nil, func() {}, io.EOF
|
||||
case pcmData, ok := <-pcm:
|
||||
logrus.Debug("got %d bytes pcm data", len(pcmData))
|
||||
if !ok {
|
||||
return nil, func() {}, io.ErrClosedPipe
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@ import (
|
||||
"github.com/pion/mediadevices"
|
||||
"github.com/pion/mediadevices/pkg/codec/opus"
|
||||
"github.com/pion/mediadevices/pkg/codec/x264"
|
||||
"github.com/pion/mediadevices/pkg/prop"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@@ -56,8 +55,10 @@ func (c *Connection) Regist(offer *webrtc.SessionDescription) (*webrtc.SessionDe
|
||||
|
||||
s, err := mediadevices.GetUserMedia(mediadevices.MediaStreamConstraints{
|
||||
Video: func(mtc *mediadevices.MediaTrackConstraints) {
|
||||
mtc.Height = prop.IntExact(c.option.Video.Height)
|
||||
mtc.Width = prop.IntExact(c.option.Video.Width)
|
||||
/*
|
||||
mtc.Height = prop.IntExact(c.option.Video.Height)
|
||||
mtc.Width = prop.IntExact(c.option.Video.Width)
|
||||
*/
|
||||
},
|
||||
Audio: func(mtc *mediadevices.MediaTrackConstraints) {},
|
||||
Codec: codecSelector,
|
||||
|
Reference in New Issue
Block a user