]> Raphaƫl G. Git Repositories - youtubedl/blobdiff - youtube_dl/postprocessor/common.py
debian/control: Prefer mplayer to mplayer2 in Recommends.
[youtubedl] / youtube_dl / postprocessor / common.py
index 3b0e8ddd8bfed92f2e9043b0adea2655a9e5f67b..4191d040bb1da468e248d57b78df1afdacf64cd0 100644 (file)
@@ -23,6 +23,9 @@ class PostProcessor(object):
 
     PostProcessor objects follow a "mutual registration" process similar
     to InfoExtractor objects.
+
+    Optionally PostProcessor can use a list of additional command-line arguments
+    with self._configuration_args.
     """
 
     _downloader = None
@@ -57,6 +60,13 @@ class PostProcessor(object):
         except Exception:
             self._downloader.report_warning(errnote)
 
+    def _configuration_args(self, default=[]):
+        pp_args = self._downloader.params.get('postprocessor_args')
+        if pp_args is None:
+            return default
+        assert isinstance(pp_args, list)
+        return pp_args
+
 
 class AudioConversionError(PostProcessingError):
     pass