video.c
上传用户:wstnjxml
上传日期:2014-04-03
资源大小:7248k
文件大小:3k
源码类别:

Windows CE

开发平台:

C/C++

  1. /*****************************************************************************
  2.  *
  3.  * This program is free software ; you can redistribute it and/or modify
  4.  * it under the terms of the GNU General Public License as published by
  5.  * the Free Software Foundation; either version 2 of the License, or
  6.  * (at your option) any later version.
  7.  *
  8.  * This program is distributed in the hope that it will be useful,
  9.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11.  * GNU General Public License for more details.
  12.  *
  13.  * You should have received a copy of the GNU General Public License
  14.  * along with this program; if not, write to the Free Software
  15.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  16.  *
  17.  * $Id: video.c 339 2005-11-15 11:22:45Z picard $
  18.  *
  19.  * The Core Pocket Media Player
  20.  * Copyright (c) 2004-2005 Gabor Kovacs
  21.  *
  22.  ****************************************************************************/
  23. #include "common.h"
  24. static const datatable VOutParams[] = 
  25. {
  26. { VOUT_PRIMARY, TYPE_BOOL, DF_SETUP | DF_RDONLY | DF_HIDDEN },
  27. { VOUT_OVERLAY, TYPE_BOOL, DF_SETUP | DF_RDONLY | DF_HIDDEN },
  28. { VOUT_IDCT, TYPE_NODE, DF_SETUP | DF_RDONLY | DF_HIDDEN, IDCT_CLASS },
  29. { VOUT_FX, TYPE_BLITFX, DF_HIDDEN },
  30. { VOUT_WND, TYPE_INT, DF_HIDDEN },
  31. { VOUT_VIEWPORT, TYPE_RECT, DF_HIDDEN },
  32. { VOUT_FULLSCREEN, TYPE_BOOL, DF_HIDDEN },
  33. { VOUT_OUTPUTRECT, TYPE_RECT, DF_HIDDEN | DF_RDONLY },
  34. { VOUT_PLAY, TYPE_BOOL, DF_HIDDEN },
  35. { VOUT_VISIBLE, TYPE_BOOL, DF_HIDDEN },
  36. { VOUT_CLIPPING, TYPE_BOOL, DF_HIDDEN },
  37. { VOUT_COLORKEY, TYPE_RGB, DF_HIDDEN },
  38. { VOUT_ASPECT, TYPE_FRACTION, DF_HIDDEN },
  39. { VOUT_CAPS, TYPE_INT, DF_HIDDEN },
  40. { VOUT_AUTOPREROTATE,TYPE_BOOL, DF_HIDDEN },
  41. { VOUT_UPDATING, TYPE_BOOL, DF_HIDDEN },
  42. DATATABLE_END(VOUT_CLASS)
  43. };
  44. int VOutEnum(void* p, int* No, datadef* Param)
  45. {
  46. if (OutEnum(p,No,Param)==ERR_NONE)
  47. return ERR_NONE;
  48. return NodeEnumTable(No,Param,VOutParams);
  49. }
  50. static int Create(node* p)
  51. {
  52. p->Enum = VOutEnum;
  53. return ERR_NONE;
  54. }
  55. static const nodedef VOut =
  56. {
  57. CF_ABSTRACT,
  58. VOUT_CLASS,
  59. OUT_CLASS,
  60. PRI_DEFAULT,
  61. (nodecreate)Create,
  62. NULL,
  63. };
  64. //--------------------------------------------------------------
  65. typedef struct vbuffer
  66. {
  67. codec Codec;
  68. planes Buf[2];
  69. } vbuffer;
  70. static int CreateBuffer(vbuffer* p)
  71. {
  72. // p->Codec.Node.Set = (nodeset)BufferSet;
  73. // p->Codec.ReSend = 
  74. return ERR_NONE;
  75. }
  76. static const nodedef VBuffer =
  77. {
  78. sizeof(vbuffer),
  79. VBUFFER_ID,
  80. CODEC_CLASS,
  81. PRI_DEFAULT,
  82. (nodecreate)CreateBuffer,
  83. NULL,
  84. };
  85. //--------------------------------------------------------------
  86. void Video_Init()
  87. {
  88. NodeRegisterClass(&VOut);
  89. //NodeRegisterClass(&VBuffer);
  90. }
  91. void Video_Done()
  92. {
  93. NodeUnRegisterClass(VOUT_CLASS);
  94. //NodeUnRegisterClass(VBUFFER_CLASS);
  95. }
  96. bool_t VOutIDCT(int Class)
  97. {
  98. return NodeIsClass(VOUT_IDCT_CLASS(Class),IDCT_CLASS);
  99. }