On Tue, 2009-04-21 at 09:48 -0700, Clark Snowdall wrote:
> Hello all,
>
> The project my team and I are working on requires lots of video
> embedded in clutter. We are developing on Acer Aspire, but the target
> platform is currently the Compal. I wrote a test app using gstreamer
> and clutter that works reasonably well on Aspire, but brings the
> Compal to its knees. I have heard that the Compal (being Menlow) has
> video hardware acceleration. I'm assuming that I 'm not tapping into
> that power, but would like to.
Definitely not. You have to have codec wrappers that know about the
platform hardware acceleration capabilities.
Today there is a RealNetworks product (RealPlayer for MID) and a Fluendo
product (not sure what they call it, but it's a GStreamer codec bundle)
that provide this.
> From what I understand, the easiest
> (with regards to licensing) way to get hardware acceleration goodness
> is to get Helix.
To be clear... you would need to install the RealNetworks product, and
then link into those libraries in order to not have to attain your own
IP licensees.
But... if you are deployed on a solution that has the Fluendo codecs
installed then, just like the RealPlayer approach, you can use the
codecs without having to re-license the codecs.
> So here are the questions I'd like to pose:
>
> 1. Is there some sort of binding like clutter-gst that is required to
> get Helix into clutter? Documentation says that Helix is supported in
> clutter, but there isn't any explanation of how.
This capability is currently a work in process (monitor the helix
client-dev mailing list for further progress).
We do this by implementing what we call a media sink which acts a lot
like a gstreamer sink element. When combined with a the ClutterHelix
object (which implements ClutterMedia), then the helix infrastructure
parses/decodec the media, passes the data to ClutterHelix which then
renders the data into the backing 2D texture.
The ClutterHelix code exist in the clutter git repos, but has not made
it into a release since it depends on some helix code that will likely
change as we go through the helix review process.
http://git.clutter-project.org/cgit.cgi?url=clutter-helix/tree/
>
> 2. Is libva required in any of this?
Yes, both the helix and fluendo solutions are built on top of libva.
>
> 3. I have downloaded the Helix source code. Is there anything
> special to compile it to use hardware acceleration?
Yes, a bunch of compile options... of which i don't recall right now.
Perhaps some of the other guys can remind me what build configuration
options need to be set.
But... like i mentioned above, the code has not landed that allows you
to use helix to render hardware accelerated video into a clutter
texture.
> 4. If one is going to put a video in a moving rotation clutter actor,
> is it best to decode the video elsewhere in memory and then just keep
> updating the pixmap on the actor (one post I read seems this gets the
> most performance out of the hw accelerator)?
When using the libva interface you normally don't get the data back out
of the hardware, but instead just get a ref id and then make operations
on the id so that the number of copy operations is limited. In our
helix changes we pass video buffers to the media sink that are really
just the ref id and a colorspace id that lets the buffer consumer know
that this is not a real video buffer.
When you initialize the libva surface, you pass in a window or a pixmap
for the graphics hardware to render into. In order to render into a
clutter texture, we pass in a pixmap to libva, and then use the
texture-from-pixmap operation to construct the backing 2d texture used
for the clutter texture.
But... the initial graphics driver delivered on menlow products only
supported libva operations on a window drawable, so you will need access
to the new drivers that has not been released yet.
> Any example code that pertains to this would be most appreciated.
Unfortunately the clutter-helix code only implements the software based
rendering (i.e. you can see in clutter-helix-video-texture.c where we
check for the special colorspace that indicates that the data in the
buffer is really just a libva id, but we haven't added the libva calls
to blit the data into the texture.)
>
> Thanks,
> Snowdall
>
> P.S. On a side note ... I'm also having trouble compiling Helix from
> source (probably am fat-fingering something). Anyone ever seen this
> error?
>
> BUILD_ROOT="`pwd`/build" PATH="$PATH:$BUILD_ROOT/bin" BUILDRC="`pwd`/
> buildrc" python build/bin/build.py -m hxclient_3_1_0_atlas -P helix-
> client-all-defines all_clients
> [#-00000001][2009-04-20 19:11:17][-1212057920][INFO ] : Ribosome v2.4.8
> [#-00000002][2009-04-20 19:11:17][-1212057920][INFO ] : Using Python
> v2.6
> [#-00000003][2009-04-20 19:11:17][-1212057920][INFO ] : Log dir: /home/
> snowdall/Documents/all_clients-hxclient_3_1_0_atlas-20090419/
> ribosome_logs
> [#-00000005][2009-04-20 19:11:17][-1212057920][INFO ] : Running tool:
> build
> [#-00000009][2009-04-20 19:11:17][-1212057920][ERROR] : --- Build
> System Error ------------------------------------
> You have found a Ribosome bug.
> -----------------------------------------------------------
> --- Python Traceback --------------------------------------
> ------------------------------------
> Traceback (most recent call last):
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/bin/launcher.py", line 116, in
> __runTool
> tool = __import__("%s_exe" % self.toolName)
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/lib/build_exe.py", line 74, in
> <module>
> import branchlist
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/lib/branchlist.py", line 78, in
> <module>
> import cvs
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/lib/cvs.py", line 119
> def update_checkout_list(self, tag, module_list, as, dir):
> ^
> SyntaxError: invalid syntax
> -----------------------------------------------------------
>
> Traceback (most recent call last):
> File "build/bin/build.py", line 67, in <module>
> tool.run()
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/bin/launcher.py", line 97, in run
> self.__runTool()
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/bin/launcher.py", line 116, in
> __runTool
> tool = __import__("%s_exe" % self.toolName)
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/lib/build_exe.py", line 74, in
> <module>
> import branchlist
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/lib/branchlist.py", line 78, in
> <module>
> import cvs
> File "/home/snowdall/Documents/all_clients-
> hxclient_3_1_0_atlas-20090419/build/lib/cvs.py", line 119
> def update_checkout_list(self, tag, module_list, as, dir):
> ^
> SyntaxError: invalid syntax
> make: *** [all] Error 1
>
oh, yea... you have a modern python. ribosome (a.k.a
build-system-of-doom) is using the long since deprecate 'as' keyword
which is now moved from deprecate to error in the latest stable python.
I meant to submit a patch but I guess that fell off the plate. I've
attached my patch to ribosome.
--rusty
diff --git a/lib/buildapp.py b/lib/buildapp.py
index d89a7ef..c3a79ff 100755
--- a/lib/buildapp.py
+++ b/lib/buildapp.py
@@ -990,23 +990,23 @@ class BuildApp:
module_name_list,
cvs_tag,
repository,
- as = None,
+ az = None,
date = None):
report_cvs_tag = cvs_tag
if not len(cvs_tag):
report_cvs_tag = "HEAD"
- if as:
+ if az:
for module_name in module_name_list:
outmsg.send("checking out [%s]%s tag=\"%s\" from path=\"%s\"" % (
- repository, as, report_cvs_tag, module_name))
+ repository, az, report_cvs_tag, module_name))
else:
for module_name in module_name_list:
outmsg.send("checking out [%s]%s tag=\"%s\"" % (
repository, module_name, report_cvs_tag))
import cvs
- cvs.Checkout(cvs_tag, module_name_list, repository, as, date)
+ cvs.Checkout(cvs_tag, module_name_list, repository, az, date)
## updates the platform.h in modules that wish it
diff --git a/lib/cvs.py b/lib/cvs.py
index 2cca038..efc6e9c 100755
--- a/lib/cvs.py
+++ b/lib/cvs.py
@@ -116,7 +116,7 @@ def listify(string_or_list):
class CVS:
"""Abstract CVS class."""
- def update_checkout_list(self, tag, module_list, as, dir):
+ def update_checkout_list(self, tag, module_list, az, dir):
update_list = []
checkout_list = []
@@ -136,8 +136,8 @@ class CVS:
if dir:
opath = os.path.join(dir, module)
- if as:
- opath = as
+ if az:
+ opath = az
if (not os.path.isdir(opath) or
not os.path.isdir(os.path.join(opath, "CVS"))):
@@ -183,29 +183,29 @@ class CVS:
return update_list, checkout_list
- def Checkout(self, tag, module_list, as = None, timestamp = None, nonrecursive = 0, dir = None):
+ def Checkout(self, tag, module_list, az = None, timestamp = None, nonrecursive = 0, dir = None):
"""Given a CVS tag and a list of CVS modules, check them out."""
- log.trace( 'entry' , [ tag , module_list , as , timestamp , nonrecursive , dir ] )
- #print "cvs.Checkout(%s,%s,as=%s,timestamp=%s, %s, %s)" % (
+ log.trace( 'entry' , [ tag , module_list , az , timestamp , nonrecursive , dir ] )
+ #print "cvs.Checkout(%s,%s,az=%s,timestamp=%s, %s, %s)" % (
# repr(tag),repr(module_list),
- # repr(as),repr(timestamp), repr(nonrecursive), repr(dir))
+ # repr(az),repr(timestamp), repr(nonrecursive), repr(dir))
module_list = listify(module_list)
- if as:
+ if az:
if len(module_list) > 1:
print "Cannot checkout two modules as the same name"
sys.exit(1)
- update_list,checkout_list = self.update_checkout_list(tag, module_list, as, dir)
+ update_list,checkout_list = self.update_checkout_list(tag, module_list, az, dir)
#print "UPDATE_LIST=%s" % repr(update_list)
#print "CHECKOUT_LIST=%s" % repr(checkout_list)
if update_list:
- self.update(tag, update_list, as, timestamp, nonrecursive, dir)
+ self.update(tag, update_list, az, timestamp, nonrecursive, dir)
if checkout_list:
- self.checkout(tag, checkout_list, as, timestamp, nonrecursive, dir)
+ self.checkout(tag, checkout_list, az, timestamp, nonrecursive, dir)
log.trace( 'exit' )
@@ -246,7 +246,7 @@ class UNIXCVS(CVS):
def Tag(self, path, tag, dir=None):
return self.Cmd('tag "%s"' % tag, path, dir)
- def update(self, tag, module_list, as = None, timestamp = None, nonrecursive = 0, checkout_dir = None):
+ def update(self, tag, module_list, az = None, timestamp = None, nonrecursive = 0, checkout_dir = None):
# print "TAG = %s" % tag
# print "TIMESTAMP = %s" % timestamp
@@ -282,16 +282,16 @@ class UNIXCVS(CVS):
string.split(x,"/")))
as_arg = ""
- if as:
- dir, base = os.path.split(as)
+ if az:
+ dir, base = os.path.split(az)
if dir:
utils.mkdirTree(dir)
checkout_dir = dir
cmd = "%s -d %s" % (cmd , base)
- out_dirs = [as]
+ out_dirs = [az]
cmd = "%s %s" % (cmd, string.join(module_list))
- outmsg.verbose("running %s in %s + %s (as = %s)" % (repr(cmd), repr(os.getcwd()), repr(checkout_dir), repr(as)))
+ outmsg.verbose("running %s in %s + %s (as = %s)" % (repr(cmd), repr(os.getcwd()), repr(checkout_dir), repr(az)))
def line_cb(line):
outmsg.verbose(string.strip(line))
@@ -350,30 +350,30 @@ class UNIXCVS(CVS):
return out_dirs
## Thread safe checkout (hopefully)
- def checkout(self, tag, module_list, as = None, timestamp = None, nonrecursive = 0, checkout_dir = None):
- log.trace( 'entry' , [ tag , module_list , as , timestamp , nonrecursive , checkout_dir ] )
+ def checkout(self, tag, module_list, az = None, timestamp = None, nonrecursive = 0, checkout_dir = None):
+ log.trace( 'entry' , [ tag , module_list , az , timestamp , nonrecursive , checkout_dir ] )
import distributions
if not checkout_dir:
checkout_dir="."
- if as:
- tmpdirbase=os.path.join(checkout_dir, os.path.dirname(as), "cvs")
+ if az:
+ tmpdirbase=os.path.join(checkout_dir, os.path.dirname(az), "cvs")
else:
tmpdirbase=os.path.join(checkout_dir, "cvs")
distributions.setup(tmpdirbase)
tmpdir=distributions.tmpdir(tmpdirbase)
- if as:
+ if az:
t=os.path.join(tmpdir,"tmp")
self.update( tag, module_list,t , timestamp, nonrecursive)
if os.path.exists(t):
- utils.mkdirTree(os.path.dirname(as))
- outmsg.verbose("Moving %s to %s" % (t,as))
- shell.move(t, as)
+ utils.mkdirTree(os.path.dirname(az))
+ outmsg.verbose("Moving %s to %s" % (t,az))
+ shell.move(t, az)
else:
- out_dirs=self.update( tag, module_list, as, timestamp, nonrecursive, tmpdir)
+ out_dirs=self.update( tag, module_list, az, timestamp, nonrecursive, tmpdir)
#print out_dirs
for d in out_dirs:
rl=os.path.join(checkout_dir, d[len(tmpdir)+1:])
@@ -393,19 +393,19 @@ class UNIXCVS(CVS):
log.trace( 'exit' )
class UNIXWinCVS(UNIXCVS):
- def update(self, tag, module_list, as = None, timestamp = None, nonrecursive = 0, dir = None):
+ def update(self, tag, module_list, az = None, timestamp = None, nonrecursive = 0, dir = None):
step=20
ret=[]
for d in range(0, len(module_list), step):
- ret.extend(UNIXCVS.update(self,tag,module_list[d:d+step],as,timestamp,nonrecursive, dir))
+ ret.extend(UNIXCVS.update(self,tag,module_list[d:d+step],az,timestamp,nonrecursive, dir))
return ret
class Win9xCVS(UNIXCVS):
- def update(self, tag, module_list, as = None, timestamp = None, nonrecursive = 0, dir = None):
+ def update(self, tag, module_list, az = None, timestamp = None, nonrecursive = 0, dir = None):
step=3
ret=[]
for d in range(0, len(module_list), step):
- ret.extend(UNIXCVS.update(self,tag,module_list[d:d+step],as,timestamp,nonrecursive, dir))
+ ret.extend(UNIXCVS.update(self,tag,module_list[d:d+step],az,timestamp,nonrecursive, dir))
return ret
@@ -433,7 +433,7 @@ class MacCVS(CVS):
else:
self.script_save_path = ''
- def update(self, tag, module_list, as = None, timestamp = None, nonrecursive = 0, dir = None):
+ def update(self, tag, module_list, az = None, timestamp = None, nonrecursive = 0, dir = None):
### FIXME:
### test this!
@@ -442,13 +442,13 @@ class MacCVS(CVS):
odir=os.getcwd()
try:
os.chdir(dir)
- ret=self.checkout(tag, module_list, as, timestamp, nonrecursive)
+ ret=self.checkout(tag, module_list, az, timestamp, nonrecursive)
finally:
os.chdir(odir)
return ret
- if as:
+ if az:
odir=os.getcwd()
shell.mkdir("cvs_temp")
os.chdir("cvs_temp")
@@ -456,7 +456,7 @@ class MacCVS(CVS):
os.chdir(odir)
for m in module_list:
shell.cp(os.path.join(odir, "cvs_temp", m),
- os.path.join(odir, as))
+ os.path.join(odir, az))
shell.rm("cvs_temp")
return
@@ -550,7 +550,7 @@ class MultiCVS:
base, path, dir = self.fix(path, dir)
return _Cvs(self.root + base).Tag(path,message,dir)
- def Checkout(self, tag, module_list, as=None, timestamp=None, nonrecursive=0):
+ def Checkout(self, tag, module_list, az=None, timestamp=None, nonrecursive=0):
tmp={}
@@ -567,7 +567,7 @@ class MultiCVS:
if self.shadow:
ns=self.shadow + base
- if as:
+ if az:
dir = None
else:
dir = base
@@ -575,7 +575,7 @@ class MultiCVS:
_Cvs(self.root + base, ns).Checkout(tag,
tmp[base],
- as,
+ az,
timestamp,
nonrecursive,
dir)
@@ -680,24 +680,24 @@ cvs_checkout_hook = None
def Checkout(tag,
module_list,
repository_name = "",
- as = None,
+ az = None,
timestamp = None,
nonrecursive = 0,
zap = None):
- log.trace( 'entry' , [ module_list , repository_name , as , timestamp , nonrecursive , zap ] )
+ log.trace( 'entry' , [ module_list , repository_name , az , timestamp , nonrecursive , zap ] )
module_list = listify(module_list)
if cvs_checkout_hook:
- module_list = cvs_checkout_hook(tag, module_list, repository_name, as, timestamp, nonrecursive)
+ module_list = cvs_checkout_hook(tag, module_list, repository_name, az, timestamp, nonrecursive)
if not module_list:
return
if zap:
for mod in module_list:
- if as:
- mod = as
+ if az:
+ mod = az
if os.path.exists(mod):
import thread
print "DELETING: %s [%d] START" % (mod, thread.get_ident())
@@ -705,7 +705,7 @@ def Checkout(tag,
print "DELETING: %s [%d] END" % (mod, thread.get_ident())
log.trace( 'exit' )
- return Get(repository_name).Checkout(tag, module_list, as, timestamp, nonrecursive)
+ return Get(repository_name).Checkout(tag, module_list, az, timestamp, nonrecursive)
def Status(repository, path, dir = None):
diff --git a/lib/module.py b/lib/module.py
index 762070c..b580da4 100755
--- a/lib/module.py
+++ b/lib/module.py
@@ -729,7 +729,7 @@ class Module:
root=None,
tag=None,
date=None,
- as=None, ## Native path
+ az=None, ## Native path
nonrecursive = None,
zap=None,
download_only=None,
@@ -775,8 +775,8 @@ class Module:
if not os.path.exists(tmpdir):
raise cvs.cvs_error
- shell.mkdir(os.path.dirname(as or self.path()))
- os.rename(tmpdir, as or self.path())
+ shell.mkdir(os.path.dirname(az or self.path()))
+ os.rename(tmpdir, az or self.path())
distributions.cleanup()
_______________________________________________
Moblin dev Mailing List
[email protected]
To manage or unsubscribe from this mailing list visit:
https://lists.moblin.org/mailman/listinfo/dev or your user account on
http://moblin.org once logged in.
For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists