Skip to content

Commit

Permalink
images can be clicked on dashboard to get larger image
Browse files Browse the repository at this point in the history
  • Loading branch information
edmore committed Apr 12, 2013
1 parent 2d61410 commit 59c3815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/feeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
login_cridentials = "-u #{cam_user} #{cam_password}" unless cam_user == ""

FileUtils.mkdir_p("#{app_root}/public/feeds/#{venue_name}/")
cmds << "openRTSP #{login_cridentials} -F #{venue_name} -d 10 -b 300000 #{cam_url} 2> /dev/null && ffmpeg -i #{venue_name}video-H264-1 -r 1 -s 320x180 -ss 5 -vframes 1 -f image2 #{app_root}/public/feeds/#{venue_name}/#{venue_name}.jpeg 2> /dev/null && rm -f #{venue_name}video-H264-1 2> /dev/null"
cmds << "openRTSP #{login_cridentials} -F #{venue_name} -d 10 -b 300000 #{cam_url} 2> /dev/null && ffmpeg -i #{venue_name}video-H264-1 -r 1 -s 1280x720 -ss 5 -vframes 1 -f image2 #{app_root}/public/feeds/#{venue_name}/#{venue_name}_big.jpeg 2>/dev/null && ffmpeg -i #{app_root}/public/feeds/#{venue_name}/#{venue_name}_big.jpeg -s 320x180 -f image2 #{app_root}/public/feeds/#{venue_name}/#{venue_name}.jpeg 2>/dev/null && rm -f #{venue_name}video-H264-1 2>/dev/null"
end

cmds.each{|c| system c }
Expand Down
3 changes: 2 additions & 1 deletion views/dashboard.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
- venues.each do |venue|
%div.grid_venue
-unless venue[3].nil?
%img{:src => "feeds/#{venue[0]}/#{venue[0]}.jpeg"}
%a{:href => "feeds/#{venue[0]}/#{venue[0]}_big.jpeg"}
%img{:src => "feeds/#{venue[0]}/#{venue[0]}.jpeg"}
-if not_regularly_updating(venue[3])
%span.flag
= "#{venue[0]} (#{time_to_string(venue[3])})"
Expand Down

0 comments on commit 59c3815

Please sign in to comment.