コード例 #1
0
SPRDMP3Decoder::SPRDMP3Decoder(
    const char *name,
    const OMX_CALLBACKTYPE *callbacks,
    OMX_PTR appData,
    OMX_COMPONENTTYPE **component)
    : SprdSimpleOMXComponent(name, callbacks, appData, component),
      mNumChannels(2),
      mSamplingRate(44100),
      mBitRate(0),
      mNextMdBegin(0),
      mPreFilledLen(0),
      mMaxFrameBuf(NULL),
      mLastInTimeUs(0),
      mAnchorTimeUs(0),
      mNumFramesOutput(0),
      mEOSFlag(false),
      mSignalledError(false),
      mLibHandle(NULL),
      mOutputPortSettingsChange(NONE),
      mMP3_ARM_DEC_Construct(NULL),
      mMP3_ARM_DEC_Deconstruct(NULL),
      mMP3_ARM_DEC_InitDecoder(NULL),
      mMP3_ARM_DEC_DecodeFrame(NULL) {
    bool ret = false;
    ret = openDecoder("libomx_mp3dec_sprd.so");
    CHECK_EQ(ret, true);
    initPorts();
    initDecoder();
}
コード例 #2
0
ファイル: SoftAVC.cpp プロジェクト: Alberto97/STE_av
SoftAVC::SoftAVC(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mHandle(NULL),
      mInputBufferCount(0),
      mWidth(320),
      mHeight(240),
      mPictureSize(mWidth * mHeight * 3 / 2),
      mCropLeft(0),
      mCropTop(0),
      mCropWidth(mWidth),
      mCropHeight(mHeight),
      mFirstPicture(NULL),
      mFirstPictureId(-1),
      mPicId(0),
      mHeadersDecoded(false),
      mEOSStatus(INPUT_DATA_AVAILABLE),
      mOutputPortSettingsChange(NONE),
      mSignalledError(false) {
    initPorts();
    CHECK_EQ(initDecoder(), (status_t)OK);
}
コード例 #3
0
/*=========================== MAIN APPLICATION =================================

==============================================================================*/
void main() {
    initPorts();
    while(1){
      getBatteryReading();
      getSolarReading();
    }
}
コード例 #4
0
ファイル: main.c プロジェクト: pacoard/TFG_2016
void main(void)
{
    WDTCTL = WDTPW + WDTHOLD;		// Halt the dog

    // MSP430 USB requires a Vcore setting of at least 2.  2 is high enough
	// for 8MHz MCLK, below.
    PMM_setVCore(PMM_BASE, PMM_CORE_LEVEL_2);

    initPorts();           // Config all the GPIOS for low-power (output low)
    initClocks(8000000);   // Config clocks. MCLK=SMCLK=FLL=8MHz; ACLK=REFO=32kHz
    bcUartInitLaunchpad();   // Init the back-channel UART for F5529 launchpad (9600 bps).
    //bcUartInitPGN();        // Init the back-channel UART for PGN (9600 bps).
    switchMessage = 0;
    __buttonsInit();
    __enable_interrupt();  // Enable interrupts globally

    while(1)
    {
       // Look for rcv'ed command on the backchannel UART. If any, process.
       rxByteCount = bcUartReadCommandTimeout(rx_buf_bcuart);
       if(rxByteCount != -1)
       {
         processReceivedFrame(rx_buf_bcuart, rxByteCount);
       }
       else // Timeout
       {
         // Do other things
//         tx_buf_bcuart[0] = 0xCC;
//         tx_buf_bcuart[1] = 0xDD;
//         bcUartSend(tx_buf_bcuart, 2);
       }
    }
}
コード例 #5
0
ファイル: main.c プロジェクト: gbsoares/nrf24_andretti
/* Main program loop */
int main(void)
{
    
#if 1
    /* Hardware initialization */
    initPorts();
    
    initTimers();
    initRadio();

    rfQueue = xQueueCreate(64, sizeof(uint8_t));  //64 byte queue for RF transfer data

    xTaskCreate(radioTask, (const signed portCHAR *)"Radio", 218, NULL, 2, NULL);
    xTaskCreate(taskHeartbeat2, (const signed portCHAR *)"Blink2", 48, NULL, 1, NULL);


    vTaskStartScheduler();
#else
    //Make PortB.0 an output
    DDRB |= _BV(0);
    while(1)
    {
        // Toggle PortB.0
        PORTB ^= _BV(0);
        _delay_ms(500);
    }    

    
#endif

    return 0;
}
コード例 #6
0
void init() {
   // In case disabled by boot-loader
   __enable_irq();

   initPorts();
   initTimers();
   bdm_interfaceOff();
   initUSB();

#ifdef VDD_ON_INITIALLY
   // For compatibility with original board s/w
   // The board is powered when initially plugged in
   #if (VDD_ON_INITIALLY == 3)
      bdm_option.targetVdd = BDM_TARGET_VDD_3V3;
   #elif (VDD_ON_INITIALLY == 5)
      bdm_option.targetVdd = BDM_TARGET_VDD_5;
   #else
      bdm_option.targetVdd = BDM_TARGET_VDD_OFF;
   #endif
   bdm_setTargetVdd();
   RESET_LOW();
   WAIT_MS(100);
   RESET_3STATE();
#endif
}
コード例 #7
0
SoftMPEG4::SoftMPEG4(
        const char *name,
        const char *componentRole,
        OMX_VIDEO_CODINGTYPE codingType,
        const CodecProfileLevel *profileLevels,
        size_t numProfileLevels,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SoftVideoDecoderOMXComponent(
            name, componentRole, codingType, profileLevels, numProfileLevels,
            352 /* width */, 288 /* height */, callbacks, appData, component),
      mMode(codingType == OMX_VIDEO_CodingH263 ? MODE_H263 : MODE_MPEG4),
      mHandle(new tagvideoDecControls),
      mInputBufferCount(0),
      mSignalledError(false),
      mInitialized(false),
      mFramesConfigured(false),
      mNumSamplesOutput(0),
      mPvTime(0) {
    initPorts(
            kNumInputBuffers,
            8192 /* inputBufferSize */,
            kNumOutputBuffers,
            (mMode == MODE_MPEG4)
            ? MEDIA_MIMETYPE_VIDEO_MPEG4 : MEDIA_MIMETYPE_VIDEO_H263);
    CHECK_EQ(initDecoder(), (status_t)OK);
}
コード例 #8
0
ファイル: main.c プロジェクト: voandrew/seniorproject
// MAIN FUNCTION ----------------------------------- /
int main(void) {
    WDTCTL = WDTPW | WDTHOLD;	// Stop watchdog timer
	initPorts();							// initialize ports
	initUART();								// initialize uart
	char rxBuffer[15];						// Serial RX buffer
	__bis_SR_register(LPM0_bits + GIE);		// Enter LPM0
	volatile unsigned int i = 0;
	while(1) {
		if (g_rxFlag) {
			if (UCA1RXBUF == '*') {			// * signifies end of cmd, do analysis
				rxBuffer[i] = UCA1RXBUF;
				analyze_cmd(rxBuffer);
		    	memset(rxBuffer, 0, i);
		    	i = 0;
		    }
			else if (UCA1RXBUF == 13) {		// compare to ascii {CR} d'13, 0x0D
				analyze_cmd(rxBuffer);
				memset(rxBuffer, 0, i);
				i = 0;
			}
		    else {
		    	rxBuffer[i] = UCA1RXBUF;
		    	i++;
		    }
			g_rxFlag = 0;						// reset Rx Flag
		}
		__bis_SR_register(LPM0_bits + GIE);    	// Enter LPM0, interrupts enabled
	}
}
コード例 #9
0
SoftAVC::SoftAVC(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SoftVideoDecoderOMXComponent(
            name, componentName, codingType,
            kProfileLevels, ARRAY_SIZE(kProfileLevels),
            320 /* width */, 240 /* height */, callbacks,
            appData, component),
      mCodecCtx(NULL),
      mMemRecords(NULL),
      mFlushOutBuffer(NULL),
      mOmxColorFormat(OMX_COLOR_FormatYUV420Planar),
      mIvColorFormat(IV_YUV_420P),
      mNewWidth(mWidth),
      mNewHeight(mHeight),
      mNewLevel(0),
      mChangingResolution(false),
      mSignalledError(false) {
    initPorts(
            kNumBuffers, INPUT_BUF_SIZE, kNumBuffers, CODEC_MIME_TYPE);

    GETTIME(&mTimeStart, NULL);

    // If input dump is enabled, then open create an empty file
    GENERATE_FILE_NAMES();
    CREATE_DUMP_FILE(mInFile);

    CHECK_EQ(initDecoder(mWidth, mHeight), (status_t)OK);
}
コード例 #10
0
SoftMPEG4::SoftMPEG4(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mMode(MODE_MPEG4),
      mHandle(new tagvideoDecControls),
      mInputBufferCount(0),
      mWidth(352),
      mHeight(288),
      mCropLeft(0),
      mCropTop(0),
      mCropRight(mWidth - 1),
      mCropBottom(mHeight - 1),
      mSignalledError(false),
      mInitialized(false),
      mFramesConfigured(false),
      mNumSamplesOutput(0),
      mOutputPortSettingsChange(NONE) {
    if (!strcmp(name, "OMX.google.h263.decoder")) {
        mMode = MODE_H263;
    } else {
        CHECK(!strcmp(name, "OMX.google.mpeg4.decoder"));
    }

    initPorts();
    CHECK_EQ(initDecoder(), (status_t)OK);
}
コード例 #11
0
SoftFFmpegVideo::SoftFFmpegVideo(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mMode(MODE_H264),
      mCtx(NULL),
      mImgConvertCtx(NULL),
      mExtradataReady(false),
      mIgnoreExtradata(false),
      mSignalledError(false),
      mWidth(320),
      mHeight(240),
      mStride(320),
      mOutputPortSettingsChange(NONE) {
    if (!strcmp(name, "OMX.ffmpeg.mpeg4.decoder")) {
        mMode = MODE_MPEG4;
    } else if (!strcmp(name, "OMX.ffmpeg.mpeg2v.decoder")) {
        mMode = MODE_MPEG2;
    } else if (!strcmp(name, "OMX.ffmpeg.h263.decoder")) {
        mMode = MODE_H263;
    } else if (!strcmp(name, "OMX.ffmpeg.vc1.decoder")) {
        mMode = MODE_VC1;
    } else {
        CHECK(!strcmp(name, "OMX.ffmpeg.h264.decoder"));
        //mIgnoreExtradata = true;
    }

    LOGV("SoftFFmpegVideo component: %s", name);

    initPorts();
    CHECK_EQ(initDecoder(), (status_t)OK);
}
コード例 #12
0
ファイル: main.c プロジェクト: voandrew/seniorproject
int main(void)
{
	WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT

	initPorts();
	initUART();
	char g_x[15];
	volatile int i = 0;
	__bis_SR_register(LPM0_bits + GIE);       // Enter LPM0, interrupts enabled
//	__bis_SR_register(GIE);
	while(1) {
		test_func();
		if (flg_rx) {

			if (UCA1RXBUF == '*') {
				analyze_cmd(g_x);
//		    	UART_sendChar(g_x);
		    	memset(g_x, 0, i);
		    	i = 0;
		    }
			else if (UCA1RXBUF == 13) {		// compare to ascii {CR} d'13, 0x0D
				analyze_cmd(g_x);
				memset(g_x, 0, i);
				i = 0;
			}
		    else {
		    	g_x[i] = UCA1RXBUF;
		    	i++;
		    }
			flg_rx = 0;
		}
		if (flg_rx == 0)
			__bis_SR_register(LPM0_bits + GIE);       // Enter LPM0, interrupts enabled
	}
}
コード例 #13
0
ファイル: main.c プロジェクト: crond/dsPIC33F_I2C_Slave
int init()
{	
   	initPorts();
   	initUART1();
   	initI2C(); 
    return 0;	
} 
コード例 #14
0
ファイル: main.c プロジェクト: piyushpandey013/hairy-ironman
int main()
{

  uint8_t dir = CW;
  
  initPorts();
  initADC();

// accel section
  halfStep(dir);
  _delay_us(10000);
  halfStep(dir);
  _delay_us(6000);
  halfStep(dir);
  _delay_us(4667);
  halfStep(dir);
  _delay_us(3949);

  while (1)
  {
    stepperVal = MOTORPORT;
    switch (stepperVal)
    {
      case 1:
	ADMUX = (ADMUX & 0b1110000) | 0x1;
	adctested = 1;
	break;
      case 2:
	ADMUX = (ADMUX & 0b1110000) | 0x2;
	adctested = 1;
	break;
      case 4:
	ADMUX = (ADMUX & 0b1110000) | 0x3;
	adctested = 1;
	break;
      case 8:
	ADMUX = (ADMUX & 0b1110000) | 0x0;
	adctested = 1;
	break;
      default:
	ADMUX = (ADMUX & 0b1110000) | 0x31; // GND
	adctested = 0;
    }


    if (adctested)
    {
      // trigger ADC sample
      ADCSRA |= _BV(ADSC);
      // poll delay until sample done
      loop_until_bit_is_clear( ADCSRA, ADSC );
      DEBUGPORT = ADCH;
    }
    halfStep(dir);
    _delay_us(3500);

  } // main loop
  
}
コード例 #15
0
ファイル: main_encoders.c プロジェクト: sooda/aasiauto
void measinit(void) {
	cycleData.intFlag = 0;
	cycleData.Cnt = 0;
	initWheelData();
	initPorts();
	initTimers();
	initInterrupts();
}
コード例 #16
0
AnatomyOMXComponent::AnatomyOMXComponent(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component) {
    LOGD("anatomy component created");
    initPorts();
}
コード例 #17
0
UltraSon::UltraSon() : m_enable(false), m_top(TOP_TIMER1), m_nbrOvf(3), m_pulse(5),
m_diff(0), m_temporaire(0), m_bOK(false), m_cptOvfOutput(0), m_diffChanged(false),
m_cptOvfPWM(0), m_prescaler(250000), m_coeffConvMS(m_prescaler * 0.000001),
m_distance(1), m_distanceNew(1), m_realDistance(0)
{
	initPorts();
	initTimer1();

	PRINTD("ctor us called");
}
コード例 #18
0
ファイル: Termometer_LCD.c プロジェクト: Loreton/ProgettiVari
void main() {
    initVars();
    
	Init_Registers();
    initPorts();
    
    unsigned char loop=1;
    LCD_initialize();
    while (loop>0) {
        loop += 1;
        
		LCD_Clear();
		//waitForKey();           // attendi che il pin venga messo a massa
        
        // MY_delay_s(1);
		LORETO_LED  = pinRA1;
		// pinRA4  = pinRA1;
        
		if (loop%2 == 0) {
			LCD_gotoRC(0, 0);
			LCD_printRom(romStr, 0);            //DEBUG
			// waitForKey();           // attendi che il pin venga messo a massa
            delay_s(1);
			
			LCD_gotoRC(1, 0);
			LCD_printStr("Loreto");
            delay_s(1);
			// waitForKey();           // attendi che il pin venga messo a massa
			

			LCD_gotoRC(1, 12);
			LCD_printStr("Ale");
            delay_s(1);
			// waitForKey();           // attendi che il pin venga messo a massa
		}
		else {
			LCD_gotoRC(1, 0);
			LCD_printRom(romStr, 0);            //DEBUG
            delay_s(1);
			// waitForKey();           // attendi che il pin venga messo a massa
			
			LCD_gotoRC(0, 0);
			LCD_printStr("Loreto");
            delay_s(1);
			// waitForKey();           // attendi che il pin venga messo a massa
		}
        
        LCD_Clear();
        LCD_printfAt(0,0,   "Dec Number:%02d", 12345);            //DEBUG
        LCD_printfAt(1,0,   "Hex Number:%02X", 12345);            //DEBUG
        delay_s(1);
        
    }
    
} // end main()
コード例 #19
0
ファイル: SoftRaw.cpp プロジェクト: LeMaker/android-actions
/*
  * initialize mNumSamplesOutput and mAnchorTimeUs, 
  * used to compute output timestamps.
  ************************************
  *      
  *ActionsCode(author:jinsongxue, change_code)
  */
SoftRaw::SoftRaw(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mSignalledError(false),      
      mChannelCount(2),
      mSampleRate(44100) {
    initPorts();
    CHECK_EQ(initDecoder(), (status_t)OK);
}
コード例 #20
0
ファイル: main.c プロジェクト: n0p/Osomcom-Pocsag
void initSystem(void) {

    OSCCON = 0x70;      //16 MHz Clock

    __delay_us(1);

    initPorts();
    rs232_init();
    config_init();
    pocsagPhy_init();
    interrupts_init();

}
コード例 #21
0
STE_SoftMP3_Dec::STE_SoftMP3_Dec(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mDecoderBuf(NULL),
      mAnchorTimeUs(0),
      mNumFramesOutput(0),
      mNumChannels(2),
      mSamplingRate(44100),
      mSignalledError(false),
      mFirstTime(1),
#ifdef PARTIAL_FRAME_HANDLING
      bEOSReceived(false),
      pAudioModuleItf(new AUDIO_MODULE_INTERFACE_T),
#else
      mEnable_silenceinsertion(false),
      mPrevTimeStamp(0LL),
      mNewTimeStamp(0LL),
      mExpectedTimeStamp(0LL),
      mDeltaTimeStamp(0LL),
      mInitialTimeStamp(0LL),
      mFramesTobeInserted(0),
      mFrameDuration(0),
      moutputFrameSize(0),
      mfirst_frame(0),
#endif
      mp3_itf(new CODEC_INTERFACE_T),
      mDLHandle(NULL),
      bSeekDone(false),
      mOutputPortSettingsChange(NONE) {

    mDLHandle = dlopen(STE_MP3_DECODER_LIBRARY, RTLD_NOW);

    if (mDLHandle == NULL) {
        ALOGE("Could not open the libstagefright_ste_mp3decode library.\n");
        return;
    }

    mp3_decode_init_malloc = (mp3_decode_init_malloc_t)dlsym(mDLHandle, "mp3_decode_init_malloc");
    mp3_close              = (mp3_close_t)dlsym(mDLHandle, "mp3_close");
    mp3_reset              = (mp3_reset_t)dlsym(mDLHandle, "mp3_reset");
    mp3_decode_frame       = (mp3_decode_frame_t)dlsym(mDLHandle, "mp3_decode_frame");
    mp3_2_5_parse_header   = (mp3_2_5_parse_header_t)dlsym(mDLHandle, "mp3_2_5_parse_header");

    initPorts();
    initDecoder();
    ALOGI("Successfully allocated ST-Ericsson '%s' decoder through the " \
         "SoftOMXPlugin interface", this->name());
}
コード例 #22
0
ファイル: main.c プロジェクト: PriceElectronics/PRTU-Clock
//-----------------------------------------------------------------------------
// main
void main(void)
{
	initPorts();
	initTimer1();
	initUART();

	while(1)
	{
		
		updateDigits();
		updateDisplay();


		if(beepCounter<115) beepCounter++;		// beeper off count
		else
		{
			beepCounter = 0;
			BEEP_BEEP_OFF;
		}


		if(secondCounter<1000) secondCounter++;		// 1 second tasks
		else
		{
			if(LATBbits.LATB0 == 0) COLON_ON;	// blink colon once per second
			else COLON_OFF;
			secondCounter = 0;
		}
		

		if(lnetTimeoutCounter<14580) lnetTimeoutCounter++;		// (lnet timeout 14.58 sec)
		else													// no overlap with 1 sec
		{
			LNET_OFF;
			lnetConnected = FALSE;
			PM_OFF;
			lnetHours = 88;
			lnetMinutes = 88;
		}

		// tasks that execute once per second are located in secTasks()
		
		while(TMR1H < 0x09);
		while(TMR1L < 0xC4);  // wait for 1 ms to elapse

		TMR1H = 0;
		TMR1L = 0; // reset tmr1 registers
	}
	
	return;
}
コード例 #23
0
ファイル: main.c プロジェクト: AlexandreN7/cube8x8x8
void main(void) {
	// unsigned char address = 0;
	// char msg1[80] = "Slave Ready \n \r";

	initPorts(); // Initialize ports to startup state
	initComms(); // Initialize the serial port


	while (1) {
            decodage(0);
            affichage();
	}

}
コード例 #24
0
ファイル: main.c プロジェクト: ninux/mc
/*
 * main program
 * */
void main(void)
{
        initPorts();            // Port init
        initTimer();            // Timer init
        ifrRxFrontInit();       // Infrared init
        motorInit();            // Motor init
        EnableInterrupts;       // Interrupts enable

        for(;;) {
                int8 speed = 0;
                switch (ifrRxFrontGetKey()) {
                        case 'S':	// stop
                                motorSetPWMLeft(0);
                                motorSetPWMRight(0);
                                break;

                        // @ToDo complete cases of the switch statement
                        case 'W':	// forward
                        		if ((motorGetPWMLeft() != 0) && (motorGetPWMRight() != 0)) {
                        			motorSetPWMLeft(80);
                        			motorSetPWMRight(80);
                        		} else {
                        			motorIncrementPWMLeft(5);
                        			motorIncrementPWMRight(5);
                        		}
                                break;
                        case 'T':	// backward
                        		if ((motorGetPWMLeft() != 60) && (motorGetPWMRight() != 60)) {
                        			motorSetPWMLeft(-80);
                        			motorSetPWMRight(-80);
                        		} else {
                        			motorIncrementPWMLeft(-5);
                        			motorIncrementPWMRight(-5);
                        		}
                                break;
                        case '+':	// left
                                motorIncrementPWMLeft(-1);
                                motorIncrementPWMRight(1);
                                break;
                        case '-':	// right
                                motorIncrementPWMLeft(1);
                                motorIncrementPWMRight(-1);
                                break;
                        default:
                                break;
                }
        }
}
コード例 #25
0
SoftVorbis::SoftVorbis(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mInputBufferCount(0),
      mState(NULL),
      mVi(NULL),
      mAnchorTimeUs(0),
      mNumFramesOutput(0),
      mNumFramesLeftOnPage(-1),
      mOutputPortSettingsChange(NONE) {
    initPorts();
    CHECK_EQ(initDecoder(), (status_t)OK);
}
コード例 #26
0
/*==============================================================================
    Main program code
==============================================================================*/
int main(void) {
    // Initialize I/O and peripherals for PORTB output
    initPorts();

    while (1) {
        unsigned char HIIN2 = 0b00010000;
        //unsigned char hiin = adConvert(HIIN);
        PWM1(adConvert(HIIN2));
        unsigned char MIDIN2 = 0b00010100;
        //unsigned char midin = adConvert(MIDIN);
        PWM2(adConvert(MIDIN2));
        //unsigned char loin = adConvert(LOIN);
        unsigned char LOIN2 = 0b00011000;
        PWM3(adConvert(LOIN2));
    }
}
コード例 #27
0
ファイル: SoftMP3.cpp プロジェクト: Alberto97/STE_av
SoftMP3::SoftMP3(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mConfig(new tPVMP3DecoderExternal),
      mDecoderBuf(NULL),
      mAnchorTimeUs(0),
      mNumFramesOutput(0),
      mNumChannels(2),
      mSamplingRate(44100),
      mSignalledError(false),
      mOutputPortSettingsChange(NONE) {
    initPorts();
    initDecoder();
}
コード例 #28
0
SoftGSM::SoftGSM(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mSignalledError(false) {

    CHECK(!strcmp(name, "OMX.google.gsm.decoder"));

    mGsm = gsm_create();
    CHECK(mGsm);
    int msopt = 1;
    gsm_option(mGsm, GSM_OPT_WAV49, &msopt);

    initPorts();
}
コード例 #29
0
SoftAMRNBEncoder::SoftAMRNBEncoder(
        const char *name,
        const OMX_CALLBACKTYPE *callbacks,
        OMX_PTR appData,
        OMX_COMPONENTTYPE **component)
    : SimpleSoftOMXComponent(name, callbacks, appData, component),
      mEncState(NULL),
      mSidState(NULL),
      mBitRate(0),
      mMode(MR475),
      mInputSize(0),
      mInputTimeUs(-1ll),
      mSawInputEOS(false),
      mSignalledError(false) {
    initPorts();
    CHECK_EQ(initEncoder(), (status_t)OK);
}
コード例 #30
0
ファイル: teensy.c プロジェクト: sooda/aasiauto
int main(void) {
    cli();
    cycleData.intFlag = 0;
    cycleData.Cnt = 0;
    initWheelData();
    initPorts();
    initTimers();
    initUSART();
    initInterrupts();
    sei();
    for(;;) {
        if(cycleData.intFlag)
            prgm800Hz();
        if(cycleData.Cnt == 8)
            prgm100Hz();
    }
}