2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using static Tizen.Multimedia.InteropHelper;
19 using Native = Interop.ScreenMirroring;
21 namespace Tizen.Multimedia
24 /// Provides a means to retrieve the audio information which is negotiated with the source device.
26 /// <seealso cref="ScreenMirroring"/>
27 public class ScreenMirroringAudioInfo
29 private readonly ScreenMirroring _owner;
31 internal ScreenMirroringAudioInfo(ScreenMirroring owner)
37 /// Gets the negotiated audio codec.
39 /// <exception cref="InvalidOperationException">An internal error occurs.</exception>
40 /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
41 public ScreenMirroringAudioCodec Codec
45 GetValue(Native.GetNegotiatedAudioCodec, _owner.Handle, out ScreenMirroringAudioCodec value).
46 ThrowIfError("Failed to get audio codec.");
53 /// Gets the negotiated audio channels.
55 /// <exception cref="InvalidOperationException">An internal error occurs.</exception>
56 /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
61 GetValue(Native.GetNegotiatedAudioChannel, _owner.Handle, out int value).
62 ThrowIfError("Failed to get audio channels.");
69 /// Gets the negotiated audio sample rate.
71 /// <exception cref="InvalidOperationException">An internal error occurs.</exception>
72 /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
77 GetValue(Native.GetNegotiatedAudioSampleRate, _owner.Handle, out int value).
78 ThrowIfError("Failed to get audio sample rate.");
85 /// Gets the negotiated audio bit width.
87 /// <exception cref="InvalidOperationException">An internal error occurs.</exception>
88 /// <exception cref="ObjectDisposedException">The <see cref="ScreenMirroring"/> has already been disposed.</exception>
93 GetValue(Native.GetNegotiatedAudioBitwidth, _owner.Handle, out int value).
94 ThrowIfError("Failed to get audio bit width.");