-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COM-12460: fix in mpeg4 ref dec and add mpeg2 ref dec (#205)
COM-12460-fix in mpeg4 reference decoder generation x32 to x64 bits and add mpeg2 reference decoder generation in Makefile
- Loading branch information
1 parent
d39ab32
commit 6ea228e
Showing
2 changed files
with
118 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Fluster - testing framework for decoders conformance | ||
# Copyright (C) 2024, Fluendo, S.A. | ||
# Author: Rubén Sánchez <[email protected]>, Fluendo, S.A. | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public License | ||
# as published by the Free Software Foundation, either version 3 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
from fluster.codec import Codec, OutputFormat | ||
from fluster.decoder import Decoder, register_decoder | ||
from fluster.utils import file_checksum, run_command | ||
|
||
|
||
@register_decoder | ||
class ISOAACDecoder(Decoder): | ||
"""ISO MPEG2 AAC reference decoder implementation""" | ||
|
||
name = "ISO-MPEG2-AAC" | ||
description = "ISO MPEG2 AAC reference decoder" | ||
codec = Codec.AAC | ||
binary = "aacdec_mc" | ||
|
||
def decode( | ||
self, | ||
input_filepath: str, | ||
output_filepath: str, | ||
output_format: OutputFormat, | ||
timeout: int, | ||
verbose: bool, | ||
keep_files: bool, | ||
) -> str: | ||
"""Decodes input_filepath in output_filepath""" | ||
# pylint: disable=unused-argument | ||
# Addition of .pcm as extension is a must. If it is something else, e.g. ".out" the decoder will output a | ||
# ".wav", which is undesirable. | ||
output_filepath += ".pcm" | ||
run_command( | ||
[self.binary, input_filepath, output_filepath], | ||
timeout=timeout, | ||
verbose=verbose, | ||
) | ||
return file_checksum(output_filepath) |