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
| #!/bin/bash | |
| # Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
| # Inspired from https://gist.github.com/faleev/3435377 | |
| # Remove any existing packages: | |
| sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
| # Get the dependencies (Ubuntu Server or headless users): | |
| sudo apt-get update |
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
| package com.memtrip; | |
| import java.io.FileNotFoundException; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import android.content.ContentResolver; | |
| import android.content.ContentUris; | |
| import android.content.ContentValues; | |
| import android.graphics.Bitmap; |
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
| # run as root! | |
| yum erase ffmpeg faac libfaac x264 libx264 libvpx -y | |
| yum install gcc gcc-c++ automake autoconf libtool nasm git subversion nasm pkgconfig -y | |
| export LD_LIBRARY_PATH=/usr/local/lib/ | |
| echo /usr/local/lib > /etc/ld.so.conf.d/custom-libs.conf | |
| ldconfig | |
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
| #include <opencv/cv.h> | |
| #include <opencv/highgui.h> | |
| #include <iostream> | |
| using namespace std; | |
| using namespace cv; | |
| // quality-metric | |
| namespace qm | |
| { |
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
| // Replace 'dependencies' in your build.gradle file with the following | |
| // or add these to whatever other dependencies you have. | |
| dependencies { | |
| compile 'com.android.support:support-v4:19.0.0' | |
| compile 'com.google.android.gms:play-services:4.0.30' | |
| compile('com.google.api-client:google-api-client-xml:1.17.0-rc') { | |
| exclude group: 'com.google.android.google-play-services' | |
| } | |
| compile 'com.google.http-client:google-http-client-gson:1.17.0-rc' |
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
| # Capture a single image and save it in JPEG format. | |
| $ gst-launch v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/test.jpg | |
| # Stream video from a webcam. | |
| $ gst-launch v4l2src ! xvimagesink |
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
| #include <roxlu/core/Log.h> | |
| #include <roxlu/core/Utils.h> | |
| #include <video/X264Encoder.h> | |
| X264Encoder::X264Encoder() | |
| :in_width(0) | |
| ,in_height(0) | |
| ,in_pixel_format(AV_PIX_FMT_NONE) | |
| ,out_width(0) | |
| ,out_height(0) |
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
| #include <stdio.h> | |
| #include <math.h> | |
| #define clear 1;if(c>=11){c=0;sscanf(_,"%lf%c",&r,&c);while(*++_-c);}\ | |
| else if(argc>=4&&!main(4-(*_++=='('),argv))_++;g:c+= | |
| #define puts(d,e) return 0;}{double a;int b;char c=(argc<4?d)&15;\ | |
| b=(*_%__LINE__+7)%9*(3*e>>c&1);c+= | |
| #define I(d) (r);if(argc<4&&*#d==*_){a=r;r=usage?r*a:r+a;goto g;}c=c | |
| #define return if(argc==2)printf("%f\n",r);return argc>=4+ | |
| #define usage main(4-__LINE__/26,argv) | |
| #define calculator *_*(int) |