mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
validate:launcher: Generate proper EncodingProfiles for audio/video only media files
This commit is contained in:
parent
87cc7da213
commit
9a69c21acc
2 changed files with 14 additions and 5 deletions
|
@ -362,7 +362,7 @@ class GstValidateTranscodingTest(GstValidateTest):
|
|||
if urlparse.urlparse(self.dest_file).scheme == "":
|
||||
self.dest_file = path2url(self.dest_file)
|
||||
|
||||
profile = get_profile(self.combination)
|
||||
profile = get_profile(self.combination, self.media_descriptor)
|
||||
self.add_arguments("-o", profile)
|
||||
|
||||
def build_arguments(self):
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
# Boston, MA 02110-1301, USA.
|
||||
""" Some utilies. """
|
||||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import urllib
|
||||
import loggable
|
||||
import urlparse
|
||||
|
@ -223,10 +223,19 @@ def get_profile_full(muxer, venc, aenc, video_restriction=None,
|
|||
return ret.replace("::", ":")
|
||||
|
||||
|
||||
def get_profile(combination, video_restriction=None, audio_restriction=None):
|
||||
def get_profile(combination, media_descriptor=None, video_restriction=None, audio_restriction=None):
|
||||
vcaps = FORMATS[combination.vcodec]
|
||||
acaps = FORMATS[combination.acodec]
|
||||
if media_descriptor is not None:
|
||||
if media_descriptor.get_num_tracks("video") == 0:
|
||||
vcaps = None
|
||||
|
||||
if media_descriptor.get_num_tracks("audio") == 0:
|
||||
acaps = None
|
||||
|
||||
return get_profile_full(FORMATS[combination.container],
|
||||
FORMATS[combination.vcodec],
|
||||
FORMATS[combination.acodec],
|
||||
vcaps,
|
||||
acaps,
|
||||
video_restriction=video_restriction,
|
||||
audio_restriction=audio_restriction)
|
||||
|
||||
|
|
Loading…
Reference in a new issue