Exemplo n.º 1
0
static int
GetProfileParameter(uint32_t aCameraId, int aQuality, const char* aParameter)
{
  MediaProfiles* profiles = GetMediaProfiles();
  return profiles->getCamcorderProfileParamByName(aParameter, static_cast<int>(aCameraId),
                                                  static_cast<camcorder_quality>(aQuality));
}
Exemplo n.º 2
0
static bool
IsProfileSupported(uint32_t aCameraId, int aQuality)
{
  MediaProfiles* profiles = GetMediaProfiles();
  return profiles->hasCamcorderProfile(static_cast<int>(aCameraId),
                                       static_cast<camcorder_quality>(aQuality));
}
Exemplo n.º 3
0
static int
GetProfileParameter(uint32_t aCameraId, uint32_t aProfileIndex, const char* aParameter)
{
  MediaProfiles* profiles = GetMediaProfiles();
  camcorder_quality q = static_cast<camcorder_quality>(ProfileList[aProfileIndex].quality);
  return profiles->getCamcorderProfileParamByName(aParameter, static_cast<int>(aCameraId), q);
}
Exemplo n.º 4
0
/*static*/ void
MediaProfiles::startElementHandler(void *userData, const char *name, const char **atts)
{
    MediaProfiles *profiles = (MediaProfiles *) userData;
    if (strcmp("Video", name) == 0) {
        createVideoCodec(atts, profiles);
    } else if (strcmp("Audio", name) == 0) {
        createAudioCodec(atts, profiles);
    } else if (strcmp("VideoEncoderCap", name) == 0 &&
               strcmp("true", atts[3]) == 0) {
        profiles->mVideoEncoders.add(createVideoEncoderCap(atts));
    } else if (strcmp("AudioEncoderCap", name) == 0 &&
               strcmp("true", atts[3]) == 0) {
        profiles->mAudioEncoders.add(createAudioEncoderCap(atts));
    } else if (strcmp("VideoDecoderCap", name) == 0 &&
               strcmp("true", atts[3]) == 0) {
        profiles->mVideoDecoders.add(createVideoDecoderCap(atts));
    } else if (strcmp("AudioDecoderCap", name) == 0 &&
               strcmp("true", atts[3]) == 0) {
        profiles->mAudioDecoders.add(createAudioDecoderCap(atts));
    } else if (strcmp("EncoderOutputFileFormat", name) == 0) {
        profiles->mEncoderOutputFileFormats.add(createEncoderOutputFileFormat(atts));
    } else if (strcmp("CamcorderProfiles", name) == 0) {
        profiles->mCurrentCameraId = getCameraId(atts);
        profiles->addStartTimeOffset(profiles->mCurrentCameraId, atts);
    } else if (strcmp("EncoderProfile", name) == 0) {
        profiles->mCamcorderProfiles.add(
            createCamcorderProfile(profiles->mCurrentCameraId, atts, profiles->mCameraIds));
    } else if (strcmp("ImageEncoding", name) == 0) {
        profiles->addImageEncodingQualityLevel(profiles->mCurrentCameraId, atts);
    }
}
Exemplo n.º 5
0
static bool
IsProfileSupported(uint32_t aCameraId, uint32_t aProfileIndex)
{
  MediaProfiles* profiles = GetMediaProfiles();
  camcorder_quality q = static_cast<camcorder_quality>(ProfileList[aProfileIndex].quality);
  return profiles->hasCamcorderProfile(static_cast<int>(aCameraId), q);
}