Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding audio caps and making sure caps is part of input. #124

Merged
merged 1 commit into from Jan 13, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions tools/gstcase.c
Expand Up @@ -284,19 +284,21 @@ gst_case_get_pipeline_string (GstCase * cas)
gboolean is_audiostream = cas->serve_type == GST_SERVE_AUDIO_STREAM;
GString *desc = g_string_new ("");
const gchar *caps =
is_audiostream ? "" : gst_switch_server_get_video_caps_str ();
is_audiostream ?
"audio/x-raw,rate=48000,channels=2,format=S16LE,layout=interleaved" :
gst_switch_server_get_video_caps_str ();

switch (cas->type) {
case GST_CASE_INPUT_AUDIO:
g_string_append_printf (desc,
"giostreamsrc name=source ! gdpdepay ! interaudiosink name=sink channel=input_%d",
cas->sink_port);
"giostreamsrc name=source ! gdpdepay ! %s ! interaudiosink name=sink channel=input_%d",
caps, cas->sink_port);
break;

case GST_CASE_INPUT_VIDEO:
g_string_append_printf (desc,
"giostreamsrc name=source ! gdpdepay ! intervideosink name=sink channel=input_%d",
cas->sink_port);
"giostreamsrc name=source ! gdpdepay ! %s ! intervideosink name=sink channel=input_%d",
caps, cas->sink_port);
break;

case GST_CASE_PREVIEW:
Expand Down