⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h263_plugin.c

📁 h263解码程序.。。。。。。。。。。。
💻 C
字号:

extern FILE  *video_file;


static int h263_init(video_plugin_t *plugin, void *param)
{
	h263_plugin_t *h263_plugin = (h263_plugin_t *)plugin;
#ifndef USE_MHA_IDCT
#else
#endif
}

static int h263_decode_data(video_plugin_t *plugin)
{
	h263_plugin_t *h263_plugin = (h263_plugin_t *)plugin;
	int used_bytes;
	
#ifdef SINGLE_TEST
	nread = fread(Rdbfr_funway,1,sizeof(packet_header_t),video_file);
#else
	nread = input->read(input,(unsigned int)&Rdbfr,sizeof(packet_header_t));	
		if (nread == 0x00) {printf("%s %d\n",__FILE__,__LINE__);
	 	return -1;}
#endif
	
	packet_header=(packet_header_t *)Rdbfr;
	if(packet_header->header_type == DATA_PACKET)
	{		
		do{
			gob = getheader ();
			if(gob==1)
			{
			if (first)      {          base_source_format = source_format;        initdecoder ();        first = 0;      }      used_bytes=getpicture (&framenum, gob,block_len);      framenum++;
		}
		
		block_len -= used_bytes;
			if (block_len <= 0) break;
			in_buf += used_bytes;
		}while(1);
		
	}
	else if(packet_header->header_type == RESET_PACKET)
	{
		return 0;
	}
	else if(packet_header->header_type == INIT_PACKET)
	{
		return 0;
	}
  else 
   return -1;
}

static int h263_dispose(video_plugin_t *plugin)
{
	h263_plugin_t *h263_plugin = (h263_plugin_t *)plugin;
#ifdef USE_MHA_IDCT
	mha_disable(h263_plugin->mha_handle);
	mha_close(h263_plugin->mha_handle);
#endif
}

static void *h263_open(void * param)
{
	h263_plugin_t *h263_plugin = NULL;
	videodec_plugio_t *plugio=(videodec_plugio_t *)param;
	h263_plugin = (h263_plugin_t *)m_malloc(sizeof(h263_plugin_t));
	if (h263_plugin == NULL)
					return NULL;
	memset(h263_plugin, 0, sizeof(h263_plugin_t));
	h263_plugin->input = plugio->vin;
	h263_plugin->vo = plugio->vo;
	h263_plugin->plugin.init = h263_init;
	h263_plugin->plugin.decode_data = h263_decode_data;
	h263_plugin->plugin.dispose = h263_dispose;
	return (void *)&h263_plugin->plugin;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -