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

📄 appthreads.c

📁 DM642平台上的H.264源码(可实时运行)
💻 C
字号:
/*
 *  Copyright 2002 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/*
 *  ======== appThreads.c ========
 *
 *  Initialization of all threads, definition of global variables
 *  and buffers
 */
#include <std.h>

/* CSL */
#include <csl.h>
#include <csl_dat.h>

/* RF5 library modules */
#include <chan.h>
#include <icc.h>
#include <scom.h>
#include <utl.h>

#include "appResources.h"   /* application-wide common info */
#include "appThreads.h"     /* thread-wide common info */

/* invididual threads */
#include "process/thrProcess.h"
#include "capture/thrCapture.h"
#include "display/thrDisplay.h"

#include "thrAudioproc.h"   /* definition of thread Audioproc */

Sample bufAudioproc[ FRAMELEN ];

Void H264_init();
/*
 *  ======== appThreadInit ========
 *
 *  Initialize application threads.
 */
Void appThreadInit() 
{
/*
     * Open DAT module to perform DMA transfers.
     * Use low priority transfer requests for all data transfers
     *     submitted by DAT.  2D transfers are allowed.  
     */
  //  DAT_open(DAT_CHAANY, DAT_PRI_LOW, DAT_OPEN_2D);
    
    // initialize RF5 modules
    CHAN_init();
    ICC_init();
    SCOM_init();

    // set up RF5 modules
    CHAN_setup( EXTERNALHEAP, EXTERNALHEAP, EXTERNALHEAP, 
                SCRBUCKETS, NULL, NULL );
                
	// name LOG objects to be used for error/warning/general/debug messages
	UTL_setLogs( &logTrace, &logTrace, &logTrace, &logTrace );
	
    H264_init();
    /* this buffer is used by the Audioproc thread */ 
   thrAudioprocInit();     /* Audioproc thread */
    // initialize tasks
    thrDisplayInit();
    thrDisplayStartup();
    UTL_logDebug( "Video display started" );

    thrCaptureInit();
    thrCaptureStartup();
    UTL_logDebug( "Video capture started" );
    
    thrProcessInit();
    thrProcessStartup();
    UTL_logDebug( "Process thread started" );
    
    thrDecodeInit();
    thrDecodeStartup();
    UTL_logDebug( "Decode thread started" );
       
    // show heap usage, now that all threads are initialized
    UTL_showHeapUsage( INTERNALHEAP );
    UTL_showHeapUsage( EXTERNALHEAP );
}

⌨️ 快捷键说明

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