Skip to content
Permalink
Browse files

fix(video-decoder): minor revision video-decoder chunk spliter

  • Loading branch information...
numb3r3 committed Sep 29, 2019
1 parent a087626 commit 9365ddb97e0ee1c600674e3051f6411691be4099
Showing with 4 additions and 2 deletions.
  1. +4 −2 gnes/preprocessor/video/video_decode.py
@@ -53,14 +53,16 @@ def apply(self, doc: 'gnes_pb2.Document') -> None:
else:
self.logger.error('the document "raw_bytes" is empty!')

if self.chunk_spliter == 'frame_split':
if self.chunk_spliter == 'base':
for i, frame in enumerate(video_frames):
c = doc.chunks.add()
c.doc_id = doc.doc_id
c.blob.CopyFrom(array2blob(frame))
c.offset = i
c.weight = 1.0
elif self.chunk_spliter == 'none':
elif self.chunk_spliter == 'shot':
raise NotImplemented
else:
chunk = doc.chunks.add()
chunk.doc_id = doc.doc_id
chunk.blob.CopyFrom(array2blob(video_frames))

0 comments on commit 9365ddb

Please sign in to comment.
You can’t perform that action at this time.