summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/class/media.interface.php1
-rw-r--r--lib/class/song.class.php2
-rw-r--r--lib/class/video.class.php12
-rw-r--r--play/index.php2
4 files changed, 15 insertions, 2 deletions
diff --git a/lib/class/media.interface.php b/lib/class/media.interface.php
index 80b4bf06..25c28b2e 100644
--- a/lib/class/media.interface.php
+++ b/lib/class/media.interface.php
@@ -29,6 +29,7 @@ interface media {
public function format();
public function native_stream();
public function play_url($oid,$sid='',$force_http='');
+ public function stream_cmd();
} // end interface
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index dbe3c05a..8bb2cd18 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -962,7 +962,7 @@ class Song extends database_object implements media {
* we can't use this->type because its been formated for the
* downsampling
*/
- function stream_cmd() {
+ public function stream_cmd() {
// Find the target for this transcode
$conf_type = 'transcode_' . $this->type . '_target';
diff --git a/lib/class/video.class.php b/lib/class/video.class.php
index b973fafe..dd187be1 100644
--- a/lib/class/video.class.php
+++ b/lib/class/video.class.php
@@ -86,4 +86,16 @@ class Video extends database_object implements media {
} // play_url
+ /**
+ * stream_cmd
+ * test and see if the video needs to be natively streamed
+ * if not it returns the transocding command from the config file
+ * we can't use this->type because its been formated for the downsampling
+ */
+ public function stream_cmd() {
+
+
+
+ } // stream_cmd
+
} // end Video class
diff --git a/play/index.php b/play/index.php
index cd5e32d6..d98ca31e 100644
--- a/play/index.php
+++ b/play/index.php
@@ -303,7 +303,7 @@ if (Config::get('downsample_remote')) {
// If they are downsampling, or if the song is not a native stream or it's non-local
if ((Config::get('transcode') == 'always' || !$media->native_stream() || $not_local) && Config::get('transcode') != 'never') {
debug_event('Downsample','Starting Downsample...','5');
- $fp = Stream::start_downsample($song,$lastid,$song_name,$start);
+ $fp = Stream::start_downsample($media,$lastid,$song_name,$start);
$song_name = $media->f_artist_full . " - " . $media->title . "." . $media->type;
// Note that this is downsampling
$downsampled_song = true;