gdp-if / gstreamer-log-plugin / Makefile @ master
History | View | Annotate | Download (1.81 KB)
1 | f2c0470b | Nitesh Mor | DEBUG_FLAGS = G_DEBUG=all \ |
---|---|---|---|
2 | G_MESSAGES_DEBUG=all\ |
||
3 | GST_DEBUG=*:2,GST_ELEMENT*:2,GST_PIPELINE*:2,GST_REGISTRY:1 |
||
4 | cf94567d | Nitesh Mor | |
5 | f2c0470b | Nitesh Mor | ENV = $(DEBUG_FLAGS) |
6 | |||
7 | 9982a046 | Nitesh Mor | GCL_CREATE = "gcl-create" |
8 | f2c0470b | Nitesh Mor | GST_LAUNCH = $(ENV) python gst-launch-w.py |
9 | |||
10 | LOGNAME := $(shell $(GCL_CREATE) -k none 2>/dev/null | grep -o "GCL .*" | cut -c 5-) |
||
11 | c7a2d2ef | Nitesh Mor | |
12 | 832ad863 | Nitesh Mor | PIDFILE = /tmp/pid |
13 | f2c0470b | Nitesh Mor | DURATION1 = 5 |
14 | DURATION2 = 2 |
||
15 | DURATION3 = 3 |
||
16 | |||
17 | define record_for_specified_duration # (pipeline, duration) |
||
18 | $(GST_LAUNCH) $(1) & echo $$! > $(PIDFILE) |
||
19 | sleep $(2) && kill -9 `cat $(PIDFILE)` |
||
20 | endef |
||
21 | 832ad863 | Nitesh Mor | |
22 | f2c0470b | Nitesh Mor | define run_test # (record pipeline, play pipeline) |
23 | @echo ">>> Recording pipeline: $(1)" |
||
24 | @echo ">>> Playback pipeline: $(2)" |
||
25 | @echo ">>> Running recording for $(DURATION1) seconds, logname=$(LOGNAME)" |
||
26 | $(call record_for_specified_duration, $(1), $(DURATION1)) |
||
27 | @echo ">>> Sleeping for $(DURATION2) seconds" |
||
28 | sleep $(DURATION2) |
||
29 | @echo ">>> Running recording for $(DURATION3) seconds, logname=$(LOGNAME)" |
||
30 | $(call record_for_specified_duration, $(1), $(DURATION3)) |
||
31 | @echo ">>> Playback of recording from log $(LOGNAME)" |
||
32 | $(GST_LAUNCH) $(2) |
||
33 | endef |
||
34 | 832ad863 | Nitesh Mor | |
35 | f2c0470b | Nitesh Mor | ## For each of the tests, one should specify the record pipeline and play pipeline |
36 | 832ad863 | Nitesh Mor | |
37 | f2c0470b | Nitesh Mor | RECP_MPEG4_VIDEO = "v4l2src ! video/x-raw, width=320, height=240 ! avenc_mpeg4 ! gdpsink logname=$(LOGNAME)" |
38 | PLYP_MPEG4_VIDEO = "gdpsrc logname=$(LOGNAME) ! avdec_mpeg4 ! xvimagesink" |
||
39 | mpeg4_video_test: |
||
40 | $(call run_test,$(RECP_MPEG4_VIDEO),$(PLYP_MPEG4_VIDEO)) |
||
41 | 832ad863 | Nitesh Mor | |
42 | f2c0470b | Nitesh Mor | RECP_RAW_AUDIO = "autoaudiosrc ! gdpsink logname=$(LOGNAME)" |
43 | PLYP_RAW_AUDIO = "gdpsrc logname=$(LOGNAME) ! autoaudiosink" |
||
44 | raw_audio_test: |
||
45 | $(call run_test,$(RECP_RAW_AUDIO),$(PLYP_RAW_AUDIO)) |
||
46 | 832ad863 | Nitesh Mor | |
47 | f2c0470b | Nitesh Mor | RECP_MP3_AUDIO = "autoaudiosrc ! lamemp3enc ! gdpsink logname=$(LOGNAME)" |
48 | PLYP_MP3_AUDIO = "gdpsrc logname=$(LOGNAME) ! mpegaudioparse ! mpg123audiodec ! autoaudiosink" |
||
49 | mp3_audio_test: |
||
50 | $(call run_test,$(RECP_RAW_AUDIO),$(PLYP_RAW_AUDIO)) |