Skip to content

Instantly share code, notes, and snippets.

@jonasevcik
jonasevcik / Create_Iframe_Index_M3U8.bash
Created April 20, 2019 09:19 — forked from svagionitis/Create_Iframe_Index_M3U8.bash
Segment an mp4 file to HLS streaming files
#!/bin/bash
# Create an Iframe index from HLS segmented streams
# $1: Filename to be created
# $2: Location of segmented ts files
# Check how many arguments
if [ $# != 2 ]; then
echo "Usage: $0 [Input filename] [Location of segmented streams]"
exit 1;
fi
@jonasevcik
jonasevcik / CallError.java
Created January 12, 2016 10:51
Demo of difference between accessing views from OkHttp 2 Callback and MainThreadCallback.
public class CallError extends RuntimeException {
public static CallError networkError(Request response, IOException exception) {
return new CallError(response, Kind.NETWORK, exception);
}
public static CallError httpError(Request response) {
return new CallError(response, Kind.HTTP, null);
}