You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add custom pipeline parsing
* add custom pipeline support to CLI interface
* add appsrces to pipeline, add example
* add support for custom pipelines, add EOS signal support, add first example of mp4 pipeline (audio does not work here, will figure out why)
* add constants to linux code
* move fixes to linux code
* move fixes to linux code
* add working example for writing to mp4 file
* add working mac os example
* add hack to wait long enough for MOOV box to be written, add working linux example
* wait for EOS signal instead of sleeping a second
* add Stop to interface, increase timeout
* increase timeout
* fix test
* bump version, update readme
Copy file name to clipboardExpand all lines: screencapture/gstadapter/gst_adapter_linux.go
+77Lines changed: 77 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,13 @@ import (
18
18
typeGstAdapterstruct {
19
19
videoAppSrc*gst.AppSrc
20
20
audioAppSrc*gst.AppSrc
21
+
pipeline*gst.Pipeline
21
22
firstAudioSamplebool
22
23
}
23
24
25
+
constaudioAppSrcTargetElementName="audio_target"
26
+
constvideoAppSrcTargetElementName="video_target"
27
+
24
28
//New creates a new MAC OSX compatible gstreamer pipeline that will play device video and audio
25
29
//in a nice little window :-D
26
30
funcNew() *GstAdapter {
@@ -39,6 +43,79 @@ func New() *GstAdapter {
39
43
return&gsta
40
44
}
41
45
46
+
//NewWithCustomPipeline will parse the given pipelineString, connect the videoAppSrc to whatever element has the name "video_target" and the audioAppSrc to "audio_target"
returnnil, fmt.Errorf("The pipeline needs an element with a property 'name=%s' so I can link the audio source to it. run with --examples for details.", audioAppSrcTargetElementName)
returnnil, fmt.Errorf("The pipeline needs an element with a property 'name=%s' so I can link the video source to it. run with --examples for details.", videoAppSrcTargetElementName)
Copy file name to clipboardExpand all lines: screencapture/gstadapter/gst_adapter_macos.go
+76Lines changed: 76 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,13 @@ import (
18
18
typeGstAdapterstruct {
19
19
videoAppSrc*gst.AppSrc
20
20
audioAppSrc*gst.AppSrc
21
+
pipeline*gst.Pipeline
21
22
firstAudioSamplebool
22
23
}
23
24
25
+
constaudioAppSrcTargetElementName="audio_target"
26
+
constvideoAppSrcTargetElementName="video_target"
27
+
24
28
//New creates a new MAC OSX compatible gstreamer pipeline that will play device video and audio
25
29
//in a nice little window :-D
26
30
funcNew() *GstAdapter {
@@ -39,6 +43,78 @@ func New() *GstAdapter {
39
43
return&gsta
40
44
}
41
45
46
+
//NewWithCustomPipeline will parse the given pipelineString, connect the videoAppSrc to whatever element has the name "video_target" and the audioAppSrc to "audio_target"
returnnil, fmt.Errorf("The pipeline needs an element with a property 'name=%s' so I can link the audio source to it. run with --examples for details.", audioAppSrcTargetElementName)
returnnil, fmt.Errorf("The pipeline needs an element with a property 'name=%s' so I can link the video source to it. run with --examples for details.", videoAppSrcTargetElementName)
0 commit comments