formatting

SVN revision: 35012
This commit is contained in:
Sebastian Dransfeld 2008-07-06 10:05:47 +00:00
parent ec19c6f700
commit 84553cfb4a
3 changed files with 218 additions and 205 deletions

View File

@ -46,8 +46,10 @@ emotion_pipeline_dvd_build (void *video, const char *device)
if (!emotion_pipeline_pause(ev->pipeline))
goto failure_gstreamer_pause;
while (no_more_pads == 0) {
g_print ("toto\n");}
while (no_more_pads == 0)
{
g_print("toto\n");
}
no_more_pads = 0;
/* We get the informations of streams */
@ -59,7 +61,8 @@ emotion_pipeline_dvd_build (void *video, const char *device)
gpointer data;
it = gst_element_iterate_src_pads(dvddemux);
while (gst_iterator_next (it, &data) == GST_ITERATOR_OK) {
while (gst_iterator_next(it, &data) == GST_ITERATOR_OK)
{
GstPad *pad;
GstCaps *caps;
gchar *str;
@ -70,7 +73,8 @@ emotion_pipeline_dvd_build (void *video, const char *device)
str = gst_caps_to_string(caps);
g_print("caps !! %s\n", str);
/* video stream */
if (g_str_has_prefix (str, "video/mpeg")) {
if (g_str_has_prefix(str, "video/mpeg"))
{
Emotion_Video_Sink *vsink;
GstPad *sink_pad;
GstCaps *sink_caps;
@ -87,7 +91,8 @@ emotion_pipeline_dvd_build (void *video, const char *device)
gst_object_unref(sink_pad);
}
/* audio stream */
else if (g_str_has_prefix (str, "audio/")) {
else if (g_str_has_prefix(str, "audio/"))
{
Emotion_Audio_Sink *asink;
GstPad *sink_pad;
GstCaps *sink_caps;
@ -111,7 +116,8 @@ emotion_pipeline_dvd_build (void *video, const char *device)
Emotion_Video_Sink *vsink;
vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks);
if (vsink && vsink->sink) {
if (vsink && vsink->sink)
{
g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);
g_object_set(G_OBJECT(vsink->sink), "signal-handoffs", TRUE, NULL);
g_signal_connect(G_OBJECT(vsink->sink),
@ -146,7 +152,8 @@ dvd_pad_added_cb (GstElement *dvddemuxer,
caps = gst_pad_get_caps(GST_PAD(new_pad));
str = gst_caps_to_string(caps);
/* video stream */
if (g_str_has_prefix (str, "video/mpeg")) {
if (g_str_has_prefix(str, "video/mpeg"))
{
Emotion_Video_Sink *vsink;
GstElement *queue;
GstElement *decoder;
@ -154,7 +161,8 @@ dvd_pad_added_cb (GstElement *dvddemuxer,
vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink));
if (!vsink) return;
if (!ecore_list_append (ev->video_sinks, vsink)) {
if (!ecore_list_append(ev->video_sinks, vsink))
{
free(vsink);
return;
}
@ -168,7 +176,8 @@ dvd_pad_added_cb (GstElement *dvddemuxer,
videopad = gst_element_get_pad(queue, "sink");
gst_pad_link(GST_PAD(new_pad), videopad);
gst_object_unref(videopad);
if (ecore_list_count(ev->video_sinks) == 1) {
if (ecore_list_count(ev->video_sinks) == 1)
{
ev->ratio = (double)vsink->width / (double)vsink->height;
}
gst_element_set_state(queue, GST_STATE_PAUSED);
@ -176,7 +185,8 @@ dvd_pad_added_cb (GstElement *dvddemuxer,
gst_element_set_state(vsink->sink, GST_STATE_PAUSED);
}
/* audio stream */
else if (g_str_has_prefix (str, "audio/")) {
else if (g_str_has_prefix(str, "audio/"))
{
Emotion_Audio_Sink *asink;
GstElement *queue;
GstElement *decoder;
@ -188,7 +198,8 @@ dvd_pad_added_cb (GstElement *dvddemuxer,
asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink));
if (!asink) return;
if (!ecore_list_append (ev->audio_sinks, asink)) {
if (!ecore_list_append(ev->audio_sinks, asink))
{
free(asink);
return;
}

View File

@ -40,7 +40,8 @@ emotion_pipeline_file_build (void *video, const char *file)
Emotion_Video_Sink *vsink;
vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks);
if (vsink && vsink->sink) {
if (vsink && vsink->sink)
{
g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);
g_object_set(G_OBJECT(vsink->sink), "signal-handoffs", TRUE, NULL);
g_signal_connect(G_OBJECT(vsink->sink),

View File

@ -42,7 +42,8 @@ emotion_pipeline_uri_build (void *video, const char *uri)
Emotion_Video_Sink *vsink;
vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks);
if (vsink && vsink->sink) {
if (vsink && vsink->sink)
{
g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);
g_object_set(G_OBJECT(vsink->sink), "signal-handoffs", TRUE, NULL);
g_signal_connect(G_OBJECT(vsink->sink),