NaCl: Update revision in DEPS, r12927 -> r12935
[chromium-blink-merge.git] / remoting / proto / audio.proto
blobdacfb5e273ba01387966f94791e5a87c5fd5155c
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Protocol for audio messages.
7 syntax = "proto2";
9 option optimize_for = LITE_RUNTIME;
11 package remoting;
13 message AudioPacket {
14   optional int32 timestamp = 1 [default = 0];
16   // Packets with raw data must have exactly one data field.
17   // For those packets, samples are signed and represented using little endian.
18   // Some encoders (eg. Speex) may add multiple data fields to separate encoded
19   // frames.
20   repeated bytes data = 2;
22   enum Encoding {
23     ENCODING_INVALID = -1;
24     ENCODING_RAW = 0;  // Uncompressed encoding
25     ENCODING_OPUS = 1;
26     ENCODING_SPEEX = 2;
27   }
29   optional Encoding encoding = 3 [default = ENCODING_INVALID];
31   enum SamplingRate {
32     SAMPLING_RATE_INVALID = -1;
33     SAMPLING_RATE_44100 = 44100;
34     SAMPLING_RATE_48000 = 48000;
35   }
37   optional SamplingRate sampling_rate = 4 [default = SAMPLING_RATE_INVALID];
39   enum BytesPerSample {
40     BYTES_PER_SAMPLE_INVALID = -1;
41     BYTES_PER_SAMPLE_2 = 2;
42   }
44   optional BytesPerSample bytes_per_sample = 5
45       [default = BYTES_PER_SAMPLE_INVALID];
47   enum Channels {
48     CHANNELS_INVALID = -1;
49     CHANNELS_MONO = 1;
50     CHANNELS_STEREO = 2;
51   }
53   optional Channels channels = 6 [default = CHANNELS_INVALID];