Skip to content

Instantly share code, notes, and snippets.

/*
* dynamic_changing_element
*/
#include <gst/gst.h>
static gchar *opt_effects = NULL;
#define DEFAULT_EFFECTS "identity,exclusion,navigationtest," \
"agingtv,videoflip,vertigotv,gaussianblur,shagadelictv,edgetv"
@iamlow
iamlow / tms-api.yaml
Last active March 13, 2018 01:25
Verify an oas yaml file to use swagger
swagger: "2.0"
info:
description: "This is a telelian-media-station api server."
version: "0.1.0"
title: "telelian-media-station"
termsOfService: "http://telelian.com/"
contact:
email: "[email protected]"
license:
name: "Unknown"
@iamlow
iamlow / nginx.service
Created December 11, 2017 02:38
nginx.service for nginx on Jetson TX1/TX2
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
@iamlow
iamlow / nginx.conf
Last active December 11, 2017 03:05
nginx rtmp와 hls 설정
worker_processes auto;
pid /run/nginx.pid; # for systemd
events {
worker_connections 1024;
}
# RTMP configuration
rtmp {
@iamlow
iamlow / video.html
Last active March 19, 2020 09:06
videojs를 사용하여 RTMP와 HLS 재생하기
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
</head>
<body>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="360"
data-setup='{}'>
<source src="rtmp://192.168.0.13/live/stream" type="rtmp/flv">
@iamlow
iamlow / bootstrap.html
Created April 13, 2017 05:55
기존 jquery 1.4.2와 bootstrap 3.3.2 버전을 위해 jquery 1.11.2를 같이 사용하는 방법 $.noConflict();
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<!-- IE8 에서 HTML5 요소와 미디어 쿼리를 위한 HTML5 shim 와 Respond.js -->
<!-- WARNING: Respond.js 는 당신이 file:// 을 통해 페이지를 볼 때는 동작하지 않습니다. -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- jQuery (부트스트랩의 자바스크립트 플러그인을 위해 필요합니다) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
@iamlow
iamlow / StreamAPI.java
Last active March 21, 2017 08:27
StreamAPI Example
public class StreamAPI {
public static void main(String ...args) {
Trader raoul = new Trader("Raoul", "Cambridge");
Trader mario = new Trader("Mario","Milan");
Trader alan = new Trader("Alan","Cambridge");
Trader brian = new Trader("Brian","Cambridge");
List<Transaction> transactions = Arrays.asList(
new Transaction(brian, 2011, 300),
new Transaction(raoul, 2012, 1000),
@iamlow
iamlow / java8lambda.java
Created March 20, 2017 10:21
Java8 Lambda Example
List<String> names = Arrays.asList(new String("Lambda"), new String("Hello"), new String("World!"), new String("Java"));
// Comparator
class StringLengthComparator implements Comparator<String> {
public int compare(String s1, String s2) {
return new Integer(s1.length()).compareTo(new Integer(s2.length()));
}
}
names.sort(new StringLengthComparator());