Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7907cfd

Browse files
author
Alex Schworer
committed
add support for live stream jobs
1 parent4186a28 commit7907cfd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

‎zencoder/core.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,16 @@ def __init__(self, *args, **kwargs):
297297
kwargs['resource_name']='jobs'
298298
super(Job,self).__init__(*args,**kwargs)
299299

300-
defcreate(self,input,outputs=None,options=None):
300+
defcreate(self,input=None,live_stream=False,outputs=None,options=None):
301301
"""
302-
Creates a job
302+
Creates atranscodingjob.
303303
304304
@param input: the input url as string
305+
@param live_stream: starts an RTMP Live Stream
305306
@param outputs: a list of output dictionaries
306307
@param options: a dictionary of job options
307308
"""
308-
as_test=int(self.test)
309-
310-
data= {"input":input,"test":as_test}
309+
data= {"input":input,"test":self.test}
311310
ifoutputs:
312311
data['outputs']=outputs
313312

@@ -364,6 +363,10 @@ def delete(self, job_id):
364363
"""
365364
returnself.cancel(job_id)
366365

366+
deffinish(self,job_id):
367+
""" Finishes the live stream for `job_id`. """
368+
returnself.put(self.base_url+'/%s/finish'%str(job_id))
369+
367370
classReport(HTTPBackend):
368371
def__init__(self,*args,**kwargs):
369372
"""
@@ -404,3 +407,4 @@ def minutes(self, start_date=None, end_date=None, grouping=None):
404407

405408
url=self.base_url+'/minutes'
406409
returnself.get(url,data=data)
410+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp