Created
August 2, 2017 14:31
-
-
Save sr105/5a1bb43c98109bb9c798454342168db0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static GstEncodingProfile* create_encoding_profile() | |
{ | |
// At some point, we might want to allow multiple formats etc. | |
// FIXME: hook up Configure() parameters here | |
GstEncodingContainerProfile *container; | |
GstEncodingVideoProfile *video; | |
GstCaps *caps, *restr; | |
caps = gst_caps_new_simple("video/quicktime", "variant", G_TYPE_STRING, "iso", NULL); | |
container = gst_encoding_container_profile_new(NULL, NULL, caps, NULL); | |
gst_caps_unref(caps); | |
//caps = gst_caps_new_empty_simple("video/x-h264"); | |
caps = gst_caps_from_string("vaapih264enc"); | |
#ifdef FPS_LIMIT | |
restr = gst_caps_new_simple("video/x-raw", "framerate", GST_TYPE_FRACTION, FPS_LIMIT, 1, NULL); | |
#else | |
restr = NULL; | |
#endif | |
video = gst_encoding_video_profile_new(caps, NULL, restr, 1); | |
gst_caps_unref(caps); | |
if (restr) | |
gst_caps_unref(restr); | |
gst_encoding_container_profile_add_profile(container, GST_ENCODING_PROFILE(video)); | |
return GST_ENCODING_PROFILE(container); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment