--- /dev/null
+bin/
+obj/
+*.exe
+*.dll
+
--- /dev/null
+ASM_DIRS := Tizen.Multimedia
+ASM_DLLS := $(addsuffix .dll,$(ASM_DIRS))
+
+FLAGS := /unsafe
+
+ALL: $(ASM_DLLS)
+
+define make-dll
+$(eval ASM = $(strip $1))
+$(eval SRC = $(shell find $(ASM) -path $(ASM)/obj -prune -o -name '*.cs' -print))
+$(eval PKG = $(shell echo $2 | tr ' ' ','))
+$(ASM).dll: $(SRC)
+ @echo "[BUILD] $$@"
+ @mcs /nologo /out:$$@ /t:library /keyfile:$(ASM)/$(ASM).snk $(addprefix /pkg:,$(PKG)) $(FLAGS) $(SRC)
+ @echo "[CHECK] $$@"
+ @RET=`mono-shlib-cop $$@`; \
+ CNT=`echo $$$$RET | grep -e '^error:' | wc -l`; \
+ if [ $$$$CNT -gt 0 ]; then echo $$$$RET; rm -f $$@ exit 1; fi
+endef
+
+$(eval $(call make-dll, Tizen.Multimedia, csapi-tizen))
+
+clean:
+ @rm -f $(ASM_DLLS)
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
+
--- /dev/null
+Name: csapi-tizen.multimedia
+Description: Tizen Multimedia API for C#
+Version: @version@
+Libs: -r:@dllpath@/@dllname@
+Requires:
+
--- /dev/null
+%define dllpath %{_libdir}/mono/tizen
+%define dllname Tizen.Multimedia.dll
+Name: csapi-tizen.multimedia
+Summary: Tizen Multimedia API for C#
+Version: 1.0.0
+Release: 1
+Group: Development/Libraries
+License: Apache-2.0
+URL: https://www.tizen.org
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+Source2: %{name}.pc.in
+# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
+BuildRequires: mono-compiler
+BuildRequires: mono-devel
+#BuildRequires: mcs
+#BuildRequires: mono-shlib-cop
+# TODO: replace mono-core to gacutil.
+# mono-core should provide the symbol 'gacutil'
+Requires(post): mono-core
+Requires(postun): mono-core
+# P/Invoke Dependencies
+BuildRequires: pkgconfig(capi-media-player)
+# P/Invoke Runtime Dependencies
+# TODO: It should be removed after fix tizen-rpm-config
+#Requires: capi-multimedia-device
+# DLL Dependencies
+#BuildRequires: ...
+%description
+Tizen Multimedia API for C#
+%package devel
+Summary: Development package for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+%description devel
+Development package for %{name}
+%prep
+%setup -q
+cp %{SOURCE1} .
+%build
+# build dll
+mcs -target:library -out:%{dllname} -keyfile:Tizen.Multimedia/Tizen.Multimedia.snk \
+ Tizen.Multimedia/Properties/AssemblyInfo.cs \
+ Tizen.Multimedia/Player/*.cs \
+ Tizen.Multimedia/Interop/*.cs
+# check p/invoke
+if [ -x %{dllname} ]; then
+ RET=`mono-shlib-cop %{dllname}`; \
+ CNT=`echo $RET | grep -E "^error:" | wc -l`; \
+ if [ $CNT -gt 0 ]; then exit 1; fi
+fi
+%install
+# copy dll
+mkdir -p %{buildroot}%{dllpath}
+install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+# generate pkgconfig
+mkdir -p %{buildroot}%{_libdir}/pkgconfig
+sed -e "s#@version@#%{version}#g" \
+ -e "s#@dllpath@#%{dllpath}#g" \
+ -e "s#@dllname@#%{dllname}#g" \
+ %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
+%post
+gacutil -i %{dllpath}/%{dllname}
+%files
+%{dllpath}/%{dllname}
+%files devel
+%{_libdir}/pkgconfig/%{name}.pc
--- /dev/null
+
+using System;
+
+internal static partial class Interop
+{
+ internal static partial class Libraries
+ {
+ public const string Player = "libcapi-media-player.so.0";
+ }
+}
--- /dev/null
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ internal static partial class PlayerInterop
+ {
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ internal delegate bool MediaTagCallback(IntPtr tagHandle, IntPtr UserData);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_create")]
+ internal static extern int Create(out IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_destroy")]
+ internal static extern int Destroy(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_prepare")]
+ internal static extern int Prepare(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unprepare")]
+ internal static extern int Unprepare(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_uri")]
+ internal static extern int SetUri(IntPtr player, string uri);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_display")]
+ internal static extern int SetDisplay(IntPtr player, int type, IntPtr display);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_start")]
+ internal static extern int Start(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_stop")]
+ internal static extern int Stop(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_pause")]
+ internal static extern int Pause(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_memory_buffer")]
+ internal static extern int SetMemoryBuffer(IntPtr player, IntPtr data, int size);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_state")]
+ internal static extern int GetState(IntPtr player, out int state);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_volume")]
+ internal static extern int SetVolume(IntPtr player, float left, float right);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_volume")]
+ internal static extern int GetVolume(IntPtr player, out float left, out float right);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_sound_type")]
+ internal static extern int SetSoundType(IntPtr player, int type);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_audio_policy_info")]
+ internal static extern int SetAudioPolicyInfo(IntPtr player, IntPtr stream_info);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_audio_latency_mode")]
+ internal static extern int SetAudioLatencyMode(IntPtr player, int latency_mode);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_audio_latency_mode")]
+ internal static extern int GetAudioLatencyMode(IntPtr player, out int latency_mode);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_play_position")]
+ internal static extern int GetPlayPosition(IntPtr player, out int millisecond);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_mute")]
+ internal static extern int SetMute(IntPtr player, bool muted);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_is_muted")]
+ internal static extern int IsMuted(IntPtr player, out bool muted);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_looping")]
+ internal static extern int SetLooping(IntPtr player, bool looping);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_is_looping")]
+ internal static extern int IsLooping(IntPtr player, out bool looping);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_completed_cb")]
+ //internal static extern int SetCompletedCb(IntPtr player, player_completed_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_completed_cb")]
+ internal static extern int UnsetCompletedCb(IntPtr player);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_interrupted_cb")]
+ //internal static extern int SetInterruptedCb(IntPtr player, player_interrupted_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_interrupted_cb")]
+ internal static extern int UnsetInterruptedCb(IntPtr player);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_error_cb")]
+ //internal static extern int SetErrorCb(IntPtr player, player_error_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_error_cb")]
+ internal static extern int UnsetErrorCb(IntPtr player);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_capture_video")]
+ //internal static extern int CaptureVideo(IntPtr player, player_video_captured_cb callback, IntPtr user_data);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_media_packet_video_frame_decoded_cb")]
+ //internal static extern int SetMediaPacketVideoFrameDecodedCb(IntPtr player, player_media_packet_video_decoded_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_media_packet_video_frame_decoded_cb")]
+ internal static extern int UnsetMediaPacketVideoFrameDecodedCb(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_streaming_cookie")]
+ internal static extern int SetStreamingCookie(IntPtr player, string cookie, int size);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_streaming_user_agent")]
+ internal static extern int SetStreamingUserAgent(IntPtr player, string user_agent, int size);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_streaming_download_progress")]
+ internal static extern int GetStreamingDownloadProgress(IntPtr player, out int start, out int current);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_buffering_cb")]
+ //internal static extern int SetBufferingCb(IntPtr player, player_buffering_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_buffering_cb")]
+ internal static extern int UnsetBufferingCb(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_progressive_download_path")]
+ internal static extern int SetProgressiveDownloadPath(IntPtr player, string path);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_get_progressive_download_status")]
+ //internal static extern int GetProgressiveDownloadStatus(IntPtr player, unsigned long *current, unsigned long *total_size);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_progressive_download_message_cb")]
+ //internal static extern int SetProgressiveDownloadMessageCb(IntPtr player, player_pd_message_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_progressive_download_message_cb")]
+ internal static extern int UnsetProgressiveDownloadMessageCb(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_playback_rate")]
+ internal static extern int SetPlaybackRate(IntPtr player, float rate);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_push_media_stream")]
+ internal static extern int PushMediaStream(IntPtr player, IntPtr packet);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_info")]
+ internal static extern int SetMediaStreamInfo(IntPtr player, int type, IntPtr format);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_buffer_status_cb")]
+ //internal static extern int SetMediaStreamBufferStatusCb(IntPtr player, int type, player_media_stream_buffer_status_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_media_stream_buffer_status_cb")]
+ internal static extern int UnsetMediaStreamBufferStatusCb(IntPtr player, int type);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_seek_cb")]
+ //internal static extern int SetMediaStreamSeekCb(IntPtr player, int type, player_media_stream_seek_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_media_stream_seek_cb")]
+ internal static extern int UnsetMediaStreamSeekCb(IntPtr player, int type);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_buffer_max_size")]
+ internal static extern int SetMediaStreamBufferMaxSize(IntPtr player, int type, ulong max_size);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_media_stream_buffer_max_size")]
+ internal static extern int GetMediaStreamBufferMaxSize(IntPtr player, int type, out ulong max_size);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_media_stream_buffer_min_threshold")]
+ internal static extern int SetMediaStreamBufferMinThreshold(IntPtr player, int type, uint percent);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_media_stream_buffer_min_threshold")]
+ internal static extern int GetMediaStreamBufferMinThreshold(IntPtr player, int type, out uint percent);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_get_equalizer_bands_count")]
+ internal static extern int AudioEffectGetEqualizerBandsCount(IntPtr player, out int count);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_set_equalizer_band_level")]
+ internal static extern int AudioEffectSetEqualizerBandLevel(IntPtr player, int index, int level);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_get_equalizer_band_level")]
+ internal static extern int AudioEffectGetEqualizerBandLevel(IntPtr player, int index, out int level);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_set_equalizer_all_bands")]
+ internal static extern int AudioEffectSetEqualizerAllBands(IntPtr player, out int band_levels, int length);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_get_equalizer_level_range")]
+ internal static extern int AudioEffectGetEqualizerLevelRange(IntPtr player, out int min, out int max);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_get_equalizer_band_frequency")]
+ internal static extern int AudioEffectGetEqualizerBandFrequency(IntPtr player, int index, out int frequency);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_get_equalizer_band_frequency_range")]
+ internal static extern int AudioEffectGetEqualizerBandFrequencyRange(IntPtr player, int index, out int range);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_equalizer_clear")]
+ internal static extern int AudioEffectEqualizerClear(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_audio_effect_equalizer_is_available")]
+ internal static extern int AudioEffectEqualizerIsAvailable(IntPtr player, out bool available);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_display_mode")]
+ internal static extern int SetDisplayMode(IntPtr player, int mode);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_display_mode")]
+ internal static extern int GetDisplayMode(IntPtr player, out int mode);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_display_visible")]
+ internal static extern int SetDisplayVisible(IntPtr player, bool visible);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_is_display_visible")]
+ internal static extern int IsDisplayVisible(IntPtr player, out bool visible);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_display_rotation")]
+ internal static extern int SetDisplayRotation(IntPtr player, int rotation);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_display_rotation")]
+ internal static extern int GetDisplayRotation(IntPtr player, out int rotation);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_content_info")]
+ internal static extern int GetContentInfo(IntPtr player, int key, out string value);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_codec_info")]
+ internal static extern int GetCodecInfo(IntPtr player, out string audio_codec, out string video_codec);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_audio_stream_info")]
+ internal static extern int GetAudioStreamInfo(IntPtr player, out int sample_rate, out int channel, out int bit_rate);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_video_stream_info")]
+ internal static extern int GetVideoStreamInfo(IntPtr player, out int fps, out int bit_rate);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_album_art")]
+ internal static extern int GetAlbumArt(IntPtr player, out IntPtr album_art, out int size);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_video_size")]
+ internal static extern int GetVideoSize(IntPtr player, out int width, out int height);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_duration")]
+ internal static extern int GetDuration(IntPtr player, out int duration);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_subtitle_path")]
+ internal static extern int SetSubtitlePath(IntPtr player, string path);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_subtitle_updated_cb")]
+ //internal static extern int SetSubtitleUpdatedCb(IntPtr player, player_subtitle_updated_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_subtitle_updated_cb")]
+ internal static extern int UnsetSubtitleUpdatedCb(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_set_subtitle_position_offset")]
+ internal static extern int SetSubtitlePositionOffset(IntPtr player, int millisecond);
+
+ //[DllImport(Libraries.Player, EntryPoint = "player_set_video_stream_changed_cb")]
+ //internal static extern int SetVideoStreamChangedCb(IntPtr player, player_video_stream_changed_cb callback, IntPtr user_data);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_unset_video_stream_changed_cb")]
+ internal static extern int UnsetVideoStreamChangedCb(IntPtr player);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_track_count")]
+ internal static extern int GetTrackCount(IntPtr player, int type, out int count);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_select_track")]
+ internal static extern int SelectTrack(IntPtr player, int type, int index);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_current_track")]
+ internal static extern int GetCurrentTrack(IntPtr player, int type, out int index);
+
+ [DllImport(Libraries.Player, EntryPoint = "player_get_track_language_code")]
+ internal static extern int GetTrackLanguageCode(IntPtr player, int type, int index, out string code);
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Audio effect
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+using System.Collections.Generic;
+
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Audio effect
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties and API that are required for setting
+ /// audio effects of a player.
+ /// </remarks>
+ public class AudioEffect
+ {
+
+ /// <summary>
+ /// Set/Get Equalizer band level, frequency and range.
+ /// </summary>
+ /// <value> EqualizerBand </value>
+ public IList<EqualizerBand> EqualizerBands
+ {
+ set
+ {
+ _bands = value;
+ foreach(EqualizerBand band in _bands)
+ {
+ if (Interop.PlayerInterop.AudioEffectSetEqualizerBandLevel (_playerHandle, _bands.IndexOf (band), band.Level) != 0) {
+ // throw Exception;
+ }
+ }
+
+ }
+ get
+ {
+ return _bands;
+ }
+ }
+
+ /// <summary>
+ /// Get Min level.
+ /// </summary>
+ /// <value> Minimum level </value>
+ public int MinLevel
+ {
+ get
+ {
+ int min, max;
+ if (Interop.PlayerInterop.AudioEffectGetEqualizerLevelRange (_playerHandle, out min, out max) != 0) {
+ //throw Exception;
+ }
+ return min;
+ }
+ }
+
+ /// <summary>
+ /// Get Min level.
+ /// </summary>
+ /// <value> Maximum level </value>
+ public int MaxLevel
+ {
+ get
+ {
+ int min, max;
+ if (Interop.PlayerInterop.AudioEffectGetEqualizerLevelRange (_playerHandle, out min, out max) != 0) {
+ //throw Exception;
+ }
+ return max;
+ }
+ }
+
+ /// <summary>
+ /// Get equalizer avaialbility.
+ /// </summary>
+ /// <value> true, false </value>
+ public bool Available
+ {
+ get
+ {
+ bool available = false;
+ if (Interop.PlayerInterop.AudioEffectEqualizerIsAvailable (_playerHandle, out available) != 0) {
+ //throw Exception;
+ }
+ return available;
+ }
+ }
+
+
+ internal IntPtr _playerHandle;
+
+ IList<EqualizerBand> _bands;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// This File contains BufferStatusEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// BufferStatus event arguments
+ /// </summary>
+ /// <remarks>
+ /// BufferStatus event arguments
+ /// </remarks>
+ public class BufferStatusEventArgs : EventArgs
+ {
+
+ /// <summary>
+ /// Get stream type.
+ /// </summary>
+ /// <value> Audio, Video, Text </value>
+ public StreamType StreamType
+ {
+ get
+ {
+ return _streamType;
+ }
+ }
+
+ /// <summary>
+ /// Get buffering status.
+ /// </summary>
+ /// <value> Underrun, Overflow </value>
+ public StreamingBufferStatus Status
+ {
+ get
+ {
+ return _status;
+ }
+ }
+
+ internal StreamingBufferStatus _status;
+ internal StreamType _streamType;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/// This File contains BufferingProgressChangedEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// BufferingProgress event arguments
+ /// </summary>
+ /// <remarks>
+ /// BufferingProgress event arguments
+ /// </remarks>
+ public class BufferingProgressEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get buffering percentage.
+ /// </summary>
+ /// <value> 0 - 100 </value>
+ public int Percent
+ {
+ get
+ {
+ return _percent;
+ }
+ }
+
+ internal int _percent;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Display
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Display
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties and API that are required for setting
+ /// display configurations of a player.
+ /// </remarks>
+ public class Display
+ {
+
+ /// <summary>
+ /// Set/Get Display mode.
+ /// </summary>
+ /// <value> LetterBox, OriginalSize, FullScreen, CroppedFull, OriginalOrFull, DstRoi </value>
+ public DisplayMode Mode
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetDisplayMode (_playerHandle, (int)value) == 0) {
+ _displayMode = value;
+ } else {
+ //throw Exception
+ }
+ }
+ get
+ {
+ return _displayMode;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get IsVisible.
+ /// </summary>
+ /// <value> true, false </value>
+ public bool IsVisible
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetDisplayVisible (_playerHandle, value) == 0) {
+ _isVisible = value;
+ } else {
+ //throw Exception
+ }
+ }
+ get
+ {
+ return _isVisible;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get Display rotation.
+ /// </summary>
+ /// <value> RotationNone, Rotation90, Rotation180, Rotation270 </value>
+ public DisplayRotation Rotation
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetDisplayRotation (_playerHandle, (int)value) == 0) {
+ _rotation = value;
+ } else {
+ //throw Exception
+ }
+ }
+ get
+ {
+ return _rotation;
+ }
+ }
+
+
+
+ /// <summary>
+ /// Constructor - sets video display </summary>
+ /// <param name="displayType"> display type</param>
+ public Display(DisplayType displayType)
+ {
+ }
+
+
+ internal IntPtr _playerHandle;
+ internal DisplayMode _displayMode;
+ internal bool _isVisible;
+ internal DisplayRotation _rotation;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Download progress
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// DownloadProgress
+ /// </summary>
+ /// <remarks>
+ /// Contains Download progress
+ /// </remarks>
+ public class DownloadProgress
+ {
+ /// <summary>
+ /// Get Start position in percentage.
+ /// </summary>
+ /// <value> 0 to 100 </value>
+ public int Start;
+
+ /// <summary>
+ /// Get Current position in percentage.
+ /// </summary>
+ /// <value> 0 to 100 </value>
+ public int Current;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Equalizer Band
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// Equalizer band
+ /// </summary>
+ /// <remarks>
+ /// Contains Equalizer properties
+ /// </remarks>
+ public class EqualizerBand
+ {
+ /// <summary>
+ /// Set/Get new gain in decibel that is set to the given band [dB]
+ /// </summary>
+ /// <value> int level </value>
+ public int Level { set; get;}
+
+ /// <summary>
+ /// Get frequency of the given band [dB] .
+ /// </summary>
+ /// <value> int frequency</value>
+ public int Frequency
+ {
+ get
+ {
+ return _frequency;
+ }
+ }
+
+ /// <summary>
+ /// Getfrequency range of the given band [dB].
+ /// </summary>
+ /// <value> int range </value>
+ public int Range
+ {
+ get
+ {
+ return _range;
+ }
+ }
+
+ internal int _frequency;
+ internal int _range;
+ }
+}
\ No newline at end of file
--- /dev/null
+using System;
+
+namespace Tizen.Multimedia
+{
+ public class MediaBufferSource : MediaSource
+ {
+ public MediaBufferSource (byte[] buffer)
+ {
+ }
+ }
+}
+
--- /dev/null
+/// Mediasource
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+
+namespace Tizen.Multimedia
+{
+ public abstract class MediaSource
+ {
+ }
+}
+
--- /dev/null
+/// Media Stream\r
+///\r
+/// Copyright 2016 by Samsung Electronics, Inc.,\r
+///\r
+/// This software is the confidential and proprietary information\r
+/// of Samsung Electronics, Inc. ("Confidential Information"). You\r
+/// shall not disclose such Confidential Information and shall use\r
+/// it only in accordance with the terms of the license agreement\r
+/// you entered into with Samsung.\r
+\r
+using System;\r
+\r
+namespace Tizen.Multimedia\r
+{\r
+ /// <summary>\r
+ /// MediaStream\r
+ /// </summary>\r
+ /// <remarks>\r
+ /// MediaStream class for media stream configuration.\r
+ /// </remarks>\r
+\r
+ class MediaStream\r
+ {\r
+ /// <summary>\r
+ /// Get/Set Audio Media format.\r
+ /// </summary>\r
+ /// <value> MediaFormat </value>\r
+ //public MediaFormat AudioMediaFormat { get; set; }\r
+\r
+ /// <summary>\r
+ /// Get/Set Video Media format.\r
+ /// </summary>\r
+ /// <value> MediaFormat </value>\r
+ //public MediaFormat VideoMediaFormat { get; set; }\r
+\r
+ /// <summary>\r
+ /// Get/Set Audio configuration.\r
+ /// </summary>\r
+ /// <value> MediaStreamConfiguration </value>\r
+ public MediaStreamConfiguration AudioConfiguration \r
+ {\r
+ get\r
+ {\r
+ return _audioConfiguration;\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Get/Set Video configuration.\r
+ /// </summary>\r
+ /// <value> MediaStreamConfiguration </value>\r
+ public MediaStreamConfiguration VideoConfiguration \r
+ {\r
+ get\r
+ {\r
+ return _videoConfiguration;\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Get/Set Video Media format.\r
+ /// </summary>\r
+ /// <value> MediaFormat </value>\r
+ //public MediaFormat VideoMediaFormat { get; set; }\r
+\r
+\r
+ /// <summary>\r
+ /// Push Media stream </summary>\r
+ /// <param name="packet"> media packet</param>\r
+ //public void PushMediaStream(MediaPacket packet);\r
+\r
+\r
+ internal MediaStreamConfiguration _audioConfiguration;\r
+ internal MediaStreamConfiguration _videoConfiguration;\r
+ }\r
+}\r
--- /dev/null
+/// Media Stream configuration
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// MediaStream configuration
+ /// </summary>
+ /// <remarks>
+ /// MediaStreamConfiguration class for media stream configuration.
+ /// </remarks>
+
+ public class MediaStreamConfiguration
+ {
+
+ /// <summary>
+ /// BufferStatusChanged event is raised when buffer underrun or overflow occurs.
+ /// </summary>
+ public event EventHandler<BufferStatusEventArgs> BufferStatusChanged;
+
+ /// <summary>
+ /// SeekOffsetChanged event is raised when seeking occurs.
+ /// </summary>
+ public event EventHandler<SeekOffsetEventArgs> SeekOffsetChanged;
+
+
+
+ /// <summary>
+ /// max size bytes of buffer </summary>
+ /// <value> Max size in bytes </value>
+ public ulong BufferMaxSize { get; set; }
+
+ /// <summary>
+ /// Min threshold </summary>
+ /// <value> min threshold in bytes </value>
+ public uint BufferMinThreshold { get; set; }
+
+ }
+}
--- /dev/null
+using System;
+
+namespace Tizen.Multimedia
+{
+ public class MediaStreamSource
+ {
+
+ /// <summary>
+ /// Get audio stream configuration.
+ /// </summary>
+ /// <value> Audio StreamConfiguration </value>
+ public MediaStreamConfiguration AudioConfiguration
+ {
+ get
+ {
+ return _audioConfiguration;
+ }
+ }
+
+ /// <summary>
+ /// Get video stream configuration.
+ /// </summary>
+ /// <value> Video StreamConfiguration </value>
+ public MediaStreamConfiguration VideoConfiguration
+ {
+ get
+ {
+ return _videoConfiguration;
+ }
+ }
+
+ public MediaStreamSource ()
+ {
+ }
+
+ /// <summary>
+ /// Get/Set Media format.
+ /// </summary>
+ /// <value> AudioMediaFormat </value>
+ /// TODO: implement media format
+ //MediaFormat AudioMediaFormat {set; get;}
+
+ /// <summary>
+ /// Get/Set Media format.
+ /// </summary>
+ /// <value> VideoMediaFormat </value>
+ /// TODO: implement media format
+ //MediaFormat VideoMediaFormat {set; get;}
+
+
+ internal MediaStreamConfiguration _audioConfiguration;
+ internal MediaStreamConfiguration _videoConfiguration;
+ }
+}
+
--- /dev/null
+using System;
+
+namespace Tizen.Multimedia
+{
+ public class MediaUriSource : MediaSource
+ {
+ public MediaUriSource (string uri)
+ {
+ _uri = uri;
+ }
+
+ internal string _uri;
+ }
+}
+
--- /dev/null
+/// This File contains PlaybackCompletedEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// PlaybackCompleted event arguments
+ /// </summary>
+ /// <remarks>
+ /// PlaybackCompleted event arguments
+ /// </remarks>
+ public class PlaybackCompletedEventArgs : EventArgs
+ {
+ }
+}
\ No newline at end of file
--- /dev/null
+/// This File contains PlaybackErrorEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// PlaybackError event arguments
+ /// </summary>
+ /// <remarks>
+ /// PlaybackError event arguments
+ /// </remarks>
+ public class PlaybackErrorEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get the error code.
+ /// </summary>
+ /// <value> integer error code</value>
+ public int ErrorCode
+ {
+ get
+ {
+ return _errorCode;
+ }
+ }
+
+ internal int _errorCode;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/// This File contains PlaybackInterruptedEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// PlaybackInterrupted event arguments
+ /// </summary>
+ /// <remarks>
+ /// PlaybackInterrupted event arguments
+ /// </remarks>
+ public class PlaybackInterruptedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get the error code.
+ /// </summary>
+ /// <value> integer error code</value>
+ public int InterruptedCode
+ {
+ get
+ {
+ return _interruptedCode;
+ }
+ }
+
+ internal int _interruptedCode;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Player
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+using System.Threading.Tasks;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// The Player class provides APIs required for playback.
+ /// </summary>
+ /// <remarks>
+ /// The Player APIs provides functions to create a player, set media filename/url
+ /// and play the media content. It also provides APIs to adjust the configurations
+ /// of the player such as playback rate, volume, looping etc. And, event handlers
+ /// handles are provided to handle various playback events (like playback error/completion)
+ /// </remarks>
+ public class Player
+ {
+ /// <summary>
+ /// PlaybackCompleted event is raised when playback of a media is finished
+ /// </summary>
+ public event EventHandler<PlaybackCompletedEventArgs> PlaybackCompleted;
+
+ /// <summary>
+ /// PlaybackInterruped event is raised when playback of a media is interrupted
+ /// </summary>
+ public event EventHandler<PlaybackInterruptedEventArgs> PlaybackInterruped;
+
+ /// <summary>
+ /// PlaybackErrorOccured event is raised when any error occurs
+ /// </summary>
+ public event EventHandler<PlaybackErrorEventArgs> PlaybackErrorOccured;
+
+ /// <summary>
+ /// VideoFrameCaptured event is raised when a video frame is decoded
+ /// </summary>
+ public event EventHandler<VideoFrameDecodedEventArgs> VideoFrameDecoded;
+
+ /// <summary>
+ /// Get Player state.
+ /// </summary>
+ /// <value> PlayerState </value>
+ public PlayerState State
+ {
+ get
+ {
+ int state;
+ if (Interop.PlayerInterop.GetState (_playerHandle, out state) != 0) {
+ //throw Exception;
+ }
+ return (PlayerState)state;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get the left volume level.
+ /// </summary>
+ /// <value> 0 to 1.0 that indicates left volume level </value>
+ public float LeftVolume
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetVolume (_playerHandle, value, _rightVolume) == 0)
+ _leftVolume = value;
+ //else
+ // throw Exception;
+ }
+ get
+ {
+ //Interop.PlayerInterop.GetVolume (_playerHandle, out _leftVolume, out _rightVolume);
+ return _leftVolume;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get the right volume level.
+ /// </summary>
+ /// <value> 0 to 1.0 that indicates right volume level </value>
+ public float RightVolume
+ {
+ set
+ {
+ if ( Interop.PlayerInterop.SetVolume (_playerHandle, _leftVolume, value) == 0 )
+ _rightVolume = value;
+ //else
+ // throw Exception;
+ }
+ get
+ {
+ //Interop.PlayerInterop.GetVolume (_playerHandle, out _leftVolume, out _rightVolume);
+ return _rightVolume;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get the Audio Latency Mode.
+ /// </summary>
+ /// <value> Low, Mid, High </value>
+ public AudioLatencyMode AudioLatencyMode
+ {
+ set
+ {
+ if (_audioLatencyMode != (int)value && Interop.PlayerInterop.SetAudioLatencyMode (_playerHandle, (int)value) == 0)
+ _audioLatencyMode = (int) value;
+ //else
+ // throw Exception;
+ }
+
+ get
+ {
+ return (AudioLatencyMode)_audioLatencyMode;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get mute.
+ /// </summary>
+ /// <value> true, false </value>
+ public bool Mute
+ {
+ set
+ {
+ if (_mute != value && Interop.PlayerInterop.SetMute (_playerHandle, value) == 0)
+ _mute = value;
+ //else
+ // throw Exception;
+ }
+ get
+ {
+ //Interop.PlayerInterop.IsMuted (_playerHandle, out _mute);
+ return _mute;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get Loop play.
+ /// </summary>
+ /// <value> true, false </value>
+ public bool IsLooping
+ {
+ set
+ {
+ if (_isLooping != value && Interop.PlayerInterop.SetLooping (_playerHandle, value) == 0)
+ _isLooping = value;
+ //else
+ // throw Exception;
+ }
+ get
+ {
+ //Interop.PlayerInterop.IsLooping (_playerHandle, out _isLooping);
+ return _isLooping;
+ }
+ }
+
+ /// <summary>
+ /// Set playback rate.
+ /// </summary>
+ /// <value> -5.0x to 5.0x </value>
+ public float PlaybackRate
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetPlaybackRate (_playerHandle, value) != 0) {
+ //throw Exception;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Set/Get sound type.
+ /// </summary>
+ /// <value> System, Notification, Alarm, Ringtone, Media, Call, Voip, Voice </value>
+ public SoundType PlayerSoundType
+ {
+ set
+ {
+ if (_soundType != value && Interop.PlayerInterop.SetSoundType (_playerHandle, (int)value) != 0)
+ _soundType = value;
+ //else
+ // throw Exception;
+ }
+ get
+ {
+ return _soundType;
+ }
+ }
+
+ /// <summary>
+ /// Get play position.
+ /// </summary>
+ /// <value> play position in milli seconds </value>
+ public int PlayPosition
+ {
+ get
+ {
+ int playPosition;
+ if (Interop.PlayerInterop.GetPlayPosition (_playerHandle, out playPosition) != 0) {
+ //throw Exception;
+ }
+ return playPosition;
+ }
+ }
+
+ /// <summary>
+ /// Set sound stream.
+ /// </summary>
+ /// <value> Sound stream </value>
+ //public SoundStream SoundStream { set; }
+
+ /// <summary>
+ /// Set/Get Display.
+ /// </summary>
+ /// <value> Display configuration </value>
+ public Display Display
+ {
+ set
+ {
+ _display = value;
+ _display._playerHandle = _playerHandle;
+ }
+ get
+ {
+ return _display;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get Subtitle.
+ /// </summary>
+ /// <value> Subtitle configuration </value>
+ public Subtitle Subtitle
+ {
+ set
+ {
+ _subtitle = value;
+ _subtitle._playerHandle = _playerHandle;
+ }
+ get
+ {
+ return _subtitle;
+ }
+ }
+
+
+ /// <summary>
+ /// Get AudioEffect.
+ /// </summary>
+ /// <value> AudioEffect object </value>
+ public AudioEffect AudioEffect
+ {
+ get
+ {
+ return _audioEffect;
+ }
+ }
+
+ /// <summary>
+ /// Get stream information.
+ /// </summary>
+ /// <value> StreamInformation object </value>
+ public StreamInformation StreamInformation
+ {
+ get
+ {
+ return _streamInformation;
+ }
+ }
+
+ /// <summary>
+ /// Get StreamingConfiguration.
+ /// </summary>
+ /// <value> StreamingConfiguration object </value>
+ public StreamingConfiguration StreamingConfiguration
+ {
+ get
+ {
+ return _streamingConfiguration;
+ }
+ }
+
+ /// <summary>
+ /// Player constructor.</summary>
+ public Player()
+ {
+ // Throw exception on error returns?
+ Interop.PlayerInterop.Create (out _playerHandle);
+
+ // Initial get values
+ Interop.PlayerInterop.GetVolume (_playerHandle, out _leftVolume, out _rightVolume);
+ Interop.PlayerInterop.GetAudioLatencyMode (_playerHandle, out _audioLatencyMode);
+ Interop.PlayerInterop.IsMuted (_playerHandle, out _mute);
+ Interop.PlayerInterop.IsLooping (_playerHandle, out _isLooping);
+
+
+ // AudioEffect
+ _audioEffect = new AudioEffect();
+ _audioEffect._playerHandle = _playerHandle;
+
+ // Display
+ _display = new Display(DisplayType.Evas /* Default value? */);
+ _display._playerHandle = _playerHandle;
+
+
+ // StreamingConfiguration
+ _streamingConfiguration = new StreamingConfiguration();
+ _streamingConfiguration._playerHandle = _playerHandle;
+
+ // StreamInformation
+ _streamInformation = new StreamInformation ();
+ _streamInformation._playerHandle = _playerHandle;
+ _streamInformation._contentInfo = new PlayerContentInfo ();
+ _streamInformation._contentInfo._playerHandle = _playerHandle;
+
+ // Subtitle
+ _subtitle = new Subtitle();
+ _subtitle._playerHandle = _playerHandle;
+
+ }
+
+ /// <summary>
+ /// Player destructor
+ /// </summary>
+ ~Player()
+ {
+ }
+
+ /// <summary>
+ /// Prepares the media player for playback. </summary>
+ /// TODO: make async
+ public /*Task<void>*/void PrepareAsync()
+ {
+ if ((Interop.PlayerInterop.Prepare (_playerHandle)) != 0) {
+ //throw Exception;
+ }
+ }
+
+ /// <summary>
+ /// The most recently used media is reset and no longer associated with the player. Playback is no longer possible.
+ /// If you want to use the player again, you will have to set the data URI and call prepare() again. </summary>
+ public void Unrepare()
+ {
+ if (Interop.PlayerInterop.Unprepare (_playerHandle) != 0) {
+ //throw Exception;
+ }
+ }
+
+ /// <summary>
+ /// Starts or resumes playback. </summary>
+ public void Start()
+ {
+ if (Interop.PlayerInterop.Start (_playerHandle) != 0) {
+ //throw Exception;
+ }
+ }
+
+ /// <summary>
+ /// Stops playing media content. </summary>
+ public void Stop()
+ {
+ if (Interop.PlayerInterop.Stop (_playerHandle) != 0) {
+ //throw Exception;
+ }
+ }
+
+ /// <summary>
+ /// Pauses the player. </summary>
+ public void Pause()
+ {
+ if (Interop.PlayerInterop.Pause (_playerHandle) != 0) {
+ //throw Exception;
+ }
+ }
+
+ /// <summary>
+ /// sets media source for the player. </summary>
+ /// <param name="source"> Mediasource </param>
+ /// TODO: implement memory buffer and packet stream
+ public void SetSource(MediaSource source)
+ {
+ if (source.GetType() == typeof(MediaUriSource)) {
+ if ( Interop.PlayerInterop.SetUri (_playerHandle, ((MediaUriSource)source)._uri) != 0) {
+ // throw Exception
+ }
+ }
+ }
+
+
+ /// <summary>
+ /// Captures a video frame asynchronously. </summary>
+ Task<VideoFrameCapture> CaptureVideoAsync()
+ {
+ return null;
+ }
+
+ /// <summary>
+ ///Sets the seek position for playback, asynchronously. </summary>
+ /// <param name="milliseconds"> Position to be set in milliseconds</param>
+ /// <param name="accurate"> accurate seek or not</param>
+ //public Task<void> SetPlayPositionAsync(int milliseconds, bool accurate)
+ //{
+ //}
+
+
+ internal PlayerState _state;
+ internal float _leftVolume;
+ internal float _rightVolume;
+ internal int _audioLatencyMode;
+ internal bool _mute;
+ internal bool _isLooping;
+ internal SoundType _soundType;
+
+ internal Display _display;
+ internal Subtitle _subtitle;
+ internal AudioEffect _audioEffect;
+ internal StreamInformation _streamInformation;
+ internal StreamingConfiguration _streamingConfiguration;
+
+ internal IntPtr _playerHandle;
+ }
+}
--- /dev/null
+/// PlayerContentInfo
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// PlayerContentInfo
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties for metadata information of media file.
+ /// </remarks>
+
+ public class PlayerContentInfo
+ {
+ enum ContentInfoKey
+ {
+ Album,
+ Artist,
+ Author,
+ Genre,
+ Title,
+ Year
+ }
+
+ /// <summary>
+ /// Metadata - Album
+ /// </summary>
+ /// <value> album string </value>
+ public string Album
+ {
+ get
+ {
+ string album;
+ if (Interop.PlayerInterop.GetContentInfo (_playerHandle, (int)ContentInfoKey.Album, out album) != 0) {
+ // throw Exception;
+ }
+ return album;
+ }
+ }
+
+ /// <summary>
+ /// Metadata - Artist
+ /// </summary>
+ /// <value> artist string </value>
+ public string Artist
+ {
+ get
+ {
+ string artist;
+ if (Interop.PlayerInterop.GetContentInfo (_playerHandle, (int)ContentInfoKey.Artist, out artist) != 0) {
+ // throw Exception;
+ }
+ return artist;
+ }
+ }
+
+ /// <summary>
+ /// Metadata - Author
+ /// </summary>
+ /// <value> Author string </value>
+ public string Author
+ {
+ get
+ {
+ string author;
+ if (Interop.PlayerInterop.GetContentInfo (_playerHandle, (int)ContentInfoKey.Author, out author) != 0) {
+ // throw Exception;
+ }
+ return author;
+ }
+ }
+
+ /// <summary>
+ /// Metadata - Genre
+ /// </summary>
+ /// <value> genre string </value>
+ public string Genre
+ {
+ get
+ {
+ string genre;
+ if (Interop.PlayerInterop.GetContentInfo (_playerHandle, (int)ContentInfoKey.Genre, out genre) != 0) {
+ // throw Exception;
+ }
+ return genre;
+ }
+ }
+
+ /// <summary>
+ /// Metadata - Title
+ /// </summary>
+ /// <value> title string </value>
+ public string Title
+ {
+ get
+ {
+ string title;
+ if (Interop.PlayerInterop.GetContentInfo (_playerHandle, (int)ContentInfoKey.Title, out title) != 0) {
+ // throw Exception;
+ }
+ return title;
+ }
+ }
+
+ /// <summary>
+ /// Metadata - Year
+ /// </summary>
+ /// <value> year string </value>
+ public string Year
+ {
+ get
+ {
+ string year;
+ if (Interop.PlayerInterop.GetContentInfo (_playerHandle, (int)ContentInfoKey.Year, out year) != 0) {
+ // throw Exception;
+ }
+ return year;
+ }
+ }
+
+ internal IntPtr _playerHandle;
+ }
+}
--- /dev/null
+using System;\r
+\r
+namespace Tizen.Multimedia\r
+{\r
+ /// <summary>\r
+ /// Enumeration for player state\r
+ /// </summary>\r
+ public enum PlayerState\r
+ {\r
+ /// <summary>\r
+ /// Player is not created \r
+ /// </summary>\r
+ None,\r
+\r
+ /// <summary>\r
+ /// Player is created, but not prepared \r
+ /// </summary>\r
+ Idle,\r
+\r
+ /// <summary>\r
+ /// Player is ready to play media \r
+ /// </summary>\r
+ Ready,\r
+\r
+ /// <summary>\r
+ /// Player is playing media \r
+ /// </summary>\r
+ Playing,\r
+\r
+ /// <summary>\r
+ /// Player is paused while playing media \r
+ /// </summary>\r
+ Paused,\r
+ }\r
+\r
+ /// <summary>\r
+ /// Enumeration for player display type\r
+ /// </summary>\r
+ public enum DisplayType\r
+ {\r
+ /// <summary>\r
+ /// Overlay surface display \r
+ /// </summary>\r
+ Overlay,\r
+\r
+ /// <summary>\r
+ /// Evas image object surface display \r
+ /// </summary>\r
+ Evas,\r
+\r
+ /// <summary>\r
+ /// This disposes off buffers \r
+ /// </summary>\r
+ None,\r
+ }\r
+\r
+\r
+ /// <summary>\r
+ /// Enumeration for player audio latency mode\r
+ /// </summary>\r
+ public enum AudioLatencyMode\r
+ {\r
+ /// <summary>\r
+ /// Low audio latency mode \r
+ /// </summary>\r
+ Low,\r
+\r
+ /// <summary>\r
+ /// Middle audio latency mode \r
+ /// </summary>\r
+ Mid,\r
+\r
+ /// <summary>\r
+ /// High audio latency mode \r
+ /// </summary>\r
+ High,\r
+ }\r
+\r
+\r
+ /// <summary>\r
+ /// Enumeration for player display rotation\r
+ /// </summary>\r
+ public enum DisplayRotation\r
+ {\r
+ /// <summary>\r
+ /// Display is not rotated \r
+ /// </summary>\r
+ RotationNone,\r
+\r
+ /// <summary>\r
+ /// Display is rotated 90 degrees \r
+ /// </summary>\r
+ Rotation90,\r
+\r
+ /// <summary>\r
+ /// Display is rotated 180 degrees \r
+ /// </summary>\r
+ Rotation180,\r
+\r
+ /// <summary>\r
+ /// Display is rotated 270 degrees \r
+ /// </summary>\r
+ Rotation270\r
+ }\r
+\r
+\r
+ /// <summary>\r
+ /// Enumeration for player display mode\r
+ /// </summary>\r
+ public enum DisplayMode\r
+ {\r
+ /// <summary>\r
+ /// Letter box \r
+ /// </summary>\r
+ LetterBox,\r
+\r
+ /// <summary>\r
+ /// Origin size\r
+ /// </summary>\r
+ OriginalSize,\r
+\r
+ /// <summary>\r
+ /// Full-screen \r
+ /// </summary>\r
+ FullScreen,\r
+\r
+ /// <summary>\r
+ /// Cropped full-screen \r
+ /// </summary>\r
+ CroppedFull,\r
+\r
+ /// <summary>\r
+ /// Origin size (if surface size is larger than video size(width/height)) or \r
+ /// Letter box (if video size(width/height) is larger than surface size) \r
+ /// </summary>\r
+ OriginalOrFull,\r
+\r
+ /// <summary>\r
+ /// Dst ROI mode \r
+ /// </summary>\r
+ DstRoi\r
+ }\r
+\r
+\r
+ /// <summary>\r
+ /// Enumeration for player stream type\r
+ /// </summary>\r
+ public enum StreamType\r
+ {\r
+ /// <summary>\r
+ /// Container type \r
+ /// </summary>\r
+ Default,\r
+\r
+ /// <summary>\r
+ /// Audio element stream type \r
+ /// </summary>\r
+ Audio,\r
+\r
+ /// <summary>\r
+ /// Video element stream type \r
+ /// </summary>\r
+ Video,\r
+\r
+ /// <summary>\r
+ /// Text type \r
+ /// </summary>\r
+ Text\r
+ }\r
+\r
+\r
+\r
+ /// <summary>\r
+ /// Enumeration for Progressive download message\r
+ /// </summary>\r
+ public enum ProgressiveDownloadMessage\r
+ {\r
+ /// <summary>\r
+ /// Progressive download is started \r
+ /// </summary>\r
+ Started,\r
+\r
+ /// <summary>\r
+ /// Progressive download is completed \r
+ /// </summary>\r
+ Completed,\r
+ }\r
+\r
+ /// <summary>\r
+ /// Streaming buffer status\r
+ /// </summary>\r
+ public enum StreamingBufferStatus\r
+ {\r
+ /// <summary>\r
+ /// Underrun\r
+ /// </summary>\r
+ Underrun,\r
+\r
+ /// <summary>\r
+ /// Completed \r
+ /// </summary>\r
+ Overflow,\r
+ }\r
+\r
+ /// <summary>\r
+ /// Enumeration for sound type\r
+ /// </summary>\r
+ public enum SoundType\r
+ {\r
+ /// <summary>\r
+ /// Sound type for system \r
+ /// </summary>\r
+ System,\r
+\r
+ /// <summary>\r
+ /// Sound type for notifications \r
+ /// </summary>\r
+ Notification,\r
+\r
+ /// <summary>\r
+ /// Sound type for alarm \r
+ /// </summary>\r
+ Alarm,\r
+\r
+ /// <summary>\r
+ /// Sound type for ringtones \r
+ /// </summary>\r
+ Ringtone,\r
+\r
+ /// <summary>\r
+ /// Sound type for media \r
+ /// </summary>\r
+ Media,\r
+\r
+ /// <summary>\r
+ /// Sound type for call \r
+ /// </summary>\r
+ Call,\r
+\r
+ /// <summary>\r
+ /// Sound type for voip\r
+ /// </summary>\r
+ Voip,\r
+\r
+ /// <summary>\r
+ /// Sound type for voice \r
+ /// </summary>\r
+ Voice\r
+ }\r
+\r
+ /// <summary>\r
+ /// Enumeration for source type\r
+ /// </summary>\r
+ public enum PlayerSourceType\r
+ {\r
+ /// <summary>\r
+ /// Uri source \r
+ /// </summary>\r
+ Uri,\r
+\r
+ /// <summary>\r
+ /// memory buffer source \r
+ /// </summary>\r
+ Memory,\r
+\r
+ /// <summary>\r
+ /// stream source \r
+ /// </summary>\r
+ Stream,\r
+ }\r
+\r
+}\r
--- /dev/null
+using System;\r
+\r
+\r
+namespace Tizen.Multimedia\r
+{\r
+ abstract class PlayerSource\r
+ {\r
+ PlayerSourceType Type;\r
+ }\r
+}\r
--- /dev/null
+/// This File contains ProgressiveDownloadMessageEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// ProgressiveDownloadMessage event arguments
+ /// </summary>
+ /// <remarks>
+ /// ProgressiveDownloadMessage event arguments
+ /// </remarks>
+ public class ProgressiveDownloadMessageEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get Progressive download message.
+ /// </summary>
+ /// <value> 0 - 100 </value>
+ public ProgressiveDownloadMessage Message
+ {
+ get
+ {
+ return _message;
+ }
+ }
+
+ internal ProgressiveDownloadMessage _message;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Progressive Download Status
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// DownloadProgress
+ /// </summary>
+ /// <remarks>
+ /// Contains Progressive download status
+ /// </remarks>
+ public class ProgressiveDownloadStatus
+ {
+ /// <summary>
+ /// Get current download position (bytes)
+ /// </summary>
+ /// <value> current download position </value>
+ public ulong Current;
+
+ /// <summary>
+ /// Get total size of the file (bytes)
+ /// </summary>
+ /// <value> Total size of file (bytes) </value>
+ public ulong TotalSize;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// This File contains SeekOffsetEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// SeekOffset event arguments
+ /// </summary>
+ /// <remarks>
+ /// SeekOffset event arguments
+ /// </remarks>
+ public class SeekOffsetEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get seek offset.
+ /// </summary>
+ /// <value> byte position to seek </value>
+ public ulong Offset
+ {
+ get
+ {
+ return _offset;
+ }
+ }
+
+ internal ulong _offset;
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Source Factory\r
+///\r
+/// Copyright 2016 by Samsung Electronics, Inc.,\r
+///\r
+/// This software is the confidential and proprietary information\r
+/// of Samsung Electronics, Inc. ("Confidential Information"). You\r
+/// shall not disclose such Confidential Information and shall use\r
+/// it only in accordance with the terms of the license agreement\r
+/// you entered into with Samsung.\r
+\r
+using System;\r
+\r
+namespace Tizen.Multimedia\r
+{\r
+ /// <summary>\r
+ /// SourceFactory\r
+ /// </summary>\r
+ /// <remarks>\r
+ /// Factory class for getting player source.\r
+ /// </remarks>\r
+\r
+ class SourceFactory\r
+ {\r
+ /// <summary>\r
+ /// GetSource </summary>\r
+ /// <param name="uri"> source uri string </param>\r
+ /// <returns>PlayerSource</returns>\r
+ public static PlayerSource GetSource(string uri)\r
+ {\r
+ return null;\r
+ }\r
+\r
+ /// <summary>\r
+ /// GetSource </summary>\r
+ /// <param name="buffer"> memory buffer </param>\r
+ /// <returns>PlayerSource</returns>\r
+ public static PlayerSource GetSource(byte[] buffer)\r
+ {\r
+ return null;\r
+ }\r
+\r
+ /// <summary>\r
+ /// GetSource </summary>\r
+ /// <param name="mediastream"> media stream</param>\r
+ /// <returns>PlayerSource</returns>\r
+ public static PlayerSource GetSource(MediaStream mediaStream)\r
+ {\r
+ return null;\r
+ }\r
+ }\r
+}\r
--- /dev/null
+/// Audio Stream Information
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Stream information
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties and API that are required for fetching
+ /// metadata of a media stream.
+ /// </remarks>
+ public class StreamInformation
+ {
+
+ /// <summary>
+ /// Get album art.
+ /// </summary>
+ /// <value> byte[] </value>
+ public byte[] AlbumArt
+ {
+ get
+ {
+ return _albumArt;
+ }
+ }
+
+ /// <summary>
+ /// Get AudioCodec.
+ /// </summary>
+ /// <value> AudioCodec string </value>
+ public string AudioCodec
+ {
+ get
+ {
+ string audioCodec, videoCodec;
+ if (Interop.PlayerInterop.GetCodecInfo (_playerHandle, out audioCodec, out videoCodec) != 0) {
+ //throw Exception
+ }
+ return audioCodec;
+ }
+ }
+
+ /// <summary>
+ /// Get Duration.
+ /// </summary>
+ /// <value> duration in milliseconds </value>
+ public int Duration
+ {
+ get
+ {
+ int duration;
+ if (Interop.PlayerInterop.GetDuration (_playerHandle, out duration) != 0) {
+ //throw Exception
+ }
+ return duration;
+ }
+ }
+
+ /// <summary>
+ /// Get Sample rate.
+ /// </summary>
+ /// <value> The audio sample rate [Hz] </value>
+ public int AudioSampleRate
+ {
+ get
+ {
+ int sampleRate, channels, bitRate;
+ if( Interop.PlayerInterop.GetAudioStreamInfo(_playerHandle, out sampleRate, out channels, out bitRate) != 0) {
+ //throw Exception;
+ }
+ return sampleRate;
+ }
+ }
+
+ /// <summary>
+ /// Channels
+ /// </summary>
+ /// <value> The audio channels </value>
+ public int AudioChannels
+ {
+ get
+ {
+ int sampleRate, channels, bitRate;
+ if( Interop.PlayerInterop.GetAudioStreamInfo(_playerHandle, out sampleRate, out channels, out bitRate) != 0) {
+ //throw Exception;
+ }
+ return channels;
+ }
+ }
+
+ /// <summary>
+ /// Audio bit rate.
+ /// </summary>
+ /// <value> bit rate [Hz] </value>
+ public int AudioBitRate
+ {
+ get
+ {
+ int sampleRate, channels, bitRate;
+ if( Interop.PlayerInterop.GetAudioStreamInfo(_playerHandle, out sampleRate, out channels, out bitRate) != 0) {
+ //throw Exception;
+ }
+ return bitRate;
+ }
+ }
+
+
+ /// <summary>
+ /// VideoCodec
+ /// </summary>
+ /// <value> video codec string </value>
+ public string VideoCodec
+ {
+ get
+ {
+ string audioCodec, videoCodec;
+ if (Interop.PlayerInterop.GetCodecInfo (_playerHandle, out audioCodec, out videoCodec) != 0) {
+ //throw Exception
+ }
+ return videoCodec;
+ }
+ }
+
+ /// <summary>
+ /// FPS
+ /// </summary>
+ /// <value> int Frames per second</value>
+ public int VideoFps
+ {
+ get
+ {
+ int fps, bitRate;
+ if (Interop.PlayerInterop.GetVideoStreamInfo (_playerHandle, out fps, out bitRate) != 0) {
+ //throw Exception;
+ }
+ return fps;
+ }
+ }
+
+ /// <summary>
+ /// Video bit rate.
+ /// </summary>
+ /// <value> bit rate [Hz] </value>
+ public int VideoBitRate
+ {
+ get
+ {
+ int fps, bitRate;
+ if (Interop.PlayerInterop.GetVideoStreamInfo (_playerHandle, out fps, out bitRate) != 0) {
+ //throw Exception;
+ }
+ return bitRate;
+ }
+ }
+
+ /// <summary>
+ /// Get Video Height.
+ /// </summary>
+ /// <value> video height </value>
+ public int VideoHeight
+ {
+ get
+ {
+ int height, width;
+ if (Interop.PlayerInterop.GetVideoSize (_playerHandle, out width, out height) != 0) {
+ //throw Exception;
+ }
+ return height;
+ }
+ }
+
+ /// <summary>
+ /// Get Video Width.
+ /// </summary>
+ /// <value> video width </value>
+ public int VideoWidth
+ {
+ get
+ {
+ int height, width;
+ if (Interop.PlayerInterop.GetVideoSize (_playerHandle, out width, out height) != 0) {
+ //throw Exception;
+ }
+ return width;
+ }
+ }
+
+ /// <summary>
+ /// Get Player content info.
+ /// </summary>
+ /// <value> metadata </value>
+ public PlayerContentInfo ContentInfo
+ {
+ get
+ {
+ return _contentInfo;
+ }
+ }
+
+ internal IntPtr _playerHandle;
+
+ internal byte[] _albumArt;
+ internal PlayerContentInfo _contentInfo;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Streaming configuration
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Streaming configuration
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties and API that are required for streaming
+ /// playback operations.
+ /// </remarks>
+ public class StreamingConfiguration
+ {
+ /// <summary>
+ /// BufferingProgressChanged event is raised when there is a change in the buffering status of a media stream
+ /// </summary>
+ public event EventHandler<BufferingProgressEventArgs> BufferingProgressChanged;
+
+ /// <summary>
+ /// ProgressiveDownloadMessageChanged event is raised when progressive download is started or completed.
+ /// </summary>
+ public event EventHandler<ProgressiveDownloadMessageEventArgs> ProgressiveDownloadMessageChanged;
+
+ /// <summary>
+ /// Video stream changed event is raised to notify the video stream changed.
+ /// </summary>
+ public event EventHandler<VideoStreamEventArgs> VideoStreamChanged;
+
+
+ /// <summary>
+ /// Set/Get Progressive download path.
+ /// </summary>
+ /// <value> path string </value>
+ public string ProgressiveDownloadPath
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetProgressiveDownloadPath (_playerHandle, value) != 0) {
+ // throw Exception
+ }
+ _progressiveDownloadPath = value;
+ }
+ get
+ {
+ return _progressiveDownloadPath;
+ }
+ }
+
+ /// <summary>
+ /// Get Streaming download Progress.
+ /// </summary>
+ /// <value> download progress int start and current [0 to 100] </value>
+ public DownloadProgress DownloadProgress
+ {
+ get
+ {
+ DownloadProgress progress = new DownloadProgress();
+ if (Interop.PlayerInterop.GetStreamingDownloadProgress (_playerHandle, out progress.Start, out progress.Current) != 0) {
+ // throw Exception;
+ }
+ return progress;
+ }
+ }
+
+ /// <summary>
+ /// Get progressive download status.
+ /// </summary>
+ /// <value> progressive download status ulong current and total size </value>
+ public ProgressiveDownloadStatus ProgressiveDownloadStatus
+ {
+ get
+ {
+ ProgressiveDownloadStatus status = new ProgressiveDownloadStatus ();
+ // TODO: interop
+ return status;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get cookie.
+ /// </summary>
+ /// <value> cookie string </value>
+ public string Cookie
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetStreamingCookie (_playerHandle, value, value.Length + 1) != 0) {
+ // throw Exception
+ }
+ _cookie = value;
+ }
+ get
+ {
+ return _cookie;
+ }
+ }
+
+ /// <summary>
+ /// Set/Get User agent.
+ /// </summary>
+ /// <value> user agent string </value>
+ public string UserAgent
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetStreamingUserAgent (_playerHandle, value, value.Length + 1) != 0) {
+ // throw Exception
+ }
+ _userAgent = value;
+ }
+ get
+ {
+ return _userAgent;
+ }
+ }
+
+
+ internal IntPtr _playerHandle;
+
+ internal string _cookie;
+ internal string _userAgent;
+ internal string _progressiveDownloadPath;
+ }
+
+}
--- /dev/null
+/// Subtitle
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// Subtitle
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties and events that are required for subtitle
+ /// during playback.
+ /// </remarks>
+ public class Subtitle
+ {
+ /// <summary>
+ /// Subtitle event is raised when the subtitle is updated
+ /// </summary>
+ public event EventHandler<SubtitleUpdatedEventArgs> Updated;
+
+
+ /// <summary>
+ /// Set position offset.
+ /// </summary>
+ /// <value> position in milli seconds </value>
+ public int Position
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetSubtitlePositionOffset (_playerHandle, value) != 0) {
+ // throw Exception
+ }
+ }
+ }
+
+
+ /// <summary>
+ /// Get/Set Text track.
+ /// </summary>
+ /// <value> Text track list </value>
+ public IList<SubtitleTrack> TextTrack
+ {
+ get
+ {
+ string langCode;
+ foreach (SubtitleTrack t in _textTrack) {
+ if (Interop.PlayerInterop.GetTrackLanguageCode (_playerHandle, (int)StreamType.Text, _textTrack.IndexOf (t), out langCode) != 0) {
+ // throw Exception
+ }
+ t.LanguageCode = langCode;
+ }
+ return _textTrack;
+ }
+ set
+ {
+ _textTrack = value;
+ }
+ }
+
+ /// <summary>
+ /// Get/Set Text track.
+ /// </summary>
+ /// <value> Audio track list </value>
+ public IList<SubtitleTrack> AudioTrack
+ {
+ get
+ {
+ string langCode;
+ foreach (SubtitleTrack t in _audioTrack) {
+ if (Interop.PlayerInterop.GetTrackLanguageCode (_playerHandle, (int)StreamType.Audio, _audioTrack.IndexOf (t), out langCode) != 0) {
+ // throw Exception
+ }
+ t.LanguageCode = langCode;
+ }
+ return _audioTrack;
+ }
+ set
+ {
+ _audioTrack = value;
+ }
+ }
+
+ /// <summary>
+ /// Get/Set video track.
+ /// </summary>
+ /// <value> video track list </value>
+ public IList<SubtitleTrack> VideoTrack
+ {
+ get
+ {
+ string langCode;
+ foreach (SubtitleTrack t in _videoTrack) {
+ if (Interop.PlayerInterop.GetTrackLanguageCode (_playerHandle, (int)StreamType.Video, _videoTrack.IndexOf (t), out langCode) != 0) {
+ // throw Exception
+ }
+ t.LanguageCode = langCode;
+ }
+ return _videoTrack;
+ }
+ set
+ {
+ _videoTrack = value;
+ }
+ }
+
+ /// <summary>
+ /// Set path.
+ /// </summary>
+ /// <value> path string </value>
+ public string path
+ {
+ set
+ {
+ if (Interop.PlayerInterop.SetSubtitlePath (_playerHandle, value) != 0) {
+ // throw Exception
+ }
+ }
+ }
+
+ IList<SubtitleTrack> _textTrack;
+ IList<SubtitleTrack> _audioTrack;
+ IList<SubtitleTrack> _videoTrack;
+
+ internal IntPtr _playerHandle;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// Subtitle track
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.Multimedia
+{
+ /// <summary>
+ /// SubtitleTrack
+ /// </summary>
+ /// <remarks>
+ /// This class provides properties for subtitle tracks.
+ /// </remarks>
+
+ public class SubtitleTrack
+ {
+ /// <summary>
+ /// Get/Set Language code.
+ /// </summary>
+ /// <value> language code string </value>
+ public string LanguageCode { get; set; }
+
+ /// <summary>
+ /// Get/Set activation status.
+ /// </summary>
+ /// <value> true, false </value>
+ public bool Activated { get; set; }
+ }
+}
--- /dev/null
+/// This File contains SubtitleUpdatedEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// SubtitleUpdated event arguments
+ /// </summary>
+ /// <remarks>
+ /// SubtitleUpdated event arguments
+ /// </remarks>
+ public class SubtitleUpdatedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// The duration of the updated subtitle .
+ /// </summary>
+ /// <value> ulong duration</value>
+ public ulong Duration
+ {
+ get
+ {
+ return _duration;
+ }
+ }
+
+ /// <summary>
+ /// The text of the updated subtitle .
+ /// </summary>
+ /// <value> string </value>
+ public string Text
+ {
+ get
+ {
+ return _text;
+ }
+ }
+
+ internal ulong _duration;
+ internal string _text;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// VideoFrameCapture\r
+///\r
+/// Copyright 2016 by Samsung Electronics, Inc.,\r
+///\r
+/// This software is the confidential and proprietary information\r
+/// of Samsung Electronics, Inc. ("Confidential Information"). You\r
+/// shall not disclose such Confidential Information and shall use\r
+/// it only in accordance with the terms of the license agreement\r
+/// you entered into with Samsung.\r
+\r
+using System;\r
+\r
+namespace Tizen.Multimedia\r
+{\r
+ /// <summary>\r
+ /// VideoFrameCapture\r
+ /// </summary>\r
+ /// <remarks>\r
+ /// VideoSize class provides properties of a captured video frame\r
+ /// </remarks>\r
+ class VideoFrameCapture\r
+ {\r
+\r
+ /// <summary>\r
+ /// Get/Set ImageBuffer.\r
+ /// </summary>\r
+ /// <value> Image buffer </value>\r
+ public byte[] ImageBuffer { set; get; }\r
+\r
+ /// <summary>\r
+ /// Get/Set width.\r
+ /// </summary>\r
+ /// <value> Image width </value>\r
+ public int Width { set; get; }\r
+\r
+ /// <summary>\r
+ /// Get/Set height.\r
+ /// </summary>\r
+ /// <value> Image Height </value>\r
+ public int Height { set; get; }\r
+\r
+ /// <summary>\r
+ /// Get/Set Size.\r
+ /// </summary>\r
+ /// <value> Size of the image </value>\r
+ public uint Size { set; get; }\r
+ }\r
+}\r
--- /dev/null
+/// This File contains VideoFrameDecodedEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// VideoFrameDecoded event arguments
+ /// </summary>
+ /// <remarks>
+ /// VideoFrameDecoded event arguments
+ /// </remarks>
+ public class VideoFrameDecodedEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get the Image buffer.
+ /// </summary>
+ /// <value> integer error code</value>
+ //public MediaPacket Packet
+ //{
+ // get
+ // {
+ // return _packet;
+ // }
+ //}
+
+ //internal MediaPacket _packet;
+ }
+}
\ No newline at end of file
--- /dev/null
+/// This File contains VideoStreamEventArgs class
+///
+/// Copyright 2016 by Samsung Electronics, Inc.,
+///
+/// This software is the confidential and proprietary information
+/// of Samsung Electronics, Inc. ("Confidential Information"). You
+/// shall not disclose such Confidential Information and shall use
+/// it only in accordance with the terms of the license agreement
+/// you entered into with Samsung.
+
+
+using System;
+
+namespace Tizen.Multimedia
+{
+
+ /// <summary>
+ /// VideoStreamEventArgs event arguments
+ /// </summary>
+ /// <remarks>
+ /// VideoStreamEventArgs event arguments
+ /// </remarks>
+ public class VideoStreamEventArgs : EventArgs
+ {
+ /// <summary>
+ /// Get Video Height.
+ /// </summary>
+ /// <value> video height </value>
+ public int Height
+ {
+ get
+ {
+ return _height;
+ }
+ }
+
+ /// <summary>
+ /// Get Video Width.
+ /// </summary>
+ /// <value> video width </value>
+ public int Width
+ {
+ get
+ {
+ return _width;
+ }
+ }
+
+ /// <summary>
+ /// FPS
+ /// </summary>
+ /// <value> int Frames per second</value>
+ public int Fps
+ {
+ get
+ {
+ return _fps;
+ }
+ }
+
+ /// <summary>
+ /// Bit rate.
+ /// </summary>
+ /// <value> bit rate [Hz] </value>
+ public int BitRate
+ {
+ get
+ {
+ return _bitrate;
+ }
+ }
+
+ internal int _height;
+ internal int _width;
+ internal int _fps;
+ internal int _bitrate;
+ }
+}
\ No newline at end of file
--- /dev/null
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("Tizen.Multimedia")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("")]\r
+[assembly: AssemblyProduct("Tizen.Multimedia")]\r
+[assembly: AssemblyCopyright("Copyright © 2016")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible \r
+// to COM components. If you need to access a type in this assembly from \r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+[assembly: Guid("3bbcff7a-1f64-43a8-bdca-ffaee260697a")]\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+// Major Version\r
+// Minor Version \r
+// Build Number\r
+// Revision\r
+//\r
+// You can specify all the values or you can default the Build and Revision Numbers \r
+// by using the '*' as shown below:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.0.0.0")]\r
+[assembly: AssemblyFileVersion("1.0.0.0")]\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProjectGuid>{0CE698B0-4849-4096-9D7F-30E611F50DAD}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>Tizen.Multimedia</RootNamespace>\r
+ <AssemblyName>Tizen.Multimedia</AssemblyName>\r
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
+ <FileAlignment>512</FileAlignment>\r
+ <TargetFrameworkProfile />\r
+ <ProductVersion>8.0.30703</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Debug\</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <OutputPath>bin\Release\</OutputPath>\r
+ <DefineConstants>TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <SignAssembly>true</SignAssembly>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <AssemblyOriginatorKeyFile>Tizen.Multimedia.snk</AssemblyOriginatorKeyFile>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Core" />\r
+ <Reference Include="System.Xml.Linq" />\r
+ <Reference Include="System.Data.DataSetExtensions" />\r
+ <Reference Include="Microsoft.CSharp" />\r
+ <Reference Include="System.Data" />\r
+ <Reference Include="System.Xml" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="Interop\Interop.Player.cs" />\r
+ <Compile Include="Player\PlayerEnums.cs" />\r
+ <Compile Include="Player\MediaStream.cs" />\r
+ <Compile Include="Player\MediaStreamConfiguration.cs" />\r
+ <Compile Include="Player\PlayerSource.cs" />\r
+ <Compile Include="Player\SourceFactory.cs" />\r
+ <Compile Include="Player\SubtitleTrack.cs" />\r
+ <Compile Include="Player\AudioEffect.cs" />\r
+ <Compile Include="Player\BufferingProgressChangedEventArgs.cs" />\r
+ <Compile Include="Player\BufferStatusEventArgs.cs" />\r
+ <Compile Include="Player\DownloadProgress.cs" />\r
+ <Compile Include="Player\EqualizerBand.cs" />\r
+ <Compile Include="Player\ProgressiveDownloadMessageEventArgs.cs" />\r
+ <Compile Include="Player\ProgressiveDownloadStatus.cs" />\r
+ <Compile Include="Player\SeekOffsetEventArgs.cs" />\r
+ <Compile Include="Player\SubtitleUpdatedEventArgs.cs" />\r
+ <Compile Include="Player\Display.cs" />\r
+ <Compile Include="Player\PlaybackCompletedEventArgs.cs" />\r
+ <Compile Include="Player\PlaybackErrorEventArgs.cs" />\r
+ <Compile Include="Player\PlaybackInterruptedEventArgs.cs" />\r
+ <Compile Include="Player\Player.cs" />\r
+ <Compile Include="Player\PlayerContentInfo.cs" />\r
+ <Compile Include="Player\StreamInformation.cs" />\r
+ <Compile Include="Player\StreamingConfiguration.cs" />\r
+ <Compile Include="Player\Subtitle.cs" />\r
+ <Compile Include="Player\VideoFrameDecodedEventArgs.cs" />\r
+ <Compile Include="Player\VideoFrameCapture.cs" />\r
+ <Compile Include="Player\VideoStreamEventArgs.cs" />\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ <Compile Include="Player\MediaSource.cs" />\r
+ <Compile Include="Player\MediaUriSource.cs" />\r
+ <Compile Include="Player\MediaBufferSource.cs" />\r
+ <Compile Include="Player\MediaStreamSource.cs" />\r
+ <Compile Include="Interop\Interop.Libraries.cs" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="Tizen.Multimedia.snk" />\r
+ </ItemGroup>\r
+ <ItemGroup />\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+</Project>
\ No newline at end of file
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Multimedia", "Tizen.Multimedia.csproj", "{0CE698B0-4849-4096-9D7F-30E611F50DAD}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {0CE698B0-4849-4096-9D7F-30E611F50DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {0CE698B0-4849-4096-9D7F-30E611F50DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {0CE698B0-4849-4096-9D7F-30E611F50DAD}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {0CE698B0-4849-4096-9D7F-30E611F50DAD}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<Properties>
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
+ <MonoDevelop.Ide.Workbench ActiveDocument="Player/Player.cs">
+ <Files>
+ <File FileName="Player/Player.cs" Line="1" Column="1" />
+ </Files>
+ </MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.DebuggingService.Breakpoints>
+ <BreakpointStore />
+ </MonoDevelop.Ide.DebuggingService.Breakpoints>
+ <MonoDevelop.Ide.DebuggingService.PinnedWatches />
+</Properties>
\ No newline at end of file