Skip to content

Instantly share code, notes, and snippets.

@alexandernst
Last active December 15, 2015 08:48
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 alexandernst/5233240 to your computer and use it in GitHub Desktop.
Save alexandernst/5233240 to your computer and use it in GitHub Desktop.
Cross-compiling applications for ARM
$ pwd
/home/alexandernst/tmp_arm_build
$ cat gst_hello_world.c
#include <gst/gst.h>
int main(int argc, char **argv){
gst_init(&argc, &argv);
GMainLoop *loop = g_main_loop_new(NULL, FALSE);
GstElement *pipeline = gst_parse_launch("videotestsrc ! autovideosink", NULL);
GstElement *test = gst_bin_get_by_name(GST_BIN(pipeline), "test");
gst_element_set_state(pipeline, GST_STATE_PLAYING);
g_main_loop_run(loop);
}
$ gcc `pkg-config --cflags gstreamer-app-0.10` -o gst_hello_world gst_hello_world.c `pkg-config --libs gstreamer-app-0.10`
$ file gst_hello_world
gst_hello_world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=e279dd141ab46135c9b7fdf8d99c30df1a930143, not stripped
$ ./gst_hello_world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment