Skip to content

Commit

Permalink
Remove default adapters
Browse files Browse the repository at this point in the history
* Update examples to import adapters explicitly
* Remove default adapters to be imported implicitly
  • Loading branch information
lherman-cs committed Feb 15, 2020
1 parent 53d55a3 commit ec95102
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package mediadevices

import (
"github.com/pion/mediadevices/pkg/driver"
_ "github.com/pion/mediadevices/pkg/driver/camera"
_ "github.com/pion/mediadevices/pkg/driver/microphone"
_ "github.com/pion/mediadevices/pkg/driver/screen"
)

// RegisterDriverAdapter allows user space level of driver registration
Expand Down
1 change: 1 addition & 0 deletions examples/rtp-send/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/pion/mediadevices"
_ "github.com/pion/mediadevices/pkg/codec/openh264" // This is required to register h264 video encoder
_ "github.com/pion/mediadevices/pkg/codec/vpx" // This is required to register VP8/VP9 video encoder
_ "github.com/pion/mediadevices/pkg/driver/camera" // This is required to register camera adapter
"github.com/pion/mediadevices/pkg/frame"
"github.com/pion/rtp"
"github.com/pion/webrtc/v2"
Expand Down
1 change: 1 addition & 0 deletions examples/screenshare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
_ "github.com/pion/mediadevices/pkg/codec/openh264" // This is required to register h264 video encoder
_ "github.com/pion/mediadevices/pkg/codec/opus" // This is required to register opus audio encoder
_ "github.com/pion/mediadevices/pkg/codec/vpx"
_ "github.com/pion/mediadevices/pkg/driver/screen" // This is required to register screen capture adapter
"github.com/pion/mediadevices/pkg/frame"
"github.com/pion/webrtc/v2"
)
Expand Down
2 changes: 2 additions & 0 deletions examples/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
_ "github.com/pion/mediadevices/pkg/codec/openh264" // This is required to register h264 video encoder
_ "github.com/pion/mediadevices/pkg/codec/opus" // This is required to register opus audio encoder
_ "github.com/pion/mediadevices/pkg/codec/vpx"
_ "github.com/pion/mediadevices/pkg/driver/camera" // This is required to register camera adapter
_ "github.com/pion/mediadevices/pkg/driver/microphone" // This is required to register microphone adapter
"github.com/pion/mediadevices/pkg/frame"
"github.com/pion/webrtc/v2"
)
Expand Down

0 comments on commit ec95102

Please sign in to comment.