Update get_free_ffmpeg_source_files.py from Chromium dist-git
There are no longer 'ffmpeg_branding == "Chromium"' conditionals, we need to key on the absence of 'ffmpeg_branding == "Chrome"' or 'ffmpeg_branding == "ChromeOS"' conditionals instead.
This commit is contained in:
parent
c8151228d0
commit
be68fdf87b
@ -50,19 +50,24 @@ def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm):
|
||||
# Get all the sections.
|
||||
sections = re.findall(r"if (.*?})", content, re.DOTALL)
|
||||
for section in sections:
|
||||
# Get all the conditions (first group) and sources (second group)for the
|
||||
# Get all the conditions (first group) and sources (second group) for the
|
||||
# current section.
|
||||
blocks = re.findall(r"(\(.*?\))\s\{(.*?)\}", section, re.DOTALL)
|
||||
for block in blocks:
|
||||
conditions = re.findall(r"\(?\((.*?)\)", block[0])
|
||||
inserted = False
|
||||
for condition in conditions:
|
||||
limitations = ['is_linux', 'ffmpeg_branding == "Chromium"']
|
||||
if all(limitation in condition for limitation in limitations):
|
||||
if inserted:
|
||||
break
|
||||
limitations = ['ffmpeg_branding == "Chrome"', 'ffmpeg_branding == "ChromeOS"']
|
||||
if ('is_linux' in condition) and not any(limitation in condition for limitation in limitations):
|
||||
if (arch_not_arm):
|
||||
if ('x64' in condition) or ('x86' in condition):
|
||||
parse_sources (block[1], output_sources, arch_not_arm)
|
||||
inserted = True
|
||||
else:
|
||||
parse_sources (block[1], output_sources, arch_not_arm)
|
||||
inserted = True
|
||||
|
||||
print ' '.join(output_sources)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user