uint8_t MpegMuxer::close ( void )
{
	ADM_assert(packStream);
	 mux_close((PackStream *)packStream);
	 packStream=NULL;
	 return 1;
	
}
示例#2
0
文件: muxer.c 项目: tohax/Lamobo-D1
int mux_exit( void )
{
	if (hMedia == AK_NULL)
		return 0;

	g_mux_exit = 1;
	printf("mux process close \n");
	//wait capture thread return
	pthread_join(ThredMuxID, NULL);
	ThredMuxID	= thread_zeroid();

	mux_close();
	CloseRecordManager();
	CloseListenSD();
	return 0;
}
示例#3
0
文件: muxer.c 项目: tohax/Lamobo-D1
int mux_write_data(int type, void *pbuf, unsigned long size, unsigned long timestamp, int nIsIFrame)
{
	int ret = 0;

	if (hMedia == AK_NULL || close_flag == 1 || stop_record_flag == 1)
	{

		return 0;
	}
#if 0
	MediaLib_Mux_GetInfo(hMedia, &mux_info);

	if(ReachLimit(mux_info.m_ulFileBytes, mux_info.m_ulTotalTime_ms))
	{
		mux_close();
		times--;
		if( times == 0 )
		{
			printf("Record over \n");
			CloseRecordManager();
			Recordflag = 0;
			return -1;
		}
		else
		{
			mux_open( &mux_input );

		}

	}
#endif
	if (type == 0)
		ret = mux_addAudio(pbuf, size, timestamp);
	else
		ret = mux_addVideo(pbuf, size, timestamp, nIsIFrame);

	return ret;
}
示例#4
0
文件: muxer.c 项目: tohax/Lamobo-D1
int stop_record()
{
	mux_close();
	CloseRecordManager();
	return 0;
}