@@ -19,19 +19,36 @@ import (
19
19
)
20
20
21
21
const (
22
+ // watch errors
22
23
msgClockProblem = "GStreamer error: clock problem."
23
24
msgStreamingNotNegotiated = "streaming stopped, reason not-negotiated (-4)"
24
25
msgMuxer = ":muxer"
25
- msgFragmentOpened = "splitmuxsink-fragment-opened"
26
- msgFragmentClosed = "splitmuxsink-fragment-closed"
27
- msgFirstSampleMetadata = "FirstSampleMetadata"
28
-
29
- fragmentLocation = "location"
30
- fragmentRunningTime = "running-time"
31
26
32
27
elementGstRtmp2Sink = "GstRtmp2Sink"
33
28
elementGstAppSrc = "GstAppSrc"
34
29
elementSplitMuxSink = "GstSplitMuxSink"
30
+
31
+ // watch elements
32
+ msgFirstSampleMetadata = "FirstSampleMetadata"
33
+ msgFragmentOpened = "splitmuxsink-fragment-opened"
34
+ msgFragmentClosed = "splitmuxsink-fragment-closed"
35
+
36
+ fragmentLocation = "location"
37
+ fragmentRunningTime = "running-time"
38
+
39
+ // common gst errors
40
+ msgWrongThread = "Called from wrong thread"
41
+
42
+ // common gst warnings
43
+ msgKeyframe = "Could not request a keyframe. Files may not split at the exact location they should"
44
+ msgLatencyQuery = "Latency query failed"
45
+ msgTaps = "can't find exact taps"
46
+ msgInputDisappeared = "Can't copy metadata because input buffer disappeared"
47
+
48
+ // common gst fixmes
49
+ msgStreamStart = "stream-start event without group-id. Consider implementing group-id handling in the upstream elements"
50
+ msgCreatingStream = "Creating random stream-id, consider implementing a deterministic way of creating a stream-id"
51
+ msgAggregateSubclass = "Subclass should call gst_aggregator_selected_samples() from its aggregate implementation."
35
52
)
36
53
37
54
func (p * Pipeline ) gstLog (level gst.DebugLevel , file , function string , line int , obj * glib.Object , message string ) {
@@ -40,11 +57,29 @@ func (p *Pipeline) gstLog(level gst.DebugLevel, file, function string, line int,
40
57
case gst .LevelNone :
41
58
lvl = "none"
42
59
case gst .LevelError :
43
- lvl = "error"
60
+ switch message {
61
+ case msgWrongThread :
62
+ // ignore
63
+ return
64
+ default :
65
+ lvl = "error"
66
+ }
44
67
case gst .LevelWarning :
45
- lvl = "warning"
68
+ switch message {
69
+ case msgKeyframe , msgLatencyQuery , msgTaps , msgInputDisappeared :
70
+ // ignore
71
+ return
72
+ default :
73
+ lvl = "warning"
74
+ }
46
75
case gst .LevelFixMe :
47
- lvl = "fixme"
76
+ switch message {
77
+ case msgStreamStart , msgCreatingStream , msgAggregateSubclass :
78
+ // ignore
79
+ return
80
+ default :
81
+ lvl = "fixme"
82
+ }
48
83
case gst .LevelInfo :
49
84
lvl = "info"
50
85
case gst .LevelDebug :
0 commit comments