Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
3b184849
Commit
3b184849
authored
Feb 02, 2003
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Cleanups
Original commit message from CVS: - Cleanups - remove old tracing API calls
parent
0a1d9ddd
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
118 additions
and
90 deletions
+118
-90
examples/seeking/cdparanoia.c
examples/seeking/cdparanoia.c
+0
-3
examples/seeking/cdplayer.c
examples/seeking/cdplayer.c
+0
-3
examples/seeking/seek.c
examples/seeking/seek.c
+59
-30
examples/seeking/spider_seek.c
examples/seeking/spider_seek.c
+0
-3
examples/seeking/vorbisfile.c
examples/seeking/vorbisfile.c
+0
-3
tests/examples/seek/seek.c
tests/examples/seek/seek.c
+59
-30
tests/examples/seek/spider_seek.c
tests/examples/seek/spider_seek.c
+0
-3
tests/examples/seek/vorbisfile.c
tests/examples/seek/vorbisfile.c
+0
-3
tests/old/examples/seek/cdparanoia.c
tests/old/examples/seek/cdparanoia.c
+0
-3
tests/old/examples/seek/cdplayer.c
tests/old/examples/seek/cdplayer.c
+0
-3
tests/old/examples/seek/spider_seek.c
tests/old/examples/seek/spider_seek.c
+0
-3
tests/old/examples/seek/vorbisfile.c
tests/old/examples/seek/vorbisfile.c
+0
-3
No files found.
examples/seeking/cdparanoia.c
View file @
3b184849
...
...
@@ -215,8 +215,5 @@ main (int argc, char **argv)
/* shutdown everything again */
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
examples/seeking/cdplayer.c
View file @
3b184849
...
...
@@ -296,8 +296,5 @@ main (int argc, char **argv)
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
examples/seeking/seek.c
View file @
3b184849
...
...
@@ -264,7 +264,7 @@ make_vorbis_pipeline (const gchar *location)
src
=
gst_element_factory_make_or_warn
(
SOURCE
,
"src"
);
decoder
=
gst_element_factory_make_or_warn
(
"vorbisfile"
,
"decoder"
);
audiosink
=
gst_element_factory_make_or_warn
(
"osssink"
,
"sink"
);
g_object_set
(
G_OBJECT
(
audiosink
),
"sync"
,
FALS
E
,
NULL
);
g_object_set
(
G_OBJECT
(
audiosink
),
"sync"
,
TRU
E
,
NULL
);
g_object_set
(
G_OBJECT
(
src
),
"location"
,
location
,
NULL
);
...
...
@@ -366,7 +366,7 @@ make_avi_pipeline (const gchar *location)
video_bin
=
gst_bin_new
(
"v_decoder_bin"
);
//v_decoder = gst_element_factory_make_or_warn ("identity", "v_dec");
//v_decoder = gst_element_factory_make_or_warn ("windec", "v_dec");
v_decoder
=
gst_element_factory_make_or_warn
(
"ff
dec_msmpeg4
"
,
"v_dec"
);
v_decoder
=
gst_element_factory_make_or_warn
(
"ff
mpegdecall
"
,
"v_dec"
);
video_thread
=
gst_thread_new
(
"v_decoder_thread"
);
videosink
=
gst_element_factory_make_or_warn
(
"xvideosink"
,
"v_sink"
);
//videosink = gst_element_factory_make_or_warn ("fakesink", "v_sink");
...
...
@@ -407,7 +407,7 @@ make_mpeg_pipeline (const gchar *location)
g_object_set
(
G_OBJECT
(
src
),
"location"
,
location
,
NULL
);
demux
=
gst_element_factory_make_or_warn
(
"mpegdemux"
,
"demux"
);
g_object_set
(
G_OBJECT
(
demux
),
"sync"
,
TRU
E
,
NULL
);
g_object_set
(
G_OBJECT
(
demux
),
"sync"
,
FALS
E
,
NULL
);
seekable_elements
=
g_list_prepend
(
seekable_elements
,
demux
);
...
...
@@ -520,6 +520,12 @@ make_mpegnt_pipeline (const gchar *location)
return
pipeline
;
}
static
GstElement
*
make_playerbin_pipeline
(
const
gchar
*
location
)
{
return
NULL
;
}
static
gchar
*
format_value
(
GtkScale
*
scale
,
gdouble
value
)
...
...
@@ -774,6 +780,43 @@ stop_cb (GtkButton * button, gpointer data)
}
}
typedef
struct
{
gchar
*
name
;
GstElement
*
(
*
func
)
(
const
gchar
*
location
);
}
Pipeline
;
static
Pipeline
pipelines
[]
=
{
{
"mp3"
,
make_mp3_pipeline
},
{
"avi"
,
make_avi_pipeline
},
{
"mpeg1"
,
make_mpeg_pipeline
},
{
"mpegparse"
,
make_parse_pipeline
},
{
"vorbis"
,
make_vorbis_pipeline
},
{
"sid"
,
make_sid_pipeline
},
{
"flac"
,
make_flac_pipeline
},
{
"wav"
,
make_wav_pipeline
},
{
"mod"
,
make_mod_pipeline
},
{
"dv"
,
make_dv_pipeline
},
{
"mpeg1nothreads"
,
make_mpegnt_pipeline
},
{
"playerbin"
,
make_playerbin_pipeline
},
{
NULL
,
NULL
},
};
#define NUM_TYPES ((sizeof (pipelines) / sizeof (Pipeline)) - 1)
static
void
print_usage
(
int
argc
,
char
**
argv
)
{
gint
i
;
g_print
(
"usage: %s <type> <filename>
\n
"
,
argv
[
0
]);
g_print
(
" possible types:
\n
"
);
for
(
i
=
0
;
i
<
NUM_TYPES
;
i
++
)
{
g_print
(
" %d = %s
\n
"
,
i
,
pipelines
[
i
].
name
);
}
}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -781,41 +824,29 @@ main (int argc, char **argv)
*
play_button
,
*
pause_button
,
*
stop_button
,
*
hscale
;
struct
poptOption
options
[]
=
{
{
"stats"
,
's'
,
POPT_ARG_NONE
|
POPT_ARGFLAG_STRIP
,
&
stats
,
0
,
"Show pad stats"
,
NULL
},
{
"stats"
,
's'
,
POPT_ARG_NONE
|
POPT_ARGFLAG_STRIP
,
&
stats
,
0
,
"Show pad stats"
,
NULL
},
POPT_TABLEEND
};
gint
type
;
gst_init_with_popt_table
(
&
argc
,
&
argv
,
options
);
gtk_init
(
&
argc
,
&
argv
);
if
(
argc
!=
3
)
{
g_print
(
"usage: %s <type 0=mp3 1=avi 2=mpeg1 3=mpegparse 4=vorbis 5=sid 6=flac 7=wav 8=mod 9=dv 10=mpeg1nothreads> <filename>
\n
"
,
argv
[
0
]);
print_usage
(
argc
,
argv
);
exit
(
-
1
);
}
type
=
atoi
(
argv
[
1
]);
if
(
type
<
0
||
type
>=
NUM_TYPES
)
{
print_usage
(
argc
,
argv
);
exit
(
-
1
);
}
if
(
atoi
(
argv
[
1
])
==
0
)
pipeline
=
make_mp3_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
1
)
pipeline
=
make_avi_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
2
)
pipeline
=
make_mpeg_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
3
)
pipeline
=
make_parse_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
4
)
pipeline
=
make_vorbis_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
5
)
pipeline
=
make_sid_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
6
)
pipeline
=
make_flac_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
7
)
pipeline
=
make_wav_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
8
)
pipeline
=
make_mod_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
9
)
pipeline
=
make_dv_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
10
)
pipeline
=
make_mpegnt_pipeline
(
argv
[
2
]);
pipeline
=
pipelines
[
type
].
func
(
argv
[
2
]);
g_assert
(
pipeline
);
/* initialize gui elements ... */
window
=
gtk_window_new
(
GTK_WINDOW_TOPLEVEL
);
...
...
@@ -863,8 +894,6 @@ main (int argc, char **argv)
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
//gst_object_unref (GST_OBJECT (pipeline));
gst_buffer_print_stats
();
gst_event_print_stats
();
//g_mem_chunk_info();
...
...
examples/seeking/spider_seek.c
View file @
3b184849
...
...
@@ -371,8 +371,5 @@ main (int argc, char **argv)
gtk_main
();
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
examples/seeking/vorbisfile.c
View file @
3b184849
...
...
@@ -316,8 +316,5 @@ main (int argc, char **argv)
/* stop probe */
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
tests/examples/seek/seek.c
View file @
3b184849
...
...
@@ -264,7 +264,7 @@ make_vorbis_pipeline (const gchar *location)
src
=
gst_element_factory_make_or_warn
(
SOURCE
,
"src"
);
decoder
=
gst_element_factory_make_or_warn
(
"vorbisfile"
,
"decoder"
);
audiosink
=
gst_element_factory_make_or_warn
(
"osssink"
,
"sink"
);
g_object_set
(
G_OBJECT
(
audiosink
),
"sync"
,
FALS
E
,
NULL
);
g_object_set
(
G_OBJECT
(
audiosink
),
"sync"
,
TRU
E
,
NULL
);
g_object_set
(
G_OBJECT
(
src
),
"location"
,
location
,
NULL
);
...
...
@@ -366,7 +366,7 @@ make_avi_pipeline (const gchar *location)
video_bin
=
gst_bin_new
(
"v_decoder_bin"
);
//v_decoder = gst_element_factory_make_or_warn ("identity", "v_dec");
//v_decoder = gst_element_factory_make_or_warn ("windec", "v_dec");
v_decoder
=
gst_element_factory_make_or_warn
(
"ff
dec_msmpeg4
"
,
"v_dec"
);
v_decoder
=
gst_element_factory_make_or_warn
(
"ff
mpegdecall
"
,
"v_dec"
);
video_thread
=
gst_thread_new
(
"v_decoder_thread"
);
videosink
=
gst_element_factory_make_or_warn
(
"xvideosink"
,
"v_sink"
);
//videosink = gst_element_factory_make_or_warn ("fakesink", "v_sink");
...
...
@@ -407,7 +407,7 @@ make_mpeg_pipeline (const gchar *location)
g_object_set
(
G_OBJECT
(
src
),
"location"
,
location
,
NULL
);
demux
=
gst_element_factory_make_or_warn
(
"mpegdemux"
,
"demux"
);
g_object_set
(
G_OBJECT
(
demux
),
"sync"
,
TRU
E
,
NULL
);
g_object_set
(
G_OBJECT
(
demux
),
"sync"
,
FALS
E
,
NULL
);
seekable_elements
=
g_list_prepend
(
seekable_elements
,
demux
);
...
...
@@ -520,6 +520,12 @@ make_mpegnt_pipeline (const gchar *location)
return
pipeline
;
}
static
GstElement
*
make_playerbin_pipeline
(
const
gchar
*
location
)
{
return
NULL
;
}
static
gchar
*
format_value
(
GtkScale
*
scale
,
gdouble
value
)
...
...
@@ -774,6 +780,43 @@ stop_cb (GtkButton * button, gpointer data)
}
}
typedef
struct
{
gchar
*
name
;
GstElement
*
(
*
func
)
(
const
gchar
*
location
);
}
Pipeline
;
static
Pipeline
pipelines
[]
=
{
{
"mp3"
,
make_mp3_pipeline
},
{
"avi"
,
make_avi_pipeline
},
{
"mpeg1"
,
make_mpeg_pipeline
},
{
"mpegparse"
,
make_parse_pipeline
},
{
"vorbis"
,
make_vorbis_pipeline
},
{
"sid"
,
make_sid_pipeline
},
{
"flac"
,
make_flac_pipeline
},
{
"wav"
,
make_wav_pipeline
},
{
"mod"
,
make_mod_pipeline
},
{
"dv"
,
make_dv_pipeline
},
{
"mpeg1nothreads"
,
make_mpegnt_pipeline
},
{
"playerbin"
,
make_playerbin_pipeline
},
{
NULL
,
NULL
},
};
#define NUM_TYPES ((sizeof (pipelines) / sizeof (Pipeline)) - 1)
static
void
print_usage
(
int
argc
,
char
**
argv
)
{
gint
i
;
g_print
(
"usage: %s <type> <filename>
\n
"
,
argv
[
0
]);
g_print
(
" possible types:
\n
"
);
for
(
i
=
0
;
i
<
NUM_TYPES
;
i
++
)
{
g_print
(
" %d = %s
\n
"
,
i
,
pipelines
[
i
].
name
);
}
}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -781,41 +824,29 @@ main (int argc, char **argv)
*
play_button
,
*
pause_button
,
*
stop_button
,
*
hscale
;
struct
poptOption
options
[]
=
{
{
"stats"
,
's'
,
POPT_ARG_NONE
|
POPT_ARGFLAG_STRIP
,
&
stats
,
0
,
"Show pad stats"
,
NULL
},
{
"stats"
,
's'
,
POPT_ARG_NONE
|
POPT_ARGFLAG_STRIP
,
&
stats
,
0
,
"Show pad stats"
,
NULL
},
POPT_TABLEEND
};
gint
type
;
gst_init_with_popt_table
(
&
argc
,
&
argv
,
options
);
gtk_init
(
&
argc
,
&
argv
);
if
(
argc
!=
3
)
{
g_print
(
"usage: %s <type 0=mp3 1=avi 2=mpeg1 3=mpegparse 4=vorbis 5=sid 6=flac 7=wav 8=mod 9=dv 10=mpeg1nothreads> <filename>
\n
"
,
argv
[
0
]);
print_usage
(
argc
,
argv
);
exit
(
-
1
);
}
type
=
atoi
(
argv
[
1
]);
if
(
type
<
0
||
type
>=
NUM_TYPES
)
{
print_usage
(
argc
,
argv
);
exit
(
-
1
);
}
if
(
atoi
(
argv
[
1
])
==
0
)
pipeline
=
make_mp3_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
1
)
pipeline
=
make_avi_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
2
)
pipeline
=
make_mpeg_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
3
)
pipeline
=
make_parse_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
4
)
pipeline
=
make_vorbis_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
5
)
pipeline
=
make_sid_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
6
)
pipeline
=
make_flac_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
7
)
pipeline
=
make_wav_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
8
)
pipeline
=
make_mod_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
9
)
pipeline
=
make_dv_pipeline
(
argv
[
2
]);
else
if
(
atoi
(
argv
[
1
])
==
10
)
pipeline
=
make_mpegnt_pipeline
(
argv
[
2
]);
pipeline
=
pipelines
[
type
].
func
(
argv
[
2
]);
g_assert
(
pipeline
);
/* initialize gui elements ... */
window
=
gtk_window_new
(
GTK_WINDOW_TOPLEVEL
);
...
...
@@ -863,8 +894,6 @@ main (int argc, char **argv)
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
//gst_object_unref (GST_OBJECT (pipeline));
gst_buffer_print_stats
();
gst_event_print_stats
();
//g_mem_chunk_info();
...
...
tests/examples/seek/spider_seek.c
View file @
3b184849
...
...
@@ -371,8 +371,5 @@ main (int argc, char **argv)
gtk_main
();
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
tests/examples/seek/vorbisfile.c
View file @
3b184849
...
...
@@ -316,8 +316,5 @@ main (int argc, char **argv)
/* stop probe */
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
tests/old/examples/seek/cdparanoia.c
View file @
3b184849
...
...
@@ -215,8 +215,5 @@ main (int argc, char **argv)
/* shutdown everything again */
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
tests/old/examples/seek/cdplayer.c
View file @
3b184849
...
...
@@ -296,8 +296,5 @@ main (int argc, char **argv)
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
tests/old/examples/seek/spider_seek.c
View file @
3b184849
...
...
@@ -371,8 +371,5 @@ main (int argc, char **argv)
gtk_main
();
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
tests/old/examples/seek/vorbisfile.c
View file @
3b184849
...
...
@@ -316,8 +316,5 @@ main (int argc, char **argv)
/* stop probe */
gst_element_set_state
(
pipeline
,
GST_STATE_NULL
);
gst_buffer_print_stats
();
gst_event_print_stats
();
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment