@@ -3,12 +3,15 @@ defmodule Membrane.Transcoder.Video do
3
3
4
4
import Membrane.ChildrenSpec
5
5
require Membrane.Logger
6
- alias Membrane . { ChildrenSpec , H264 , H265 , RawVideo , VP8 }
6
+ alias Membrane . { ChildrenSpec , H264 , H265 , RawVideo , RemoteStream , VP8 }
7
7
8
8
@ type video_stream_format :: VP8 . t ( ) | H264 . t ( ) | H265 . t ( ) | RawVideo . t ( )
9
9
10
10
defguard is_video_format ( format )
11
- when is_struct ( format ) and format . __struct__ in [ VP8 , H264 , H265 , RawVideo ]
11
+ when is_struct ( format ) and
12
+ ( format . __struct__ in [ VP8 , H264 , H265 , RawVideo ] or
13
+ ( format . __struct__ == RemoteStream and format . content_format == VP8 and
14
+ format . type == :packetized ) )
12
15
13
16
@ spec plug_video_transcoding (
14
17
ChildrenSpec . builder ( ) ,
@@ -69,6 +72,13 @@ defmodule Membrane.Transcoder.Video do
69
72
builder |> child ( :vp8_decoder , % VP8.Decoder { } )
70
73
end
71
74
75
+ defp maybe_plug_parser_and_decoder ( builder , % RemoteStream {
76
+ content_format: VP8 ,
77
+ type: :packetized
78
+ } ) do
79
+ builder |> child ( :vp8_decoder , % VP8.Decoder { } )
80
+ end
81
+
72
82
defp maybe_plug_parser_and_decoder ( builder , % RawVideo { } ) do
73
83
builder
74
84
end
0 commit comments