Skip to content

Commit

Permalink
CS-2376-Functional-testing-with-fluster-h266dec
Browse files Browse the repository at this point in the history
  • Loading branch information
rsanchez87 committed Oct 15, 2024
1 parent f7d69e3 commit 39e938c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ exclude-too-few-public-methods=
ignored-parents=

# Maximum number of arguments for function / method.
max-args=5
max-args=17

# Maximum number of positional arguments for function / method (default=5.)
max-positional-arguments = 17

# Maximum number of attributes for a class (see R0902).
max-attributes=7
Expand Down
22 changes: 21 additions & 1 deletion fluster/decoders/gstreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
)

PIPELINE_TPL = "{} --no-fault filesrc location={} ! {} ! {} ! {} ! {} {}"
PIPELINE_TPL_FLU_H266_DEC = "{} --no-fault filesrc location={} ! {} ! {} ! {} {}"


@lru_cache(maxsize=None)
Expand All @@ -59,6 +60,7 @@ def output_format_to_gst(output_format: OutputFormat) -> str:
"""Return GStreamer pixel format"""
mapping = {
OutputFormat.GRAY: "GRAY8",
OutputFormat.GRAY10LE: "GRAY10_LE32",
OutputFormat.GRAY16LE: "GRAY16_LE",
OutputFormat.YUV420P: "I420",
OutputFormat.YUV422P: "Y42B",
Expand Down Expand Up @@ -654,7 +656,25 @@ class FluendoVVCdeCH266Decoder(GStreamer10Video):

codec = Codec.H266
decoder_bin = " fluh266dec "
api = "VVdeC"
provider = "Fluendo"
api = "SW"

def gen_pipeline(
self,
input_filepath: str,
output_filepath: Optional[str],
output_format: OutputFormat,
) -> str:
caps = f"{self.caps} ! videoconvert dither=none ! video/x-raw,format={output_format_to_gst(output_format)}"
output = f"location={output_filepath}" if output_filepath else ""
return PIPELINE_TPL_FLU_H266_DEC.format(
self.cmd,
input_filepath,
self.decoder_bin,
caps,
self.sink,
output,
)


@register_decoder
Expand Down

0 comments on commit 39e938c

Please sign in to comment.