debug needed
This commit is contained in:
@@ -31,8 +31,6 @@ func ExampleOptions() *Options {
|
||||
}
|
||||
|
||||
func (o *Options) MakeFIFO() error {
|
||||
if err := os.Remove(o.AudioPipe); err != nil {
|
||||
return err
|
||||
}
|
||||
return syscall.Mkfifo(o.AudioDevice, 0600)
|
||||
os.Remove(o.AudioPipe)
|
||||
return syscall.Mkfifo(o.AudioPipe, 0600)
|
||||
}
|
||||
|
@@ -91,19 +91,6 @@ func (s *Server) startCapture(qemu *qemu.Domain) {
|
||||
if err := s.options.MakeFIFO(); err != nil {
|
||||
logrus.Fatal("failed to make pipe file: ", err)
|
||||
}
|
||||
if _, err := qemu.Run(qmp.Command{
|
||||
Execute: "human-monitor-command",
|
||||
Args: map[string]string{
|
||||
"command-line": fmt.Sprintf(
|
||||
"wavcapture %s %s",
|
||||
s.options.AudioPipe,
|
||||
s.options.AudioDevice,
|
||||
),
|
||||
},
|
||||
}); err != nil {
|
||||
logrus.Fatal("run audio command failed: ", err)
|
||||
}
|
||||
logrus.Debug("audio capture set")
|
||||
|
||||
if err := driver.GetManager().Register(
|
||||
audiodriver.New(s.options.AudioPipe),
|
||||
@@ -126,6 +113,19 @@ func (s *Server) startCapture(qemu *qemu.Domain) {
|
||||
logrus.Fatal("video initialize failed: ", err)
|
||||
}
|
||||
|
||||
if _, err := qemu.Run(qmp.Command{
|
||||
Execute: "human-monitor-command",
|
||||
Args: map[string]string{
|
||||
"command-line": fmt.Sprintf(
|
||||
"wavcapture %s %s",
|
||||
s.options.AudioPipe,
|
||||
s.options.AudioDevice,
|
||||
),
|
||||
},
|
||||
}); err != nil {
|
||||
logrus.Fatal("run audio command failed: ", err)
|
||||
}
|
||||
logrus.Debug("audio capture set")
|
||||
}
|
||||
|
||||
func Setup(o *Options) {
|
||||
|
Reference in New Issue
Block a user