• moto's avatar
    Support specifying decoder and its options (#2327) · be243c59
    moto authored
    Summary:
    This commit adds support to specify decoder to Streamer's add stream method.
    This is roughly equivalent to `ffmpeg`'s `-c:v foo` and `-c:a foo` options.
    
    This allows to override the decoder codec and/or specify the option of
    the decoder.
    
    This change allows to specify Nvidia NVDEC codec for supported formats,
    which uses dedicated hardware for decoding the video.
    
     ---
    
    Note: The CL might look overwhelming, but it's essentially, add new parameters in Python, and pass them down all the way to  `AVCodecContextPtr`, which initializes the actual decoder implementation (`AVCodecContext`.)
    
    Pull Request resolved: https://github.com/pytorch/audio/pull/2327
    
    Reviewed By: carolineechen
    
    Differential Revision: D35626904
    
    Pulled By: mthrok
    
    fbshipit-source-id: a115ed548624e53c16bacfecff5aa6c9d4e8bede
    be243c59
ffmpeg.cpp 7.22 KB