You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Changed / Refactored many enums and structs, to better standardize the naming of everything. Improved some more descriptions and briefs.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
import openshot
|
||||
import gtk
|
||||
|
||||
# Create Reader
|
||||
r = openshot.FFmpegReader("/home/jonathan/Videos/sintel-1024-stereo.mp4")
|
||||
|
||||
# Create Player
|
||||
p = openshot.Player()
|
||||
|
||||
# Set the Reader
|
||||
p.SetReader(r)
|
||||
|
||||
# Create callback method
|
||||
def FrameDone(frame, width, height, pixels):
|
||||
print "------------"
|
||||
print "frame ready for display: %d" % frame
|
||||
|
||||
# Create pixbuf
|
||||
#pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, width, height)
|
||||
#pixel_array = pixbuf.get_pixels_array()
|
||||
|
||||
# Loop through pixel array of pixbuf, and set values
|
||||
#for row in range(height):
|
||||
# for col in range(width):
|
||||
# for color in range(3):
|
||||
# pixel_array[row][col][color] = pixels[row][col][color]
|
||||
|
||||
# Save pixbuf for debugging
|
||||
#pixbuf.save("test.png", "png")
|
||||
print "pixbuf created for frame: %d" % frame
|
||||
|
||||
# Hook up python callback
|
||||
p.set_pymethod(FrameDone)
|
||||
Reference in New Issue
Block a user