mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
profile: match video/x-h263 as H.263 Baseline profile.
HACK: qtdemux does not report profiles for H.263. So, assume plain "video/x-h263" is H.263 Baseline profile. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
c42ba571a8
commit
b963ccb929
2 changed files with 15 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <gst/gstbuffer.h>
|
||||
#include "gstvaapicompat.h"
|
||||
#include "gstvaapiprofile.h"
|
||||
#include "gstvaapiworkarounds.h"
|
||||
|
||||
typedef struct _GstVaapiProfileMap GstVaapiProfileMap;
|
||||
typedef struct _GstVaapiEntrypointMap GstVaapiEntrypointMap;
|
||||
|
@ -245,11 +246,18 @@ gst_vaapi_profile_from_caps(GstCaps *caps)
|
|||
strcmp(profile_str, m->profile_str) == 0)
|
||||
profile = best_profile;
|
||||
}
|
||||
if (!profile)
|
||||
if (!profile) {
|
||||
profile = gst_vaapi_profile_from_codec_data(
|
||||
gst_vaapi_profile_get_codec(m->profile),
|
||||
codec_data
|
||||
);
|
||||
if (!profile &&
|
||||
WORKAROUND_QTDEMUX_NO_H263_PROFILES &&
|
||||
strncmp(name, "video/x-h263", namelen) == 0) {
|
||||
/* HACK: qtdemux does not report profiles for h263 */
|
||||
profile = m->profile;
|
||||
}
|
||||
}
|
||||
gst_caps_unref(caps_test);
|
||||
}
|
||||
return profile ? profile : best_profile;
|
||||
|
|
|
@ -30,6 +30,12 @@ G_BEGIN_DECLS
|
|||
*/
|
||||
#define WORKAROUND_H263_BASELINE_DECODE_PROFILE (1)
|
||||
|
||||
/*
|
||||
* Workaround for qtdemux that does not report profiles for
|
||||
* video/x-h263. Assume H.263 Baseline profile in this case.
|
||||
*/
|
||||
#define WORKAROUND_QTDEMUX_NO_H263_PROFILES (1)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_WORKAROUNDS_H */
|
||||
|
|
Loading…
Reference in a new issue