This file contains 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
import Foundation | |
import Logging | |
protocol ZeroConfExplorerDelegate: AnyObject { | |
func didFindServer(_ server: MPDServer) | |
} | |
final class ZeroConfExplorer: NSObject { | |
// MARK: - Public properties | |
// Is searching flag |
This file contains 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
mpd_host "::1" | |
mpd_port "6600" | |
mpd_music_dir "/Users/nxm/Music/beets/" | |
# NCMPCPP | |
ncmpcpp_directory = ~/.ncmpcpp | |
lyrics_directory = ~/.ncmpcpp/lyrics | |
# UI | |
user_interface = "alternative" |
This file contains 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
music_directory "/Users/nxm/Music/beets/" | |
db_file "/Users/nxm/Music/mpd/mpd.db" | |
pid_file "/Users/nxm/Music/mpd/mpd.pid" | |
state_file "/Users/nxm/Music/mpd/mpd.state" | |
sticker_file "/Users/nxm/Music/mpd/stickers" | |
playlist_directory "/Users/nxm/Music/mpd/playlists/" | |
auto_update "yes" | |
auto_update_depth "5" | |
filesystem_charset "UTF-8" |
This file contains 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
directory: /Users/nxm/Music/beets | |
library: ~/.config/beets/music.blb | |
pluginpath: ~/.config/beets/plugins/ | |
plugins: inline info ftintitle smartplaylist mpdupdate | |
threaded: yes | |
ignore: .AppleDouble ._* *~ .DS_Store | |
asciify_paths: yes | |
art_filename: cover | |
per_disc_numbering: yes | |
sort_case_insensitive: yes |
This file contains 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
import VideoToolbox | |
import AVFoundation | |
private var __canHWAVC: Bool = false | |
private var __tokenHWAVC: dispatch_once_t = 0 | |
public protocol NYXAVCEncoderDelegate : class | |
{ | |
func didEncodeFrame(frame: CMSampleBuffer) | |
func didFailToEncodeFrame() |
This file contains 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
-(UIImage*)mmg_imageScaledToFitSize:(CGSize)fitSize | |
{ | |
// Create a vImage_Buffer from the CGImage | |
CGImageRef sourceRef = self.CGImage; | |
vImage_Buffer srcBuffer; | |
vImage_CGImageFormat format = { | |
.bitsPerComponent = 8, | |
.bitsPerPixel = 32, | |
.colorSpace = NULL, | |
.bitmapInfo = (CGBitmapInfo)kCGImageAlphaFirst, |
This file contains 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
-(NSData*)gzDeflate | |
{ | |
/// Max decompressed data size : 128Kb | |
/// Feel free to increase it to suit your needs | |
unsigned char outt[131072]; | |
z_stream strm = (z_stream){.zalloc = Z_NULL, .zfree = Z_NULL, .opaque = Z_NULL, .avail_in = [self length], .next_in = (Bytef*)[self bytes], .avail_out = 131072, .next_out = outt}; | |
if (inflateInit2(&strm, (15 + 16)) != Z_OK) | |
return nil; |