Back to index

texmacs  1.0.7.15
mplayer.cpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : mplayer.cpp
00004 * DESCRIPTION: interface with mplayer
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #include "Mplayer/mplayer.hpp"
00013 #include "file.hpp"
00014 #include <X11/Xlib.h>
00015 #include <X11/Xatom.h>
00016 
00017 bool
00018 supports_mplayer () {
00019   return exists_in_path ("mplayer");
00020 }
00021 
00022 void
00023 mplayer_play_sound (url u) {
00024   system ("mplayer", u, "> /dev/null 2> /dev/null &");
00025 }
00026 
00027 void
00028 mplayer_play_video (url u) {
00029   system ("mplayer", u, "> /dev/null 2> /dev/null &");
00030 }