# Path: video_processing/processor_runner.py
# def run_processor_chain(processors_list):
# 
# Path: video_processing/processors/opencv_video_encoder.py
# class OpenCVVideoEncoderProcessor(stream_processor.ProcessorBase):
#   def __init__(self, configuration):
#   def open(self, stream_set):
#   def process(self, frame_set):
#   def close(self):
# 
# Path: video_processing/processors/vectorized_video_decoder.py
# SERVER_PORT = 62061
# CANVAS_WIDTH = 1280
# CANVAS_HEIGHT = 720
# NUM_FRAMES = 959
# RENDERER_FILES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
#                                   'vectorized_video_decoder_files')
# class VectorizationServer(six.moves.BaseHTTPServer.HTTPServer):
# class VectorizationServerHandler(six.moves.BaseHTTPServer.BaseHTTPRequestHandler
#                                 ):
# class ServerThread(threading.Thread):
# class VectorizedVideoDecoderProcessor(stream_processor.ProcessorBase):
#   def setup(self,
#             image_callback=None,
#             json_data=None,
#             background_image=None,
#             index_html=None,
#             player_js=None):
#   def log_request(self, code):
#   def do_GET(self):
#   def do_POST(self):
#   def __init__(self, server):
#   def run(self):
#   def __init__(self, configuration):
#   def open(self, stream_set):
#   def process(self, frame_set):
#   def close(self):


from absl import app
from absl import flags
from video_processing import processor_runner
from video_processing.processors import opencv_video_encoder
from video_processing.processors import vectorized_video_decoder
# Copyright 2019 Google LLC.
"""Renders a vectorized video to a video file."""



flags.DEFINE_string('input_json_file', '', 'Input file.')
flags.DEFINE_string('background_image_file', 'background.png',
                    'Background image to be used.')
flags.DEFINE_string('output_video_file', '', 'Output file.')

FLAGS = flags.FLAGS


def pipeline(input_json_file, background_image_file, output_video_file):
  return [
      vectorized_video_decoder.VectorizedVideoDecoderProcessor({
          'input_json_file': input_json_file,
          'background_image_file': background_image_file
      }),
      opencv_video_encoder.OpenCVVideoEncoderProcessor(
          {'output_video_file': output_video_file})
  ]


def main(unused_argv):

# Path: video_processing/processor_runner.py
# def run_processor_chain(processors_list):
# 
# Path: video_processing/processors/opencv_video_encoder.py
# class OpenCVVideoEncoderProcessor(stream_processor.ProcessorBase):
#   def __init__(self, configuration):
#   def open(self, stream_set):
#   def process(self, frame_set):
#   def close(self):
# 
# Path: video_processing/processors/vectorized_video_decoder.py
# SERVER_PORT = 62061
# CANVAS_WIDTH = 1280
# CANVAS_HEIGHT = 720
# NUM_FRAMES = 959
# RENDERER_FILES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
#                                   'vectorized_video_decoder_files')
# class VectorizationServer(six.moves.BaseHTTPServer.HTTPServer):
# class VectorizationServerHandler(six.moves.BaseHTTPServer.BaseHTTPRequestHandler
#                                 ):
# class ServerThread(threading.Thread):
# class VectorizedVideoDecoderProcessor(stream_processor.ProcessorBase):
#   def setup(self,
#             image_callback=None,
#             json_data=None,
#             background_image=None,
#             index_html=None,
#             player_js=None):
#   def log_request(self, code):
#   def do_GET(self):
#   def do_POST(self):
#   def __init__(self, server):
#   def run(self):
#   def __init__(self, configuration):
#   def open(self, stream_set):
#   def process(self, frame_set):
#   def close(self):


# Path: video_processing/pipelines/render_vector_video.py
from absl import app
from absl import flags
from video_processing import processor_runner
from video_processing.processors import opencv_video_encoder
from video_processing.processors import vectorized_video_decoder

# Copyright 2019 Google LLC.
"""Renders a vectorized video to a video file."""



flags.DEFINE_string('input_json_file', '', 'Input file.')
flags.DEFINE_string('background_image_file', 'background.png',
                    'Background image to be used.')
flags.DEFINE_string('output_video_file', '', 'Output file.')

FLAGS = flags.FLAGS


def pipeline(input_json_file, background_image_file, output_video_file):
  return [
      vectorized_video_decoder.VectorizedVideoDecoderProcessor({
          'input_json_file': input_json_file,
          'background_image_file': background_image_file
      }),
      opencv_video_encoder.OpenCVVideoEncoderProcessor(
          {'output_video_file': output_video_file})
  ]


def main(unused_argv):

  processor_runner.run_processor_chain(