comparison recorder.php @ 161:84220382fea8

mod: 録画中のキャンセルを可能にした(動作確認、まだ不完全かも)
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sun, 04 Apr 2010 17:10:17 +0900
parents 4099ae0393eb
children b3095425e613
comparison
equal deleted inserted replaced
157:00b5ed67d792 161:84220382fea8
12 12
13 if( ! defined( RECORDER_CMD ) ) { 13 if( ! defined( RECORDER_CMD ) ) {
14 define( "RECORDER_CMD", INSTALL_PATH . "/recorder.php" ); 14 define( "RECORDER_CMD", INSTALL_PATH . "/recorder.php" );
15 } 15 }
16 16
17 $settings = Settings::factory();
18 $reserve_id = $argv[1];
19 $msgh_r = null; // 篆∞<祉若吾潟
20 $msgh_w = null; // 篆∞<祉若吾潟
21
17 22
18 // 潟潟違<祉若後篆 23 // 潟潟違<祉若後篆
19 24
20 function epgrec_get_message() { 25 function epgrec_get_message() {
21 global $msgh_r, $reserve_id; 26 global $msgh_r, $reserve_id;
52 // 鴻鐚 57 // 鴻鐚
53 // 58 //
54 function epgrec_childproc( $p ) 59 function epgrec_childproc( $p )
55 { 60 {
56 $st = proc_get_status( $p ); 61 $st = proc_get_status( $p );
57 $cpids = epgrec_childproc( $st['pid'] ); 62 $ppid = $st['pid'];
58 63
59 // ps 絎茵 64 // ps 絎茵
60 $d = array( 65 $d = array(
61 0 => array( 'file','/dev/null','r' ), 66 0 => array( 'file','/dev/null','r' ),
62 1 => array( 'pipe','w' ), 67 1 => array( 'pipe','w' ),
102 return true; // 篆荐若с 107 return true; // 篆荐若с
103 } 108 }
104 109
105 ////// 膩 110 ////// 膩
106 111
107 $settings = Settings::factory();
108 $reserve_id = $argv[1];
109 $msgh_r = null; // 篆∞<祉若吾潟
110 $msgh_w = null; // 篆∞<祉若吾潟
111 112
112 // <祉若吾潟緇 113 // <祉若吾潟緇
113 $ipc_key = ftok( RECORDER_CMD, "R" ); 114 $ipc_key = ftok( RECORDER_CMD, "R" );
114 $msgh_r = msg_get_queue( $ipc_key ); 115 $msgh_r = msg_get_queue( $ipc_key );
115 116
169 reclog( "牙祉潟潟罩≪с障", EPGREC_WARN ); 170 reclog( "牙祉潟潟罩≪с障", EPGREC_WARN );
170 } 171 }
171 else { 172 else {
172 epgrec_send_message("success"); 173 epgrec_send_message("success");
173 reclog("recorder:: 牙ID".$rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉筝" ); 174 reclog("recorder:: 牙ID".$rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉筝" );
175 $rec_cont = false;
174 } 176 }
175 break; 177 break;
176 178
177 case "stat": 179 case "stat":
178 epgrec_send_message("alive"); 180 epgrec_send_message("alive");