Ejemplo n.º 1
0
/* /////////////////////////////////////////////////////////////////////////////
//  Name:        GetFormatTagByNameAndByDetails
//  Purpose:     getting format tag by codec name and format details in USC_MAKE_FORMAT_DET.
//  Returns:     1 if success, 0 if fails.
//  Parameters:
//    pSrcCodecName     pointer to the input codec name.
//    fmtDetails        format details in USC_MAKE_FORMAT_DET form.
//    lFormatTag        pointer to the output format tag.
*/
static int GetFormatTagByNameAndByDetails(const char *pSrcCodecName, int fmtDetails, int *lFormatTag)
{
   int i;
   for(i=0;i<USC_FORMATS.nEntries;i++) {
      if((strcmp(USC_FORMATS.formatsInfo[i].codecName,pSrcCodecName)==0)&&
         CompareDetails(fmtDetails, USC_FORMATS.formatsInfo[i].fmtDetails)){
         *lFormatTag = USC_FORMATS.formatsInfo[i].lFormatTag;
         return 1;
      }
   }
   return 0;
}
Ejemplo n.º 2
0
/* /////////////////////////////////////////////////////////////////////////////
//  Name:        GetFormatTagByNameAndByDetails
//  Purpose:     getting format tag by codec name and format details in USC_MAKE_FORMAT_DET.
//  Returns:     1 if success, 0 if fails.
//  Parameters:
//    pSrcCodecName     pointer to the input codec name.
//    fmtDetails        format details in USC_MAKE_FORMAT_DET form.
//    lFormatTag        pointer to the output format tag.
*/
static Ipp32s GetFormatTagByNameAndByDetails(const Ipp8s *pSrcCodecName, Ipp32s fmtDetails, Ipp32s *lFormatTag)
{
   Ipp32s i;
   for(i=0;i<USC_FORMATS.nEntries;i++) {
      if((strcmp(USC_FORMATS.formatsInfo[i].codecName,pSrcCodecName)==0)&&
         CompareDetails(fmtDetails, USC_FORMATS.formatsInfo[i].fmtDetails)){
         *lFormatTag = USC_FORMATS.formatsInfo[i].lFormatTag;
         return 1;
      }
   }
   return 0;
}