Thread
:
API to play sound preview
View Single Post
noobmonkey
2010-04-13 , 13:42
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#
2
do a search on gstreamer tools - i'm pretty sure it should be able to do it
I'm thinking allong th elines of a script that
# Create the player_name sink
player_name = gst.element_make_factory(“playbin”, “Multimedia Player”)
# Create the fake video sink
fake_video_sink = gst.element_make_factory(“fakesink”, “Fake sink for Videos”)
#Add the fake video sink to the player
player_name.set_property(“videosink”, fake_video_sink)
#Set the file
player_name.set_property(“uri”, “file:///home/peter/mymusic.mp3”)
#Set the State
player_name.set_state(gst.PLAYING)
#Play the file
.....
#After x seconds run gst.STATE_PAUSED or gst.STATE_NULL — Used to stop file
.......
Pretty sure you can use self.time_format = gst.Format(gst.FORMAT_TIME) to figure out where to start / stop too...
__________________
----------- Follow me on
Twitter
here
----------- My
Photography Website and Blog
is
here
----------- Author of the N900
Health Check Application
----------- New Version in Extras Devel (Dec 2010 -
2.9.10
)
----------- Are you on the N900 World Map? -
http://pininthemap.com/maemo
- masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo
in the future
? -
Quote & Reply
|
The Following 3 Users Say Thank You to noobmonkey For This Useful Post:
MohammadAG
,
nicolai
,
qwerty12
noobmonkey
View Public Profile
Send a private message to noobmonkey
Find all posts by noobmonkey