VNMediaClientNET

NativeMediaReciever.h
1 #pragma once
2 #include <msclr\auto_gcroot.h>
3 #include <vcclr.h>
4 #include "vn_player.h"
5
6 namespace VideoNext
7 {
8 interface class INativeMediaRecieverSink;
9 using namespace System;
10
11 class NativeMediaReciever
12 {
13 public:
14 NativeMediaReciever(
15 INativeMediaRecieverSink ^recieverSink,
16 VN_PLAYER_DECODER_TYPE decoderType,
17 Int32 cacheSizeMegabytes,
18 VN_PLAYER_RTP_TRANSPORT rtpTransport,
19 VN_PLAYER_PIXEL_FORMAT pixelFormat,
20 Int32 bufferLength);
21 ~NativeMediaReciever();
22 public:
23 void Play(const char *url);
24 void Pause();
25 void Resume(int direction);
26 void SetPlaybackSpeed(float speed);
27 void GotoTime(time_t time);
28 bool StartRecording(const char* filename, vn_kv_t** metadata);
29 bool EndRecording();
30 bool IsPaused();
31 bool IsPlaying();
32 VN_PLAYER_STREAM_STATE GetState();
33 static bool IsPlayingState(VN_PLAYER_STREAM_STATE state);
34 private:
35 static void OnNewFrame(const vn_player_frame_t*, const vn_player_cache_boundaries_t*, void *client_data);
36 static void OnBufferChanged(const vn_player_cache_boundaries_t*, void *client_data);
37 static void OnStateChanged(VN_PLAYER_STREAM_STATE, const vn_player_result_status_t*, void *client_data);
38 static void OnNewStream(const vn_player_stream_info_t*, void *client_data);
39 static void OnStreamRemoved(const vn_player_stream_info_t*, void *client_data);
40 static void OnRecordingStatusChanged(const vn_player_recording_status_t*, void *client_data);
41 static void OnMsgLog(const char*, void *client_data);
42 private:
43 msclr::auto_gcroot<INativeMediaRecieverSink^> m_recieverSink;
44 struct vn_player_config_t m_playerConfig;
45 struct vn_player_context_t *m_playerContext;
46 bool m_isPaused;
47 VN_PLAYER_STREAM_STATE m_state;
48 };
49 }
VideoNext
VideoNEXT media player API.
Definition: AnalyticsRenderer.cpp:7
VideoNext::NativeMediaReciever
Definition: NativeMediaReciever.h:12
VideoNext::INativeMediaRecieverSink
Definition: INativeMediaRecieverSink.h:7