VideoSource.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:mugen 作者: scherroman 项目源码 文件源码
def __init__(self, sources=Opt[Union[List[Union[Source, 'VideoSourceList']], str]], **kwargs):
        """
        Parameters
        ----------
        sources
            A list of sources.
            Accepts arbitrarily nested video files, file globs, directories, VideoSources, and VideoSourceLists.
        """
        self.name = None

        if isinstance(sources, str):
            self.name = paths.filename_from_path(sources)

            # Build list of sources from directory or file glob
            if os.path.isdir(sources):
                sources = self._sources_from_files(util.files_from_directory(sources))
            else:
                sources = self._sources_from_files(globber.glob(sources))
        else:
            # Convert any source files to VideoSources, and any lists, file globs or directories to VideoSourceLists
            sources = self._fill_in_sources(sources)

        super().__init__(sources, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号