Skip to content

Commit

Permalink
start with a one frame interval until we know more
Browse files Browse the repository at this point in the history
if it's say four frames, we get to paused without eos, but then
hit eos without level message
  • Loading branch information
Thomas Vander Stichele committed Aug 29, 2013
1 parent f0a54d1 commit fc282df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion morituri/common/encode.py
Expand Up @@ -179,14 +179,19 @@ def __init__(self, inpath, outpath, profile, taglist=None, what="track"):
cgstreamer.removeAudioParsers()

def getPipelineDesc(self):
# start with an emit interval of one frame, because we end up setting
# the final interval after paused and after processing some samples
# already, which is too late
interval = int(self.gst.SECOND / 75.0)
return '''
filesrc location="%s" !
decodebin name=decoder !
audio/x-raw-int,width=16,depth=16,channels=2 !
level name=level !
level name=level interval=%d !
%s ! identity name=identity !
filesink location="%s" name=sink''' % (
gstreamer.quoteParse(self._inpath).encode('utf-8'),
interval,
self._profile.pipeline,
gstreamer.quoteParse(self._outpath).encode('utf-8'))

Expand Down

0 comments on commit fc282df

Please sign in to comment.