summaryrefslogtreecommitdiff
path: root/tests/examples/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-05-19 14:32:02 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-05-19 14:32:02 -0300
commit6403e6e00f003a0e3b38572e08e367304d58a887 (patch)
tree25309efe8511906a864699c5c0e76259ccbd3461 /tests/examples/camerabin2
parent12a2055a63bbb32ffd5cb9b1176e27e1a54893ef (diff)
camerabin2: examples: Add audio-source parameter to gst-camerabin2-test
Adds an option to select the audio source to be used on video recordings on camerabin2 test application
Diffstat (limited to 'tests/examples/camerabin2')
-rw-r--r--tests/examples/camerabin2/gst-camerabin2-test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/examples/camerabin2/gst-camerabin2-test.c b/tests/examples/camerabin2/gst-camerabin2-test.c
index 41c7301c6..d72658c7d 100644
--- a/tests/examples/camerabin2/gst-camerabin2-test.c
+++ b/tests/examples/camerabin2/gst-camerabin2-test.c
@@ -53,6 +53,7 @@
--zoom Zoom (100 = 1x (default), 200 = 2x etc.)
--wrapper-source Camera source wrapper used for setting the video source
--video-source Video source used in still capture and video recording
+ --audio-source Audio source used in video recording
--image-pp List of image post-processing elements separated with comma
--viewfinder-sink Viewfinder sink (default = fakesink)
--image-width Width for capture (only used if the caps
@@ -119,6 +120,7 @@ static GMainLoop *loop = NULL;
/* commandline options */
static gchar *videosrc_name = NULL;
+static gchar *audiosrc_name = NULL;
static gchar *wrappersrc_name = NULL;
static gchar *imagepp_name = NULL;
static gchar *vfsink_name = NULL;
@@ -538,6 +540,8 @@ setup_pipeline (void)
}
/* configure used elements */
+ res &= setup_pipeline_element (camerabin, "audio-source", audiosrc_name,
+ NULL);
res &= setup_pipeline_element (camerabin, "viewfinder-sink", vfsink_name,
&sink);
res &= setup_pipeline_element (camerabin, "viewfinder-filter",
@@ -796,6 +800,8 @@ main (int argc, char *argv[])
NULL},
{"video-source", '\0', 0, G_OPTION_ARG_STRING, &videosrc_name,
"Video source used in still capture and video recording", NULL},
+ {"audio-source", '\0', 0, G_OPTION_ARG_STRING, &audiosrc_name,
+ "Audio source used in video recording", NULL},
{"image-pp", '\0', 0, G_OPTION_ARG_STRING, &imagepp_name,
"List of image post-processing elements separated with comma", NULL},
{"viewfinder-sink", '\0', 0, G_OPTION_ARG_STRING, &vfsink_name,
@@ -884,6 +890,7 @@ main (int argc, char *argv[])
g_free (ev_option);
g_free (wrappersrc_name);
g_free (videosrc_name);
+ g_free (audiosrc_name);
g_free (imagepp_name);
g_free (vfsink_name);
g_free (target_times);