Skip to content

Instantly share code, notes, and snippets.

@Nokius
Created April 21, 2015 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nokius/03c4d2840694f3719b95 to your computer and use it in GitHub Desktop.
Save Nokius/03c4d2840694f3719b95 to your computer and use it in GitHub Desktop.
gst/plugin.c
static gboolean
plugin_init (GstPlugin * plugin)
{
gboolean ok = TRUE;
GST_DEBUG_CATEGORY_INIT (gst_droid_camsrc_debug, "droidcamsrc",
0, "Android HAL camera source");
GST_DEBUG_CATEGORY_INIT (gst_droid_eglsink_debug, "droideglsink",
0, "Android EGL sink");
//GST_DEBUG_CATEGORY_INIT (gst_droid_adec_debug, "droidadec",
// 0, "Android HAL audio decoder");
//GST_DEBUG_CATEGORY_INIT (gst_droid_aenc_debug, "droidaenc",
// 0, "Android HAL audio encoder");
GST_DEBUG_CATEGORY_INIT (gst_droid_vdec_debug, "droidvdec",
0, "Android HAL video decoder");
GST_DEBUG_CATEGORY_INIT (gst_droid_venc_debug, "droidvenc",
0, "Android HAL video encoder");
GST_DEBUG_CATEGORY_INIT (gst_droid_codec_debug, "droidcodec",
0, "Android HAL codec");
ok &= gst_element_register (plugin, "droidcamsrc", GST_RANK_PRIMARY,
GST_TYPE_DROIDCAMSRC);
ok &= gst_element_register (plugin, "droideglsink", GST_RANK_PRIMARY,
GST_TYPE_DROIDEGLSINK);
ok &= gst_element_register (plugin, "droiddec", GST_RANK_PRIMARY + 1,
GST_TYPE_DROIDDEC);
ok &= gst_element_register (plugin, "droidenc", GST_RANK_PRIMARY + 1,
GST_TYPE_DROIDENC);
//ok &= gst_element_register (plugin, "droidadec", GST_RANK_PRIMARY + 1,
// GST_TYPE_DROIDADEC);
//ok &= gst_element_register (plugin, "droidaenc", GST_RANK_PRIMARY + 1,
// GST_TYPE_DROIDAENC);
if (ok)
droid_media_init ();
return ok;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
droid,
"Android HAL plugins",
plugin_init, VERSION, "LGPL", PACKAGE_NAME, "http://foolab.org/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment