mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
dshowsrcwrapper: Added support for image/jpeg and h264
https://bugzilla.gnome.org/show_bug.cgi?id=741188
This commit is contained in:
parent
9d79b65a55
commit
0fc55436b3
2 changed files with 29 additions and 2 deletions
|
@ -462,12 +462,16 @@ gst_dshow_new_video_caps (GstVideoFormat video_format, const gchar * name,
|
|||
if (g_ascii_strncasecmp (name, "video/x-dv, systemstream=FALSE", 31) == 0) {
|
||||
video_caps = gst_caps_new_simple ("video/x-dv",
|
||||
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
||||
"format", G_TYPE_STRING, "dvsd",
|
||||
"format", G_TYPE_STRING, "dvsd",
|
||||
NULL);
|
||||
} else if (g_ascii_strncasecmp (name, "video/x-dv, systemstream=TRUE", 31) == 0) {
|
||||
video_caps = gst_caps_new_simple ("video/x-dv",
|
||||
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
|
||||
return video_caps;
|
||||
} else if (g_ascii_strncasecmp (name, "image/jpeg", 10) == 0) {
|
||||
video_caps = gst_caps_new_simple ("image/jpeg", NULL);
|
||||
} else if (g_ascii_strncasecmp (name, "video/x-h264", 12) == 0) {
|
||||
video_caps = gst_caps_new_simple ("video/x-h264", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,18 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
"width = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"height = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"framerate = " GST_VIDEO_FPS_RANGE ", "
|
||||
"systemstream = (boolean) { TRUE, FALSE }")
|
||||
"systemstream = (boolean) { TRUE, FALSE }; "
|
||||
|
||||
"image/jpeg, "
|
||||
"width = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"height = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"framerate = " GST_VIDEO_FPS_RANGE "; "
|
||||
|
||||
"video/x-h264, "
|
||||
"width = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"height = " GST_VIDEO_SIZE_RANGE ", "
|
||||
"framerate = " GST_VIDEO_FPS_RANGE
|
||||
)
|
||||
);
|
||||
|
||||
G_DEFINE_TYPE (GstDshowVideoSrc, gst_dshowvideosrc, GST_TYPE_PUSH_SRC)
|
||||
|
@ -898,6 +909,18 @@ gst_dshowvideosrc_getcaps_from_streamcaps (GstDshowVideoSrc * src, IPin * pin)
|
|||
|
||||
pin_mediatype->granularityWidth = 0;
|
||||
pin_mediatype->granularityHeight = 0;
|
||||
|
||||
} else if (gst_dshow_check_mediatype (pin_mediatype->mediatype,
|
||||
MEDIASUBTYPE_MJPG, FORMAT_VideoInfo)) {
|
||||
mediacaps =
|
||||
gst_dshow_new_video_caps (GST_VIDEO_FORMAT_ENCODED,
|
||||
"image/jpeg", pin_mediatype);
|
||||
|
||||
} else if (gst_dshow_check_mediatype (pin_mediatype->mediatype,
|
||||
MEDIASUBTYPE_H264, FORMAT_VideoInfo)) {
|
||||
mediacaps =
|
||||
gst_dshow_new_video_caps (GST_VIDEO_FORMAT_ENCODED,
|
||||
"video/x-h264", pin_mediatype);
|
||||
}
|
||||
|
||||
if (mediacaps) {
|
||||
|
|
Loading…
Reference in a new issue