This file is indexed.

/usr/include/hybris/media/recorder_compatibility_layer.h is in libmedia-dev 0.1.0+git20151016+6d424c9-0ubuntu7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
 * Copyright (C) 2013 Canonical Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef RECORDER_COMPATIBILITY_LAYER_H_
#define RECORDER_COMPATIBILITY_LAYER_H_

#include <stdint.h>
#include <unistd.h>
#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

    struct MediaRecorderWrapper;
    struct CameraControl;

    // values are from andoid /frameworks/av/include/media/mediarecorder.h
    typedef enum
    {
        ANDROID_VIDEO_SOURCE_DEFAULT = 0,
        ANDROID_VIDEO_SOURCE_CAMERA = 1,
        ANDROID_VIDEO_SOURCE_GRALLOC_BUFFER = 2
    } VideoSource;

    // values are from andoid /system/core/include/system/audio.h
    typedef enum
    {
        ANDROID_AUDIO_SOURCE_DEFAULT             = 0,
        ANDROID_AUDIO_SOURCE_MIC                 = 1,
        ANDROID_AUDIO_SOURCE_VOICE_UPLINK        = 2,
        ANDROID_AUDIO_SOURCE_VOICE_DOWNLINK      = 3,
        ANDROID_AUDIO_SOURCE_VOICE_CALL          = 4,
        ANDROID_AUDIO_SOURCE_CAMCORDER           = 5,
        ANDROID_AUDIO_SOURCE_VOICE_RECOGNITION   = 6,
        ANDROID_AUDIO_SOURCE_VOICE_COMMUNICATION = 7,
        ANDROID_AUDIO_SOURCE_REMOTE_SUBMIX       = 8,
        ANDROID_AUDIO_SOURCE_CNT,
        ANDROID_AUDIO_SOURCE_MAX                 = ANDROID_AUDIO_SOURCE_CNT - 1
    } AudioSource;

    // values are from andoid /frameworks/av/include/media/mediarecorder.h
    typedef enum
    {
        ANDROID_OUTPUT_FORMAT_DEFAULT = 0,
        ANDROID_OUTPUT_FORMAT_THREE_GPP = 1,
        ANDROID_OUTPUT_FORMAT_MPEG_4 = 2,
        ANDROID_OUTPUT_FORMAT_AUDIO_ONLY_START = 3,
        /* These are audio only file formats */
        ANDROID_OUTPUT_FORMAT_RAW_AMR = 3, //to be backward compatible
        ANDROID_OUTPUT_FORMAT_AMR_NB = 3,
        ANDROID_OUTPUT_FORMAT_AMR_WB = 4,
        ANDROID_OUTPUT_FORMAT_AAC_ADIF = 5,
        ANDROID_OUTPUT_FORMAT_AAC_ADTS = 6,
        /* Stream over a socket, limited to a single stream */
        ANDROID_OUTPUT_FORMAT_RTP_AVP = 7,
        /* H.264/AAC data encapsulated in MPEG2/TS */
        ANDROID_OUTPUT_FORMAT_MPEG2TS = 8
    } OutputFormat;

    // values are from andoid /frameworks/av/include/media/mediarecorder.h
    typedef enum
    {
        ANDROID_VIDEO_ENCODER_DEFAULT = 0,
        ANDROID_VIDEO_ENCODER_H263 = 1,
        ANDROID_VIDEO_ENCODER_H264 = 2,
        ANDROID_VIDEO_ENCODER_MPEG_4_SP = 3
    } VideoEncoder;

    // values are from andoid /frameworks/av/include/media/mediarecorder.h
    typedef enum
    {
        ANDROID_AUDIO_ENCODER_DEFAULT = 0,
        ANDROID_AUDIO_ENCODER_AMR_NB = 1,
        ANDROID_AUDIO_ENCODER_AMR_WB = 2,
        ANDROID_AUDIO_ENCODER_AAC = 3,
        ANDROID_AUDIO_ENCODER_HE_AAC = 4,
        ANDROID_AUDIO_ENCODER_AAC_ELD = 5
    } AudioEncoder;

    // Callback types
    typedef void (*on_recorder_msg_error)(void *context);

    // Callback setters
    void android_recorder_set_error_cb(struct MediaRecorderWrapper *mr, on_recorder_msg_error cb,
                                       void *context);

    // Main recorder control API
    struct MediaRecorderWrapper *android_media_new_recorder();
    int android_recorder_initCheck(struct MediaRecorderWrapper *mr);
    int android_recorder_setCamera(struct MediaRecorderWrapper *mr, struct CameraControl* control);
    int android_recorder_setVideoSource(struct MediaRecorderWrapper *mr, VideoSource vs);
    int android_recorder_setAudioSource(struct MediaRecorderWrapper *mr, AudioSource as);
    int android_recorder_setOutputFormat(struct MediaRecorderWrapper *mr, OutputFormat of);
    int android_recorder_setVideoEncoder(struct MediaRecorderWrapper *mr, VideoEncoder ve);
    int android_recorder_setAudioEncoder(struct MediaRecorderWrapper *mr, AudioEncoder ae);
    int android_recorder_setOutputFile(struct MediaRecorderWrapper *mr, int fd);
    int android_recorder_setVideoSize(struct MediaRecorderWrapper *mr, int width, int height);
    int android_recorder_setVideoFrameRate(struct MediaRecorderWrapper *mr, int frames_per_second);
    int android_recorder_setParameters(struct MediaRecorderWrapper *mr, const char* parameters);
    int android_recorder_start(struct MediaRecorderWrapper *mr);
    int android_recorder_stop(struct MediaRecorderWrapper *mr);
    int android_recorder_prepare(struct MediaRecorderWrapper *mr);
    int android_recorder_reset(struct MediaRecorderWrapper *mr);
    int android_recorder_close(struct MediaRecorderWrapper *mr);
    int android_recorder_release(struct MediaRecorderWrapper *mr);

#ifdef __cplusplus
}
#endif

#endif