Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Víctor Manuel Jáquez Leal
gst-plugins-bad
Commits
766aee18
Commit
766aee18
authored
Apr 13, 2004
by
Thomas Vander Stichele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make player example use gconf
Original commit message from CVS: make player example use gconf
parent
caedd30a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
ChangeLog
ChangeLog
+6
-0
examples/gstplay/Makefile.am
examples/gstplay/Makefile.am
+2
-1
examples/gstplay/player.c
examples/gstplay/player.c
+10
-3
No files found.
ChangeLog
View file @
766aee18
2004
-
04
-
13
Thomas
Vander
Stichele
<
thomas
at
apestaart
dot
org
>
*
examples
/
gstplay
/
Makefile
.
am
:
*
examples
/
gstplay
/
player
.
c
:
(
main
):
make
the
commandline
player
example
use
gconf
settings
2004
-
04
-
13
Thomas
Vander
Stichele
<
thomas
at
apestaart
dot
org
>
*
ext
/
libcaca
/
gstcacasink
.
c
:
(
gst_cacasink_class_init
),
...
...
examples/gstplay/Makefile.am
View file @
766aee18
...
...
@@ -2,9 +2,10 @@
noinst_PROGRAMS
=
player
player_SOURCES
=
player.c
player_CFLAGS
=
$(GST_CFLAGS)
player_CFLAGS
=
$(GST_CFLAGS)
$(GCONF_CFLAGS)
player_LDFLAGS
=
\
$(GST_LIBS)
\
$(top_builddir)
/gst-libs/gst/gconf/libgstgconf-@GST_MAJORMINOR@.la
\
$(top_builddir)
/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la
\
$(top_builddir)
/gst-libs/gst/libgstinterfaces-
$(GST_MAJORMINOR)
.la
examples/gstplay/player.c
View file @
766aee18
...
...
@@ -18,6 +18,7 @@
*/
#include <gst/play/play.h>
#include <gst/gconf/gconf.h>
static
GMainLoop
*
loop
=
NULL
;
static
gint64
length
=
0
;
...
...
@@ -121,11 +122,17 @@ main (int argc, char *argv[])
}
/* Getting default audio and video plugins from GConf */
audio_sink
=
gst_element_factory_make
(
"osssink"
,
"audio_sink"
);
video_sink
=
gst_element_factory_make
(
"ximagesink"
,
"video_sink"
);
vis_element
=
gst_element_factory_make
(
"goom"
,
"vis_element"
);
data_src
=
gst_element_factory_make
(
"gnomevfssrc"
,
"source"
);
audio_sink
=
gst_gconf_get_default_audio_sink
();
if
(
!
GST_IS_ELEMENT
(
audio_sink
))
g_error
(
"Could not get default audio sink from GConf"
);
video_sink
=
gst_gconf_get_default_video_sink
();
if
(
!
GST_IS_ELEMENT
(
video_sink
))
g_error
(
"Could not get default video sink from GConf"
);
/* Let's send them to GstPlay object */
if
(
!
gst_play_set_audio_sink
(
play
,
audio_sink
))
g_warning
(
"Could not set audio sink"
);
...
...
@@ -158,7 +165,7 @@ main (int argc, char *argv[])
/* Change state to PLAYING */
if
(
gst_element_set_state
(
GST_ELEMENT
(
play
),
GST_STATE_PLAYING
)
==
GST_STATE_FAILURE
)
g_
warning
(
"Could not set state to PLAYING"
);
g_
error
(
"Could not set state to PLAYING"
);
g_idle_add
((
GSourceFunc
)
idle_iterate
,
play
);
g_timeout_add
(
20000
,
(
GSourceFunc
)
seek_timer
,
play
);
...
...
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