Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1448 lines
32 KiB

  1. /*
  2. Xg[ǗNXNX
  3. iNP2)@Sachiko Yasukawa
  4. */
  5. // Date | Author | Description
  6. // -----------+--------------+--------------------------------------------
  7. // 1998.03.27 | Hideki Yagi | Change the specification about
  8. // | | Get***Property().
  9. // 1998.03.31 | Hideki Yagi | Change the specification about
  10. // | | GetChlgKey() and GetDVDKey2().
  11. //
  12. #include "stdafx.h"
  13. #include "includes.h"
  14. #include "classlib.h"
  15. #define ISENDSTREAMOBJECTINIT ((m_pMPEGBoardStateObject == NULL || m_pIHAL == NULL || m_pTransfer == NULL || m_pIStreamHAL == NULL ) ? TRUE : FALSE)
  16. //�R���X�g���N�^
  17. CBaseStream::CBaseStream()
  18. {
  19. m_pNextStreamObject=NULL;
  20. m_pPrevStreamObject=NULL;
  21. m_pMPEGBoardStateObject=NULL;
  22. m_pIHAL=NULL;
  23. m_pIStreamHAL = NULL;
  24. m_pTransfer = NULL;
  25. }
  26. //�ǂ��������ɂ��΂��邩���l���ăR�[�f�B���O���Ȃ���
  27. //������
  28. inline BOOL CBaseStream::Init()
  29. {
  30. m_pNextStreamObject=NULL;
  31. m_pPrevStreamObject=NULL;
  32. m_pMPEGBoardStateObject=NULL;
  33. m_pIHAL=NULL;
  34. m_pIStreamHAL = NULL;
  35. m_pTransfer = NULL;
  36. return TRUE;
  37. }
  38. //��
  39. BOOL CBaseStream::Play()
  40. {
  41. //�����ݒ肪�I�����ĂȂ�
  42. if(ISENDSTREAMOBJECTINIT){
  43. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  44. DBG_PRINTF(("CLASSLIB:CBaseStream::GetMPEGBuffer:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  45. DBG_BREAK();
  46. return FALSE;
  47. }
  48. return GetIMPEGBoardState()->ChangePlay(m_pIHAL, m_pIStreamHAL);
  49. }
  50. //���~
  51. BOOL CBaseStream::Stop()
  52. {
  53. //�����ݒ肪�I�����ĂȂ�
  54. if(ISENDSTREAMOBJECTINIT){
  55. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  56. DBG_PRINTF(("CLASSLIB:CBaseStream::Stop:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  57. DBG_BREAK();
  58. return FALSE;
  59. }
  60. return GetIMPEGBoardState()->ChangeStop(m_pIHAL, m_pIStreamHAL, this);
  61. }
  62. //�ꎞ���~
  63. BOOL CBaseStream::Pause()
  64. {
  65. //�����ݒ肪�I�����ĂȂ�
  66. if(ISENDSTREAMOBJECTINIT){
  67. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  68. DBG_PRINTF(("CLASSLIB:CBaseStream::Pause:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  69. DBG_BREAK();
  70. return FALSE;
  71. }
  72. return GetIMPEGBoardState()->ChangePause(m_pIHAL, m_pIStreamHAL);
  73. }
  74. //�R�}����
  75. //VxD�̂Ƃ������g���Ȃ��悤�ɂ����̂́H
  76. BOOL CBaseStream::SingleStep()
  77. {
  78. //�����ݒ肪�I�����ĂȂ�
  79. if(ISENDSTREAMOBJECTINIT){
  80. DBG_PRINTF(("CLASSLIB:CBaseStream::SingleStep:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  81. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  82. DBG_BREAK();
  83. return FALSE;
  84. }
  85. //VxD�̂Ƃ������g���Ȃ�
  86. if(!ISMIXSTREAMTYPE(m_StreamType)){
  87. _RPTF0(_CRT_WARN, "NOTIMPLEMENTED \n");
  88. DBG_PRINTF(("CLASSLIB:CBaseStream::SingleStep:CALL ONLY FOR MIXSTREAM\n"));
  89. DBG_BREAK();
  90. return FALSE;
  91. }
  92. return GetIMPEGBoardState()->ChangePauseViaSingleStep(m_pIHAL, m_pIStreamHAL);
  93. }
  94. //�X���[��
  95. //VxD�̂Ƃ������g���Ȃ��悤�ɂ����ɂ́H
  96. BOOL CBaseStream::Slow(DWORD speed)
  97. {
  98. //�����ݒ肪�I�����ĂȂ�
  99. if(ISENDSTREAMOBJECTINIT){
  100. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  101. DBG_PRINTF(("CLASSLIB:CBaseStream::Slow:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  102. DBG_BREAK();
  103. return FALSE;
  104. }
  105. //VxD�̂Ƃ������g���Ȃ�
  106. if(!ISMIXSTREAMTYPE(m_StreamType)){
  107. _RPTF0(_CRT_WARN, "NOTIMPLEMENTED \n");
  108. DBG_PRINTF(("CLASSLIB:CBaseStream::Slow:CALL ONLY FOR MIXSTREAM\n"));
  109. DBG_BREAK();
  110. return FALSE;
  111. }
  112. return GetIMPEGBoardState()->ChangeSlow(speed, m_pIHAL, m_pIStreamHAL);
  113. }
  114. //�X�L����
  115. //VxD�̂Ƃ������g���Ȃ��悤�ɂ����ɂ́H
  116. BOOL CBaseStream::Scan(DWORD speed)
  117. {
  118. //�����ݒ肪�I�����ĂȂ�
  119. if(ISENDSTREAMOBJECTINIT){
  120. DBG_PRINTF(("CLASSLIB:CBaseStream::Scan:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  121. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  122. DBG_BREAK();
  123. return FALSE;
  124. }
  125. //VxD�̂Ƃ������g���Ȃ�
  126. if(!ISMIXSTREAMTYPE(m_StreamType)){
  127. _RPTF0(_CRT_WARN, "NOTIMPLEMENTED \n");
  128. DBG_PRINTF(("CLASSLIB:CBaseStream::Slow:CALL ONLY FOR MIXSTREAM\n"));
  129. DBG_BREAK();
  130. return FALSE;
  131. }
  132. return GetIMPEGBoardState()->ChangeScan(speed, m_pIHAL, m_pIStreamHAL);
  133. }
  134. //���݂̃X�g���[���̃X�e�[�^�X���Ԃ�
  135. LIBSTATE CBaseStream::GetState()
  136. {
  137. //�����ݒ肪�I�����ĂȂ�
  138. if(ISENDSTREAMOBJECTINIT){
  139. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  140. DBG_PRINTF(("CLASSLIB:CBaseStream::GetState:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  141. return PowerOff;
  142. }
  143. return ((CMPEGBoardState *)m_pMPEGBoardStateObject)->GetState();
  144. }
  145. //�f�[�^�]���̗v��
  146. //���^�[���l���l����
  147. BOOL CBaseStream::SendData(IMPEGBuffer *pBuffer)
  148. {
  149. ASSERT(pBuffer);
  150. DBG_PRINTF(("CLASSLIB: CALLED CBaseStream::SendData\n"));
  151. //�����ݒ肪�I�����ĂȂ�
  152. if(ISENDSTREAMOBJECTINIT){
  153. DBG_PRINTF(("CLASSLIB:CBaseStream::SendData:NOT INITILIZE CMPEGBoard COLLECTLY\n"));
  154. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  155. DBG_BREAK();
  156. return FALSE;
  157. }
  158. // �󂯎������o�b�t�@��Next�|�C���^��������
  159. pBuffer->SetNext( NULL );
  160. //�g�����X�t�@�[�ɃL���[�ɓ����Ă��炦���悤�v��
  161. if(!((CTransfer *)m_pTransfer)->EnQueue( pBuffer )){
  162. _RPTF0(_CRT_WARN, "CAN'T ENQUEUE \n");
  163. DBG_PRINTF(("CLASSLIB:CBaseStream::SendData:CAN'T ENQUEUE \n"));
  164. DBG_BREAK();
  165. return FALSE;
  166. }
  167. //�g�����X�t�@�[�ɓ]���v��
  168. if(!((CTransfer *)m_pTransfer)->DeQueue()){
  169. _RPTF0(_CRT_WARN, "CAN'T DEQUEUE \n");
  170. DBG_PRINTF(("CLASSLIB:CBaseStream::SendData:CAN'T DEQUEUE \n"));
  171. DBG_BREAK();
  172. return FALSE;
  173. }
  174. return TRUE;
  175. }
  176. //�X�g���[���̃X�e�[�g���Ǘ������I�u�W�F�N�g���Z�b�g����
  177. BOOL CBaseStream::SetStateObject(IMPEGBoardState *pMPEGBoardStateObject)
  178. {
  179. ASSERT(pMPEGBoardStateObject);
  180. //�X�e�[�g�R���g���[���I�u�W�F�N�g
  181. m_pMPEGBoardStateObject = pMPEGBoardStateObject;
  182. return TRUE;
  183. }
  184. //�]�����Ǘ������I�u�W�F�N�g�̐ݒ�
  185. BOOL CBaseStream::SetTransferObject(ITransfer *pTransfer)
  186. {
  187. ASSERT(pTransfer);
  188. //�g�����X�t�@�[�R���g���[���I�u�W�F�N�g�͂Q�x�ݒ��ł��Ȃ�
  189. if(m_pTransfer){
  190. _RPTF0(_CRT_WARN, "ALREADY SET TRANSFER OBJECT \n");
  191. DBG_PRINTF(("CLASSLIB:CBaseStream::SetTransferObject:ALREADY SET TRANSFER OBJECT \n"));
  192. DBG_BREAK();
  193. return FALSE;
  194. }
  195. //�g�����X�t�@�[�R���g���[���I�u�W�F�N�g�ݒ�
  196. m_pTransfer = pTransfer;
  197. //�t�Ƀg�����X�t�@�[�I�u�W�F�N�g�ɑ΂��ăX�g���[�����ݒ�
  198. ((CTransfer *)m_pTransfer)->AddStreamObject((IBaseStream *)/*(CBuffer *)*/this);
  199. return TRUE;
  200. }
  201. //�]�����[�h�̐ݒ�
  202. BOOL CBaseStream::SetTransferMode(HALSTREAMMODE StreamMode)
  203. {
  204. HALRESULT st;
  205. //�����ݒ肪�I�����ĂȂ�
  206. if(ISENDSTREAMOBJECTINIT){
  207. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  208. DBG_BREAK();
  209. return FALSE;
  210. }
  211. if((st = m_pIStreamHAL->SetTransferMode(StreamMode)) != HAL_SUCCESS){
  212. _RPTF0(_CRT_WARN, "CAN'T SET TRANSFERMODE \n");
  213. DBG_PRINTF(("CLASSLIB:CBaseStream::SetTransferMode:CAN'T SET TRANSFERMODE\n"));
  214. DBG_BREAK();
  215. return FALSE;
  216. }
  217. return TRUE;
  218. }
  219. // Set transfer typr & direction 98.03.31 H.Yagi
  220. BOOL CBaseStream::SetDataDirection(DirectionType type)
  221. {
  222. HALRESULT st;
  223. //�����ݒ肪�I�����ĂȂ�
  224. if(ISENDSTREAMOBJECTINIT){
  225. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  226. DBG_BREAK();
  227. return FALSE;
  228. }
  229. if((st = m_pIStreamHAL->SetDataDirection(type)) != HAL_SUCCESS){
  230. _RPTF0(_CRT_WARN, "CAN'T SET DATADIRECTION \n");
  231. DBG_PRINTF(("CLASSLIB:CBaseStream::SetDataDirection:CAN'T SET DATADIRECTION\n"));
  232. DBG_BREAK();
  233. return FALSE;
  234. }
  235. return TRUE;
  236. }
  237. // Get transfer typr & direction 98.03.31 H.Yagi
  238. BOOL CBaseStream::GetDataDirection(DirectionType *ptype)
  239. {
  240. HALRESULT st;
  241. //�����ݒ肪�I�����ĂȂ�
  242. if(ISENDSTREAMOBJECTINIT){
  243. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  244. DBG_BREAK();
  245. return FALSE;
  246. }
  247. if((st = m_pIStreamHAL->GetDataDirection(ptype)) != HAL_SUCCESS){
  248. _RPTF0(_CRT_WARN, "CAN'T GET DATADIRECTION \n");
  249. DBG_PRINTF(("CLASSLIB:CBaseStream::GetDataDirection:CAN'T GET DATADIRECTION\n"));
  250. DBG_BREAK();
  251. return FALSE;
  252. }
  253. return TRUE;
  254. }
  255. //�R�s�[�v���e�N�g�����̏�����
  256. BOOL CVideoStream::CppInit()
  257. {
  258. HALRESULT st;
  259. //�����ݒ肪�I�����ĂȂ�
  260. if(ISENDSTREAMOBJECTINIT){
  261. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  262. DBG_BREAK();
  263. return FALSE;
  264. }
  265. if((st = m_pIStreamHAL->CPPInit()) != HAL_SUCCESS){
  266. _RPTF0(_CRT_WARN, "CAN'T Initialize CPP\n");
  267. DBG_BREAK();
  268. return FALSE;
  269. }
  270. return TRUE;
  271. }
  272. //�`�������W�L�[�̐ݒ�
  273. BOOL CVideoStream::SetChlgKey(UCHAR *pDecoderChallenge)
  274. {
  275. HALRESULT st;
  276. //�����ݒ肪�I�����ĂȂ�
  277. if(ISENDSTREAMOBJECTINIT){
  278. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  279. DBG_BREAK();
  280. return FALSE;
  281. }
  282. if((st = m_pIStreamHAL->SetDecoderChallenge(pDecoderChallenge)) != HAL_SUCCESS){
  283. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERCHALLENGE \n");
  284. DBG_BREAK();
  285. return FALSE;
  286. }
  287. return TRUE;
  288. }
  289. //�`�������W�L�[�̎擾
  290. //UCHAR *CVideoStream::GetChlgKey()
  291. BOOL CVideoStream::GetChlgKey( UCHAR *ptr ) // 98.03.31 H.Yagi
  292. {
  293. HALRESULT st;
  294. //�����ݒ肪�I�����ĂȂ�
  295. if(ISENDSTREAMOBJECTINIT){
  296. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  297. DBG_BREAK();
  298. return FALSE;
  299. }
  300. if((st = m_pIStreamHAL->CPPInit()) != HAL_SUCCESS){
  301. _RPTF0(_CRT_WARN, "CAN'T Initialize CPP\n");
  302. DBG_BREAK();
  303. return FALSE;
  304. }
  305. if((st = m_pIStreamHAL->GetDriveChallenge(ptr)) != HAL_SUCCESS){
  306. _RPTF0(_CRT_WARN, "CAN'T GET DRIVERCHALLENGE \n");
  307. DBG_BREAK();
  308. return FALSE;
  309. }
  310. return TRUE;
  311. }
  312. //DVD�L�[�̐ݒ�
  313. BOOL CVideoStream::SetDVDKey1(UCHAR *pDriveReponse)
  314. {
  315. HALRESULT st;
  316. //�����ݒ肪�I�����ĂȂ�
  317. if(ISENDSTREAMOBJECTINIT){
  318. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  319. DBG_BREAK();
  320. return FALSE;
  321. }
  322. if((st = m_pIStreamHAL->SetDriveResponse(pDriveReponse)) != HAL_SUCCESS){
  323. _RPTF0(_CRT_WARN, "CAN'T SET DRIVERRESPONSE \n");
  324. DBG_BREAK();
  325. return FALSE;
  326. }
  327. return TRUE;
  328. }
  329. //DVD�L�[�̎擾
  330. //UCHAR *CVideoStream::GetDVDKey2()
  331. BOOL CVideoStream::GetDVDKey2(UCHAR *ptr) // 98.03.31 H.Yagi
  332. {
  333. HALRESULT st;
  334. //�����ݒ肪�I�����ĂȂ�
  335. if(ISENDSTREAMOBJECTINIT){
  336. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  337. DBG_BREAK();
  338. return FALSE;
  339. }
  340. if((st = m_pIStreamHAL->GetDecoderResponse(ptr)) != HAL_SUCCESS){
  341. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERRESPONSE \n");
  342. DBG_BREAK();
  343. return FALSE;
  344. }
  345. return TRUE;
  346. }
  347. //�^�C�g���L�[�̐ݒ�
  348. BOOL CVideoStream::SetTitleKey(UCHAR *pTitleKey)
  349. {
  350. HALRESULT st;
  351. //�����ݒ肪�I�����ĂȂ�
  352. if(ISENDSTREAMOBJECTINIT){
  353. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  354. DBG_BREAK();
  355. return FALSE;
  356. }
  357. if((st = m_pIStreamHAL->SetTitleKey(pTitleKey)) != HAL_SUCCESS){
  358. _RPTF0(_CRT_WARN, "CAN'T SET TITLEKEY \n");
  359. DBG_BREAK();
  360. return FALSE;
  361. }
  362. return TRUE;
  363. }
  364. //�f�B�X�N�L�[�̐ݒ�
  365. BOOL CVideoStream::SetDiscKey(UCHAR *pDiscKey)
  366. {
  367. HALRESULT st;
  368. //�����ݒ肪�I�����ĂȂ�
  369. if(ISENDSTREAMOBJECTINIT){
  370. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  371. DBG_BREAK();
  372. return FALSE;
  373. }
  374. if((st = m_pIStreamHAL->SetDiskKey(pDiscKey)) != HAL_SUCCESS){
  375. _RPTF0(_CRT_WARN, "CAN'T SET DISCKEY \n");
  376. DBG_BREAK();
  377. return FALSE;
  378. }
  379. return TRUE;
  380. }
  381. //�r�f�I�Ɋւ����v���p�e�B���擾
  382. BOOL CVideoStream::GetVideoProperty(VIDEOPROPTYPE PropertyType, PVOID pProperty)
  383. {
  384. HALRESULT st;
  385. // PVOID pProperty;
  386. //�����ݒ肪�I�����ĂȂ�
  387. if(ISENDSTREAMOBJECTINIT){
  388. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  389. DBG_BREAK();
  390. return FALSE;
  391. }
  392. if((st = m_pIHAL->GetVideoProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  393. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  394. DBG_BREAK();
  395. return FALSE;
  396. }
  397. return TRUE;
  398. }
  399. //�r�f�I�Ɋւ����v���p�e�B�̐ݒ�
  400. BOOL CVideoStream::SetVideoProperty(VIDEOPROPTYPE PropertyType, PVOID pProperty)
  401. {
  402. HALRESULT st;
  403. //�����ݒ肪�I�����ĂȂ�
  404. if(ISENDSTREAMOBJECTINIT){
  405. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  406. DBG_BREAK();
  407. return FALSE;
  408. }
  409. if((st = m_pIHAL->SetVideoProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  410. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  411. DBG_BREAK();
  412. return FALSE;
  413. }
  414. return TRUE;
  415. }
  416. //�R�s�[�v���e�N�g�����̏�����
  417. BOOL CAudioStream::CppInit()
  418. {
  419. HALRESULT st;
  420. //�����ݒ肪�I�����ĂȂ�
  421. if(ISENDSTREAMOBJECTINIT){
  422. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  423. DBG_BREAK();
  424. return FALSE;
  425. }
  426. if((st = m_pIStreamHAL->CPPInit()) != HAL_SUCCESS){
  427. _RPTF0(_CRT_WARN, "CAN'T Initialize CPP\n");
  428. DBG_BREAK();
  429. return FALSE;
  430. }
  431. return TRUE;
  432. }
  433. //�`�������W�L�[�̐ݒ�
  434. BOOL CAudioStream::SetChlgKey(UCHAR *pDecoderChallenge)
  435. {
  436. HALRESULT st;
  437. //�����ݒ肪�I�����ĂȂ�
  438. if(ISENDSTREAMOBJECTINIT){
  439. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  440. DBG_BREAK();
  441. return FALSE;
  442. }
  443. if((st = m_pIStreamHAL->SetDecoderChallenge(pDecoderChallenge)) != HAL_SUCCESS){
  444. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERCHALLENGE \n");
  445. DBG_BREAK();
  446. return FALSE;
  447. }
  448. return TRUE;
  449. }
  450. //�`�������W�L�[�̎擾
  451. //UCHAR *CAudioStream::GetChlgKey()
  452. BOOL CAudioStream::GetChlgKey(UCHAR *ptr)
  453. {
  454. HALRESULT st;
  455. //�����ݒ肪�I�����ĂȂ�
  456. if(ISENDSTREAMOBJECTINIT){
  457. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  458. DBG_BREAK();
  459. return FALSE;
  460. }
  461. if((st = m_pIStreamHAL->GetDriveChallenge(ptr)) != HAL_SUCCESS){
  462. _RPTF0(_CRT_WARN, "CAN'T GET DRIVERCHALLENGE \n");
  463. DBG_BREAK();
  464. return FALSE;
  465. }
  466. return TRUE;
  467. }
  468. //DVD�L�[�̐ݒ�
  469. BOOL CAudioStream::SetDVDKey1(UCHAR *pDriveResponse)
  470. {
  471. HALRESULT st;
  472. //�����ݒ肪�I�����ĂȂ�
  473. if(ISENDSTREAMOBJECTINIT){
  474. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  475. DBG_BREAK();
  476. return FALSE;
  477. }
  478. if((st = m_pIStreamHAL->SetDriveResponse(pDriveResponse)) != HAL_SUCCESS){
  479. _RPTF0(_CRT_WARN, "CAN'T SET DRIVERRESPONSE \n");
  480. DBG_BREAK();
  481. return FALSE;
  482. }
  483. return TRUE;
  484. }
  485. //DVD�L�[�̎擾
  486. //UCHAR *CAudioStream::GetDVDKey2()
  487. BOOL CAudioStream::GetDVDKey2(UCHAR *ptr)
  488. {
  489. HALRESULT st;
  490. //�����ݒ肪�I�����ĂȂ�
  491. if(ISENDSTREAMOBJECTINIT){
  492. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  493. DBG_BREAK();
  494. return FALSE;
  495. }
  496. if((st = m_pIStreamHAL->GetDecoderResponse(ptr)) != HAL_SUCCESS){
  497. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERRESPONSE \n");
  498. DBG_BREAK();
  499. return FALSE;
  500. }
  501. return TRUE;
  502. }
  503. //�^�C�g���L�[�̐ݒ�
  504. BOOL CAudioStream::SetTitleKey(UCHAR *pTitleKey)
  505. {
  506. HALRESULT st;
  507. //�����ݒ肪�I�����ĂȂ�
  508. if(ISENDSTREAMOBJECTINIT){
  509. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  510. DBG_BREAK();
  511. return FALSE;
  512. }
  513. if((st = m_pIStreamHAL->SetTitleKey(pTitleKey)) != HAL_SUCCESS){
  514. _RPTF0(_CRT_WARN, "CAN'T SET TITLEKEY \n");
  515. DBG_BREAK();
  516. return FALSE;
  517. }
  518. return TRUE;
  519. }
  520. //�f�B�X�N�L�[�̐ݒ�
  521. BOOL CAudioStream::SetDiscKey(UCHAR *pDiscKey)
  522. {
  523. HALRESULT st;
  524. //�����ݒ肪�I�����ĂȂ�
  525. if(ISENDSTREAMOBJECTINIT){
  526. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  527. DBG_BREAK();
  528. return FALSE;
  529. }
  530. if((st = m_pIStreamHAL->SetDiskKey(pDiscKey)) != HAL_SUCCESS){
  531. _RPTF0(_CRT_WARN, "CAN'T SET DISCKEY \n");
  532. DBG_BREAK();
  533. return FALSE;
  534. }
  535. return TRUE;
  536. }
  537. //�I�[�f�B�I�ւ����v���p�e�B���擾
  538. BOOL CAudioStream::GetAudioProperty(AUDIOPROPTYPE PropertyType, PVOID pProperty)
  539. {
  540. HALRESULT st;
  541. // PVOID pProperty;
  542. //�����ݒ肪�I�����ĂȂ�
  543. if(ISENDSTREAMOBJECTINIT){
  544. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  545. DBG_BREAK();
  546. return FALSE;
  547. }
  548. if((st = m_pIHAL->GetAudioProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  549. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  550. DBG_BREAK();
  551. return FALSE;
  552. }
  553. return TRUE;
  554. }
  555. //�I�[�f�B�I�Ɋւ����v���p�e�B�̐ݒ�
  556. BOOL CAudioStream::SetAudioProperty(AUDIOPROPTYPE PropertyType, PVOID pProperty)
  557. {
  558. HALRESULT st;
  559. //�����ݒ肪�I�����ĂȂ�
  560. if(ISENDSTREAMOBJECTINIT){
  561. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  562. DBG_BREAK();
  563. return FALSE;
  564. }
  565. if((st = m_pIHAL->SetAudioProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  566. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  567. DBG_BREAK();
  568. return FALSE;
  569. }
  570. return TRUE;
  571. }
  572. //�R�s�[�v���e�N�g�����̏�����
  573. BOOL CSubpicStream::CppInit()
  574. {
  575. HALRESULT st;
  576. //�����ݒ肪�I�����ĂȂ�
  577. if(ISENDSTREAMOBJECTINIT){
  578. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  579. DBG_BREAK();
  580. return FALSE;
  581. }
  582. if((st = m_pIStreamHAL->CPPInit()) != HAL_SUCCESS){
  583. _RPTF0(_CRT_WARN, "CAN'T Initialize CPP\n");
  584. DBG_BREAK();
  585. return FALSE;
  586. }
  587. return TRUE;
  588. }
  589. //�`�������W�L�[�̐ݒ�
  590. BOOL CSubpicStream::SetChlgKey(UCHAR *pDecoderChallenge)
  591. {
  592. HALRESULT st;
  593. //�����ݒ肪�I�����ĂȂ�
  594. if(ISENDSTREAMOBJECTINIT){
  595. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  596. DBG_BREAK();
  597. return FALSE;
  598. }
  599. if((st = m_pIStreamHAL->SetDecoderChallenge(pDecoderChallenge)) != HAL_SUCCESS){
  600. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERCHALLENGE \n");
  601. DBG_BREAK();
  602. return FALSE;
  603. }
  604. return TRUE;
  605. }
  606. //�`�������W�L�[�̎擾
  607. //UCHAR *CSubpicStream::GetChlgKey()
  608. BOOL CSubpicStream::GetChlgKey(UCHAR *ptr) // 98.03.31 H.Yagi
  609. {
  610. HALRESULT st;
  611. //�����ݒ肪�I�����ĂȂ�
  612. if(ISENDSTREAMOBJECTINIT){
  613. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  614. DBG_BREAK();
  615. return FALSE;
  616. }
  617. if((st = m_pIStreamHAL->GetDriveChallenge(ptr)) != HAL_SUCCESS){
  618. _RPTF0(_CRT_WARN, "CAN'T GET DRIVERCHALLENGE \n");
  619. DBG_BREAK();
  620. return FALSE;
  621. }
  622. return TRUE;
  623. }
  624. //DVD�L�[�̐ݒ�
  625. BOOL CSubpicStream::SetDVDKey1(UCHAR *pDriveResponse)
  626. {
  627. HALRESULT st;
  628. //�����ݒ肪�I�����ĂȂ�
  629. if(ISENDSTREAMOBJECTINIT){
  630. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  631. DBG_BREAK();
  632. return FALSE;
  633. }
  634. if((st = m_pIStreamHAL->SetDriveResponse(pDriveResponse)) != HAL_SUCCESS){
  635. _RPTF0(_CRT_WARN, "CAN'T SET DRIVERRESPONSE \n");
  636. DBG_BREAK();
  637. return FALSE;
  638. }
  639. return TRUE;
  640. }
  641. //DVD�L�[�̎擾
  642. //UCHAR *CSubpicStream::GetDVDKey2()
  643. BOOL CSubpicStream::GetDVDKey2(UCHAR *ptr) // 98.03.31 H.Yagi
  644. {
  645. HALRESULT st;
  646. //�����ݒ肪�I�����ĂȂ�
  647. if(ISENDSTREAMOBJECTINIT){
  648. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  649. DBG_BREAK();
  650. return FALSE;
  651. }
  652. if((st = m_pIStreamHAL->GetDecoderResponse(ptr)) != HAL_SUCCESS){
  653. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERRESPONSE \n");
  654. DBG_BREAK();
  655. return FALSE;
  656. }
  657. return TRUE;
  658. }
  659. //�^�C�g���L�[�̐ݒ�
  660. BOOL CSubpicStream::SetTitleKey(UCHAR *pTitleKey)
  661. {
  662. HALRESULT st;
  663. //�����ݒ肪�I�����ĂȂ�
  664. if(ISENDSTREAMOBJECTINIT){
  665. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  666. DBG_BREAK();
  667. return FALSE;
  668. }
  669. if((st = m_pIStreamHAL->SetTitleKey(pTitleKey)) != HAL_SUCCESS){
  670. _RPTF0(_CRT_WARN, "CAN'T SET TITLEKEY \n");
  671. DBG_BREAK();
  672. return FALSE;
  673. }
  674. return TRUE;
  675. }
  676. //�f�B�X�N�L�[�̐ݒ�
  677. BOOL CSubpicStream::SetDiscKey(UCHAR *pDiscKey)
  678. {
  679. HALRESULT st;
  680. //�����ݒ肪�I�����ĂȂ�
  681. if(ISENDSTREAMOBJECTINIT){
  682. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  683. DBG_BREAK();
  684. return FALSE;
  685. }
  686. if((st = m_pIStreamHAL->SetDiskKey(pDiscKey)) != HAL_SUCCESS){
  687. _RPTF0(_CRT_WARN, "CAN'T SET DISCKEY \n");
  688. DBG_BREAK();
  689. return FALSE;
  690. }
  691. return TRUE;
  692. }
  693. //�T�u�s�N�`���ւ����v���p�e�B���擾
  694. BOOL CSubpicStream::GetSubpicProperty(SUBPICPROPTYPE PropertyType, PVOID pProperty)
  695. {
  696. HALRESULT st;
  697. // PVOID pProperty;
  698. //�����ݒ肪�I�����ĂȂ�
  699. if(ISENDSTREAMOBJECTINIT){
  700. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  701. DBG_BREAK();
  702. return FALSE;
  703. }
  704. if((st = m_pIHAL->GetSubpicProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  705. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  706. DBG_BREAK();
  707. return FALSE;
  708. }
  709. return TRUE;
  710. }
  711. //�T�u�s�N�`���Ɋւ����v���p�e�B�̐ݒ�
  712. BOOL CSubpicStream::SetSubpicProperty(SUBPICPROPTYPE PropertyType, PVOID pProperty)
  713. {
  714. HALRESULT st;
  715. //�����ݒ肪�I�����ĂȂ�
  716. if(ISENDSTREAMOBJECTINIT){
  717. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  718. DBG_BREAK();
  719. return FALSE;
  720. }
  721. if((st = m_pIHAL->SetSubpicProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  722. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  723. DBG_BREAK();
  724. return FALSE;
  725. }
  726. return TRUE;
  727. }
  728. //�R�s�[�v���e�N�g�����̏�����
  729. BOOL CVideoCDStream::CppInit()
  730. {
  731. HALRESULT st;
  732. //�����ݒ肪�I�����ĂȂ�
  733. if(ISENDSTREAMOBJECTINIT){
  734. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  735. DBG_BREAK();
  736. return FALSE;
  737. }
  738. if((st = m_pIStreamHAL->CPPInit()) != HAL_SUCCESS){
  739. _RPTF0(_CRT_WARN, "CAN'T Initialize CPP\n");
  740. DBG_BREAK();
  741. return FALSE;
  742. }
  743. return TRUE;
  744. }
  745. //�`�������W�L�[�̐ݒ�
  746. BOOL CVideoCDStream::SetChlgKey(UCHAR *pDecoderChallenge)
  747. {
  748. HALRESULT st;
  749. //�����ݒ肪�I�����ĂȂ�
  750. if(ISENDSTREAMOBJECTINIT){
  751. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  752. DBG_BREAK();
  753. return FALSE;
  754. }
  755. if((st = m_pIStreamHAL->SetDecoderChallenge(pDecoderChallenge)) != HAL_SUCCESS){
  756. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERCHALLENGE \n");
  757. DBG_BREAK();
  758. return FALSE;
  759. }
  760. return TRUE;
  761. }
  762. //�`�������W�L�[�̎擾
  763. //UCHAR *CVideoCDStream::GetChlgKey()
  764. BOOL CVideoCDStream::GetChlgKey(UCHAR *ptr) // 98.03.31 H.Yagi
  765. {
  766. HALRESULT st;
  767. //�����ݒ肪�I�����ĂȂ�
  768. if(ISENDSTREAMOBJECTINIT){
  769. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  770. DBG_BREAK();
  771. return FALSE;
  772. }
  773. if((st = m_pIStreamHAL->GetDriveChallenge(ptr)) != HAL_SUCCESS){
  774. _RPTF0(_CRT_WARN, "CAN'T GET DRIVERCHALLENGE \n");
  775. DBG_BREAK();
  776. return FALSE;
  777. }
  778. return TRUE;
  779. }
  780. //DVD�L�[�̐ݒ�
  781. BOOL CVideoCDStream::SetDVDKey1(UCHAR *pDriveResponse)
  782. {
  783. HALRESULT st;
  784. //�����ݒ肪�I�����ĂȂ�
  785. if(ISENDSTREAMOBJECTINIT){
  786. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  787. DBG_BREAK();
  788. return FALSE;
  789. }
  790. if((st = m_pIStreamHAL->SetDriveResponse(pDriveResponse)) != HAL_SUCCESS){
  791. _RPTF0(_CRT_WARN, "CAN'T SET DRIVERRESPONSE \n");
  792. DBG_BREAK();
  793. return FALSE;
  794. }
  795. return TRUE;
  796. }
  797. //DVD�L�[�̎擾
  798. //UCHAR *CVideoCDStream::GetDVDKey2()
  799. BOOL CVideoCDStream::GetDVDKey2(UCHAR *ptr)
  800. {
  801. HALRESULT st;
  802. //�����ݒ肪�I�����ĂȂ�
  803. if(ISENDSTREAMOBJECTINIT){
  804. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  805. DBG_BREAK();
  806. return FALSE;
  807. }
  808. if((st = m_pIStreamHAL->GetDecoderResponse(ptr)) != HAL_SUCCESS){
  809. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERRESPONSE \n");
  810. DBG_BREAK();
  811. return FALSE;
  812. }
  813. return TRUE;
  814. }
  815. //�^�C�g���L�[�̐ݒ�
  816. BOOL CVideoCDStream::SetTitleKey(UCHAR *pTitleKey)
  817. {
  818. HALRESULT st;
  819. //�����ݒ肪�I�����ĂȂ�
  820. if(ISENDSTREAMOBJECTINIT){
  821. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  822. DBG_BREAK();
  823. return FALSE;
  824. }
  825. if((st = m_pIStreamHAL->SetTitleKey(pTitleKey)) != HAL_SUCCESS){
  826. _RPTF0(_CRT_WARN, "CAN'T SET TITLEKEY \n");
  827. DBG_BREAK();
  828. return FALSE;
  829. }
  830. return TRUE;
  831. }
  832. //�f�B�X�N�L�[�̐ݒ�
  833. BOOL CVideoCDStream::SetDiscKey(UCHAR *pDiscKey)
  834. {
  835. HALRESULT st;
  836. //�����ݒ肪�I�����ĂȂ�
  837. if(ISENDSTREAMOBJECTINIT){
  838. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  839. DBG_BREAK();
  840. return FALSE;
  841. }
  842. if((st = m_pIStreamHAL->SetDiskKey(pDiscKey)) != HAL_SUCCESS){
  843. _RPTF0(_CRT_WARN, "CAN'T SET DISCKEY \n");
  844. DBG_BREAK();
  845. return FALSE;
  846. }
  847. return TRUE;
  848. }
  849. //�r�f�I�Ɋւ����v���p�e�B���擾
  850. BOOL CVideoCDStream::GetVideoProperty(VIDEOPROPTYPE PropertyType, PVOID pProperty)
  851. {
  852. HALRESULT st;
  853. // PVOID pProperty;
  854. //�����ݒ肪�I�����ĂȂ�
  855. if(ISENDSTREAMOBJECTINIT){
  856. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  857. DBG_BREAK();
  858. return FALSE;
  859. }
  860. if((st = m_pIHAL->GetVideoProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  861. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  862. DBG_BREAK();
  863. return FALSE;
  864. }
  865. return TRUE;
  866. }
  867. //�r�f�I�Ɋւ����v���p�e�B�̐ݒ�
  868. BOOL CVideoCDStream::SetVideoProperty(VIDEOPROPTYPE PropertyType, PVOID pProperty)
  869. {
  870. HALRESULT st;
  871. //�����ݒ肪�I�����ĂȂ�
  872. if(ISENDSTREAMOBJECTINIT){
  873. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  874. DBG_BREAK();
  875. return FALSE;
  876. }
  877. if((st = m_pIHAL->SetVideoProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  878. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  879. DBG_BREAK();
  880. return FALSE;
  881. }
  882. return TRUE;
  883. }
  884. //�I�[�f�B�I�ւ����v���p�e�B���擾
  885. BOOL CVideoCDStream::GetAudioProperty(AUDIOPROPTYPE PropertyType, PVOID pProperty)
  886. {
  887. HALRESULT st;
  888. // PVOID pProperty;
  889. //�����ݒ肪�I�����ĂȂ�
  890. if(ISENDSTREAMOBJECTINIT){
  891. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  892. DBG_BREAK();
  893. return FALSE;
  894. }
  895. if((st = m_pIHAL->GetAudioProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  896. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  897. DBG_BREAK();
  898. return FALSE;
  899. }
  900. return TRUE;
  901. }
  902. //�I�[�f�B�I�Ɋւ����v���p�e�B�̐ݒ�
  903. BOOL CVideoCDStream::SetAudioProperty(AUDIOPROPTYPE PropertyType, PVOID pProperty)
  904. {
  905. HALRESULT st;
  906. //�����ݒ肪�I�����ĂȂ�
  907. if(ISENDSTREAMOBJECTINIT){
  908. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  909. DBG_BREAK();
  910. return FALSE;
  911. }
  912. if((st = m_pIHAL->SetAudioProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  913. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  914. DBG_BREAK();
  915. return FALSE;
  916. }
  917. return TRUE;
  918. }
  919. //�R�s�[�v���e�N�g�����̏�����
  920. BOOL CDVDStream::CppInit()
  921. {
  922. HALRESULT st;
  923. //�����ݒ肪�I�����ĂȂ�
  924. if(ISENDSTREAMOBJECTINIT){
  925. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  926. DBG_BREAK();
  927. return FALSE;
  928. }
  929. if((st = m_pIStreamHAL->CPPInit()) != HAL_SUCCESS){
  930. _RPTF0(_CRT_WARN, "CAN'T Initialize CPP\n");
  931. DBG_BREAK();
  932. return FALSE;
  933. }
  934. return TRUE;
  935. }
  936. //�`�������W�L�[�̐ݒ�
  937. BOOL CDVDStream::SetChlgKey(UCHAR *pDecoderChallenge)
  938. {
  939. HALRESULT st;
  940. //�����ݒ肪�I�����ĂȂ�
  941. if(ISENDSTREAMOBJECTINIT){
  942. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  943. DBG_PRINTF(("CLASSLIB:CDVDStream::SetChlgKey:NOT INITILIZE CMPEGBoard \n"));
  944. DBG_BREAK();
  945. return FALSE;
  946. }
  947. if((st = m_pIStreamHAL->SetDecoderChallenge(pDecoderChallenge)) != HAL_SUCCESS){
  948. _RPTF0(_CRT_WARN, "CAN'T SET DECORDERCHALLENGE \n");
  949. DBG_PRINTF(("CLASSLIB:CDVDStream::SetChlgKey:CAN'T SET DECORDERCHALLENGE \n"));
  950. DBG_BREAK();
  951. return FALSE;
  952. }
  953. DBG_PRINTF(("CLASSLIB:CDVDStream::SetChlgKey:SUCCESS SetDecoderChallenge\n"));
  954. return TRUE;
  955. }
  956. //�`�������W�L�[�̎擾
  957. //UCHAR CDVDStream::GetChlgKey()
  958. BOOL CDVDStream::GetChlgKey(UCHAR *ptr) // 98.03.31 H.Yagi
  959. {
  960. HALRESULT st;
  961. //�����ݒ肪�I�����ĂȂ�
  962. if(ISENDSTREAMOBJECTINIT){
  963. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  964. DBG_PRINTF(("CLASSLIB:CDVDStream::GetChlgKey:NOT INITILIZE CMPEGBoard \n"));
  965. DBG_BREAK();
  966. return FALSE;
  967. }
  968. if((st = m_pIStreamHAL->GetDriveChallenge(ptr)) != HAL_SUCCESS){
  969. _RPTF0(_CRT_WARN, "CAN'T GET DRIVERCHALLENGE \n");
  970. DBG_PRINTF(("CLASSLIB:CDVDStream::GetChlgKey:CAN'T GET DRIVERCHALLENGE \n"));
  971. DBG_BREAK();
  972. return FALSE;
  973. }
  974. DBG_PRINTF(("CLASSLIB:CDVDStream::GetChlgKey:SUCCESS GetDriveChallenge \n"));
  975. return TRUE;
  976. }
  977. //DVD�L�[�̐ݒ�
  978. BOOL CDVDStream::SetDVDKey1(UCHAR *pDriveResponse)
  979. {
  980. HALRESULT st;
  981. //�����ݒ肪�I�����ĂȂ�
  982. if(ISENDSTREAMOBJECTINIT){
  983. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  984. DBG_PRINTF(("CLASSLIB:CDVDStream::SetDVDKey1:NOT INITILIZE CMPEGBoard \n"));
  985. DBG_BREAK();
  986. return FALSE;
  987. }
  988. if((st = m_pIStreamHAL->SetDriveResponse(pDriveResponse)) != HAL_SUCCESS){
  989. _RPTF0(_CRT_WARN, "CAN'T SET DRIVERRESPONSE \n");
  990. DBG_PRINTF(("CLASSLIB:CDVDStream::SetDVDKey1:CAN'T SET DRIVERRESPONSE \n"));
  991. DBG_BREAK();
  992. return FALSE;
  993. }
  994. DBG_PRINTF(("CLASSLIB:CDVDStream::GetChlgKey:SUCCESS SetDriveResponse \n"));
  995. return TRUE;
  996. }
  997. //DVD�L�[�̎擾
  998. //UCHAR *CDVDStream::GetDVDKey2()
  999. BOOL CDVDStream::GetDVDKey2(UCHAR *ptr)
  1000. {
  1001. HALRESULT st;
  1002. //�����ݒ肪�I�����ĂȂ�
  1003. if(ISENDSTREAMOBJECTINIT){
  1004. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1005. DBG_PRINTF(("CLASSLIB:CDVDStream::GetDVDKey2:NOT INITILIZE CMPEGBoard \n"));
  1006. DBG_BREAK();
  1007. return FALSE;
  1008. }
  1009. if((st = m_pIStreamHAL->GetDecoderResponse(ptr)) != HAL_SUCCESS){
  1010. _RPTF0(_CRT_WARN, "CAN'T GET DECORDERRESPONSE \n");
  1011. DBG_PRINTF(("CLASSLIB:CDVDStream::GetDVDKey2:CAN'T GET DECORDERRESPONSE \n"));
  1012. DBG_BREAK();
  1013. return FALSE;
  1014. }
  1015. DBG_PRINTF(("CLASSLIB:CDVDStream::GetChlgKey:SUCCESS GetDecoderResponse \n"));
  1016. return TRUE;
  1017. }
  1018. //�^�C�g���L�[�̐ݒ�
  1019. BOOL CDVDStream::SetTitleKey(UCHAR *pTitleKey)
  1020. {
  1021. HALRESULT st;
  1022. //�����ݒ肪�I�����ĂȂ�
  1023. if(ISENDSTREAMOBJECTINIT){
  1024. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1025. DBG_PRINTF(("CLASSLIB:CDVDStream::SetTitleKey:NOT INITILIZE CMPEGBoard \n"));
  1026. DBG_BREAK();
  1027. return FALSE;
  1028. }
  1029. if((st = m_pIStreamHAL->SetTitleKey(pTitleKey)) != HAL_SUCCESS){
  1030. _RPTF0(_CRT_WARN, "CAN'T SET TITLEKEY \n");
  1031. DBG_PRINTF(("CLASSLIB:CDVDStream::SetTitleKey:CAN'T SET TITLEKEY \n"));
  1032. DBG_BREAK();
  1033. return FALSE;
  1034. }
  1035. DBG_PRINTF(("CLASSLIB:CDVDStream::SetTitleKey:SUCCESS SetTitleKey\n"));
  1036. return TRUE;
  1037. }
  1038. //�f�B�X�N�L�[�̐ݒ�
  1039. BOOL CDVDStream::SetDiscKey(UCHAR *pDiscKey)
  1040. {
  1041. HALRESULT st;
  1042. //�����ݒ肪�I�����ĂȂ�
  1043. if(ISENDSTREAMOBJECTINIT){
  1044. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1045. DBG_PRINTF(("CLASSLIB:CDVDStream::SetDiscKey:NOT INITILIZE CMPEGBoard \n"));
  1046. DBG_BREAK();
  1047. return FALSE;
  1048. }
  1049. if((st = m_pIStreamHAL->SetDiskKey(pDiscKey)) != HAL_SUCCESS){
  1050. _RPTF0(_CRT_WARN, "CAN'T SET DISCKEY \n");
  1051. DBG_PRINTF(("CLASSLIB:CDVDStream::SetDiskKey:CAN'T SET DISCKEY \n"));
  1052. DBG_BREAK();
  1053. return FALSE;
  1054. }
  1055. DBG_PRINTF(("CLASSLIB:CDVDStream::SetDiscKey:SUCCESS SetDiskKey\n"));
  1056. return TRUE;
  1057. }
  1058. //�r�f�I�Ɋւ����v���p�e�B���擾
  1059. BOOL CDVDStream::GetVideoProperty(VIDEOPROPTYPE PropertyType, PVOID pProperty)
  1060. {
  1061. HALRESULT st;
  1062. // PVOID pProperty;
  1063. //�����ݒ肪�I�����ĂȂ�
  1064. if(ISENDSTREAMOBJECTINIT){
  1065. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1066. DBG_PRINTF(("CLASSLIB:CDVDStream::GetVideoProperty:NOT INITIALIZE CDVDSTREAM \n"));
  1067. DBG_BREAK();
  1068. return FALSE;
  1069. }
  1070. if((st = m_pIHAL->GetVideoProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  1071. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1072. DBG_PRINTF(("CLASSLIB:CDVDStream::GetVideoProperty:CAN'T GET VIDEOPROPERTY \n"));
  1073. DBG_BREAK();
  1074. return FALSE;
  1075. }
  1076. DBG_PRINTF(("CLASSLIB:SUCCESS GETVIDEOPROPERTY\n"));
  1077. return TRUE;
  1078. }
  1079. //�r�f�I�Ɋւ����v���p�e�B�̐ݒ�
  1080. BOOL CDVDStream::SetVideoProperty(VIDEOPROPTYPE PropertyType, PVOID pProperty)
  1081. {
  1082. HALRESULT st;
  1083. //�����ݒ肪�I�����ĂȂ�
  1084. if(ISENDSTREAMOBJECTINIT){
  1085. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1086. DBG_PRINTF(("CLASSLIB:CDVDStream::SetVideoProperty:NOT INITIALIZE CDVDSTREAM \n"));
  1087. DBG_BREAK();
  1088. return FALSE;
  1089. }
  1090. if((st = m_pIHAL->SetVideoProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  1091. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1092. DBG_PRINTF(("CLASSLIB:CDVDStream::SetVideoProperty:CAN'T SET VIDEOPROPERTY \n"));
  1093. DBG_BREAK();
  1094. return FALSE;
  1095. }
  1096. DBG_PRINTF(("CLASSLIB:SUCCESS SETVIDEOPROPERTY\n"));
  1097. return TRUE;
  1098. }
  1099. //�I�[�f�B�I�ւ����v���p�e�B���擾
  1100. BOOL CDVDStream::GetAudioProperty(AUDIOPROPTYPE PropertyType, PVOID pProperty)
  1101. {
  1102. HALRESULT st;
  1103. // PVOID pProperty;
  1104. //�����ݒ肪�I�����ĂȂ�
  1105. if(ISENDSTREAMOBJECTINIT){
  1106. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1107. DBG_PRINTF(("CLASSLIB:CDVDStream::GetAudioProperty:NOT INITIALIZE CDVDSTREAM \n"));
  1108. DBG_BREAK();
  1109. return FALSE;
  1110. }
  1111. if((st = m_pIHAL->GetAudioProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  1112. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1113. DBG_PRINTF(("CLASSLIB:CDVDStream::GetAudioProperty:CAN'T GET AUDIOPROPERTY \n"));
  1114. DBG_BREAK();
  1115. return FALSE;
  1116. }
  1117. DBG_PRINTF(("CLASSLIB:SUCCESS GETAUDIOPROPERTY\n"));
  1118. return TRUE;
  1119. }
  1120. //�I�[�f�B�I�Ɋւ����v���p�e�B�̐ݒ�
  1121. BOOL CDVDStream::SetAudioProperty(AUDIOPROPTYPE PropertyType, PVOID pProperty)
  1122. {
  1123. HALRESULT st;
  1124. //�����ݒ肪�I�����ĂȂ�
  1125. if(ISENDSTREAMOBJECTINIT){
  1126. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1127. DBG_PRINTF(("CLASSLIB:CDVDStream::SetAudioProperty:NOT INITIALIZE CDVDSTREAM \n"));
  1128. DBG_BREAK();
  1129. return FALSE;
  1130. }
  1131. if((st = m_pIHAL->SetAudioProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  1132. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1133. DBG_PRINTF(("CLASSLIB:CDVDStream::SetAudioProperty:CAN'T SET AUDIOPROPERTY \n"));
  1134. DBG_BREAK();
  1135. return FALSE;
  1136. }
  1137. DBG_PRINTF(("CLASSLIB:SUCCESS SETAUDIOPROPERTY\n"));
  1138. return TRUE;
  1139. }
  1140. //�T�u�s�N�`���ւ����v���p�e�B���擾
  1141. BOOL CDVDStream::GetSubpicProperty(SUBPICPROPTYPE PropertyType, PVOID pProperty)
  1142. {
  1143. HALRESULT st;
  1144. // PVOID pProperty;
  1145. //�����ݒ肪�I�����ĂȂ�
  1146. if(ISENDSTREAMOBJECTINIT){
  1147. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1148. DBG_PRINTF(("CLASSLIB:CDVDStream::GetSubpicProperty:NOT INITIALIZE CDVDSTREAM \n"));
  1149. DBG_BREAK();
  1150. return FALSE;
  1151. }
  1152. if((st = m_pIHAL->GetSubpicProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  1153. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1154. DBG_PRINTF(("CLASSLIB:CDVDStream::GetSubpicProperty:CAN'T GET SUBPICPROPERTY \n"));
  1155. DBG_BREAK();
  1156. return FALSE;
  1157. }
  1158. DBG_PRINTF(("CLASSLIB:SUCCESS GETSUBPICPROPERTY\n"));
  1159. return TRUE;
  1160. }
  1161. //�T�u�s�N�`���Ɋւ����v���p�e�B�̐ݒ�
  1162. BOOL CDVDStream::SetSubpicProperty(SUBPICPROPTYPE PropertyType, PVOID pProperty)
  1163. {
  1164. HALRESULT st;
  1165. //�����ݒ肪�I�����ĂȂ�
  1166. if(ISENDSTREAMOBJECTINIT){
  1167. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1168. DBG_PRINTF(("CLASSLIB:CDVDStream::SetSubpicProperty:NOT INITIALIZE CDVDSTREAM \n"));
  1169. DBG_BREAK();
  1170. return FALSE;
  1171. }
  1172. if((st = m_pIHAL->SetSubpicProperty(PropertyType, pProperty)) != HAL_SUCCESS){
  1173. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1174. DBG_PRINTF(("CLASSLIB:CDVDStream::SetSubpicProperty:CAN'T SET SUBPICPROPERTY \n"));
  1175. DBG_BREAK();
  1176. return FALSE;
  1177. }
  1178. DBG_PRINTF(("CLASSLIB:SUCCESS SETSUBPICPROPERTY\n"));
  1179. return TRUE;
  1180. }
  1181. //Get Property capability 98.04.03 H.Yagi
  1182. BOOL CDVDStream::GetCapability( CAPSTYPE PropType, DWORD *pPropType )
  1183. {
  1184. HALRESULT st;
  1185. //�����ݒ肪�I�����ĂȂ�
  1186. if(ISENDSTREAMOBJECTINIT){
  1187. _RPTF0(_CRT_WARN, "NOT INITILIZE CMPEGBoard \n");
  1188. DBG_PRINTF(("CLASSLIB:CDVDStream::GetCapability:NOT INITIALIZE CDVDSTREAM \n"));
  1189. DBG_BREAK();
  1190. return FALSE;
  1191. }
  1192. if((st = m_pIHAL->GetCapability( PropType, pPropType)) != HAL_SUCCESS){
  1193. _RPTF0(_CRT_WARN, "CAN'T GET PROPERTY \n");
  1194. DBG_PRINTF(("CLASSLIB:CDVDStream::SetSubpicProperty:CAN'T SET SUBPICPROPERTY \n"));
  1195. DBG_BREAK();
  1196. return FALSE;
  1197. }
  1198. DBG_PRINTF(("CLASSLIB:SUCCESS GetCapability\n"));
  1199. return TRUE;
  1200. }
  1201. void CBaseStream::FlushTransferBuffer()
  1202. {
  1203. ((CTransfer *)m_pTransfer)->Flush();
  1204. }