Skip to content

Commit

Permalink
Support attaching child elements
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Jun 3, 2020
1 parent 02a8df5 commit 4690633
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/process/elements/element.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
// Element interface
type Element interface {
Write(*samples.Sample) error
Attach(Element) error
Read() <-chan *samples.Sample
Close()
}
6 changes: 6 additions & 0 deletions pkg/process/elements/webm.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package elements

import (
"errors"
"fmt"
"os"
"path"
Expand Down Expand Up @@ -63,6 +64,11 @@ func (s *WebmSaver) Read() <-chan *samples.Sample {
return nil
}

// Attach attach a child element
func (s *WebmSaver) Attach() error {
return errors.New("attach not supported")
}

// Close Close the WebmSaver
func (s *WebmSaver) Close() {
log.Infof("WebmSaver.Close() => %s", s.id)
Expand Down

0 comments on commit 4690633

Please sign in to comment.