Skip to content

Instantly share code, notes, and snippets.

View elmodaddyb's full-sized avatar

Eamonn elmodaddyb

View GitHub Profile
@elmodaddyb
elmodaddyb / instructions.md
Last active July 4, 2018 17:38
Ubuntu PPA for Gerbera

Steps

  1. Clone Gerbera
  2. Download pupnp1.8 manually
  3. Build install pupnp1.8.3 to custom directory

cmake ../ -DWITH_MAGIC=1 -DWITH_MYSQL=0 -DWITH_CURL=1 -DWITH_JS=0
-DWITH_TAGLIB=1 -DWITH_AVCODEC=1 -DWITH_FFMPEGTHUMBNAILER=0 -DWITH_EXIF=1 -DWITH_LASTFM=0 -DCMAKE_INSTALL_PREFIX=/home/gerbera/debian/gerbera

@elmodaddyb
elmodaddyb / ogg-stream.patch
Created May 30, 2018 23:38
Gerbera Transcoding Ogg Patch
diff --git a/src/file_request_handler.cc b/src/file_request_handler.cc
index 9c64673b..0b93748d 100644
--- a/src/file_request_handler.cc
+++ b/src/file_request_handler.cc
@@ -213,6 +213,7 @@ void FileRequestHandler::get_info(IN const char* filename, OUT UpnpFileInfo* inf
}
UpnpFileInfo_set_FileLength(info, -1);
+ header = header + _("\r\nAccept-Ranges: bytes\r\n");
} else {
@elmodaddyb
elmodaddyb / duktape.rb
Last active May 28, 2018 16:07
Homebrew's for Gerbera
class Duktape < Formula
desc "Embeddable Javascript engine with compact footprint"
homepage "http://duktape.org"
url "http://duktape.org/duktape-2.2.1.tar.xz"
sha256 "3abe2eed2553305262b892c98f550bb1a94cf4fd73b51dc5c176fe08e7ade7f2"
def install
inreplace "Makefile.sharedlibrary" do |s|
s.gsub! "-soname", "-install_name"
s.gsub! %r{\/usr\/local}, prefix
@elmodaddyb
elmodaddyb / bubbleUPNP-search.xml
Created April 6, 2018 00:51
UPNP Search Example
<u:Search xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ContainerID>0</ContainerID>
<SearchCriteria>(upnp:class = &quot;object.container.album.musicAlbum&quot; and upnp:artist contains &quot;SearchByArtist&quot;)</SearchCriteria>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>16</RequestedCount>
<SortCriteria/>
</u:Search>
@elmodaddyb
elmodaddyb / CMakeLists.txt
Last active November 19, 2017 18:33
Example Using GoogleTest
add_executable(testonlineservices
$<TARGET_OBJECTS:libgerbera>
main.cpp
testonlineservices.cpp
testonlineservices.h
)
include(DefFileName)
define_file_path_for_sources(testonlineservices)
@elmodaddyb
elmodaddyb / README.md
Last active December 28, 2017 22:32
gerbera as daemon

Load Gerbera as a System Daemon

This readme outlines how to add the Gerbera runtime as a system daemon using the systemd.

Prerequisites

You installed gerbera to /usr/local/bin/gerbera

If you don't know the path try which gerbera

@elmodaddyb
elmodaddyb / macOS-sierra.md
Created September 10, 2017 21:05
Instructions for Gerbera build on macos Sierra
  1. Download source
  2. install taglib using script
  3. install pupnp using script (update prefix to /usr/local)
  4. install duktape modify Makefile.sharedlibrary to use -install_name instead of -soname for gcc compilation.
  5. Build project, below is an example
~/gerbera/ mkdir build
~/gerbera/ cd build
~/gerbera/build/ cmake ../ -DCMAKE_FIND_FRAMEWORK=LAST \
-DWITH_MAGIC=1 \
/development/gerbera/cmake-build-debug/gerbera --debug
2017-07-26 20:12:03 INFO: Gerbera UPnP Server version 1.1.0_alpha - http://gerbera.io/
2017-07-26 20:15:18 DEBUG: [src/session_manager.cc:246] timerNotify(): notified... 1 sessions.
2017-07-26 20:15:18 DEBUG: [src/timer.cc:100] triggerWait(): triggerWait. - 4 subscriber(s)
2017-07-26 20:16:03 DEBUG: [src/timer.cc:100] triggerWait(): triggerWait. - 4 subscriber(s)
2017-07-26 20:16:18 DEBUG: [src/session_manager.cc:246] timerNotify(): notified... 1 sessions.
2017-07-26 20:16:18 DEBUG: [src/session_manager.cc:255] timerNotify(): session timeout: 112bbe2e-7009-4e7a-a166-8d8a0bf56c5d - diff: 233854
2017-07-26 20:16:18 DEBUG: [src/timer.cc:83] removeTimerSubscriber(): Removing subscriber...
2017-07-26 20:16:18 DEBUG: [src/timer.cc:100] triggerWait(): triggerWait. - 3 subscriber(s)
@elmodaddyb
elmodaddyb / gerbera.service
Created May 29, 2017 02:04
Gerbera Linux Systemd Service
[Unit]
Description=Gerbera Media Server
After=network.target
[Service]
Type=simple
User=gerbera
Group=gerbera
ExecStart=/usr/local/bin/gerbera
Restart=on-failure
@elmodaddyb
elmodaddyb / gerbera.io.plist
Created May 29, 2017 01:58
Gerbera OSX Launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>gerbera.io</string>
<key>ProgramArguments</key>
<array>