Display progress while encoding movie.
This commit is contained in:
@@ -73,6 +73,7 @@ def gst_convert(mega_dir, out_file, use_jpeg):
|
|||||||
m.list.sort()
|
m.list.sort()
|
||||||
m.slen = len(m.suffix)
|
m.slen = len(m.suffix)
|
||||||
m.start_time = 0
|
m.start_time = 0
|
||||||
|
m.length = len(m.list)
|
||||||
print("Movie", len(m.list))
|
print("Movie", len(m.list))
|
||||||
|
|
||||||
def get_path(m):
|
def get_path(m):
|
||||||
@@ -99,6 +100,12 @@ def gst_convert(mega_dir, out_file, use_jpeg):
|
|||||||
def pop(m):
|
def pop(m):
|
||||||
m.list = m.list[1:]
|
m.list = m.list[1:]
|
||||||
|
|
||||||
|
def progress(m):
|
||||||
|
i = len(m.list) / m.length
|
||||||
|
i = 1-i
|
||||||
|
print("Message: %.0f%%" % (100*i))
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
class grwVideo(grwBase):
|
class grwVideo(grwBase):
|
||||||
suffix = ".grw"
|
suffix = ".grw"
|
||||||
def __init__(m, dir):
|
def __init__(m, dir):
|
||||||
@@ -156,6 +163,7 @@ def gst_convert(mega_dir, out_file, use_jpeg):
|
|||||||
return
|
return
|
||||||
t = movie.get_time()
|
t = movie.get_time()
|
||||||
#print("Video: ", name, t)
|
#print("Video: ", name, t)
|
||||||
|
movie.progress()
|
||||||
movie.pop()
|
movie.pop()
|
||||||
buffer, caps = grw_read(name, t)
|
buffer, caps = grw_read(name, t)
|
||||||
appsrc.set_property("caps", caps)
|
appsrc.set_property("caps", caps)
|
||||||
|
Reference in New Issue
Block a user