mediastreamer2_tester_windows.h 1.65 KB
Newer Older
Ghislain MARY's avatar
Ghislain MARY committed
1 2 3 4 5 6 7 8 9 10
#pragma once

#include "mediastreamer2/mscommon.h"
#include "mediastreamer2_tester.h"

namespace ms2_tester_runtime_component
{
	public interface class OutputTraceListener
	{
	public:
Ghislain MARY's avatar
Ghislain MARY committed
11
		void outputTrace(Platform::String^ lev, Platform::String^ msg);
Ghislain MARY's avatar
Ghislain MARY committed
12 13 14 15 16
	};

    public ref class MS2Tester sealed
    {
    public:
17
		void setWritableDirectory(Windows::Storage::StorageFolder^ folder);
Ghislain MARY's avatar
Ghislain MARY committed
18 19 20 21 22
		void setOutputTraceListener(OutputTraceListener^ traceListener);
		unsigned int nbTestSuites();
		unsigned int nbTests(Platform::String^ suiteName);
		Platform::String^ testSuiteName(int index);
		Platform::String^ testName(Platform::String^ suiteName, int testIndex);
Ghislain MARY's avatar
Ghislain MARY committed
23 24
		bool run(Platform::String^ suiteName, Platform::String^ caseName, Platform::Boolean verbose);
		void runAllToXml();
25 26 27
		void initVideo();
		void uninitVideo();
		void startVideoStream(Platform::Object^ CaptureElement, Platform::Object^ MediaElement, Platform::String^ camera, Platform::String^ codec, Platform::String^ videoSize, unsigned int frameRate, unsigned int bitRate);
28
		void stopVideoStream();
29
		void setOrientation(int degrees);
Ghislain MARY's avatar
Ghislain MARY committed
30 31 32 33 34 35 36 37 38

		static property MS2Tester^ Instance
		{
			MS2Tester^ get() { return _instance; }
		}
		property Windows::Foundation::IAsyncAction^ AsyncAction
		{
			Windows::Foundation::IAsyncAction^ get() { return _asyncAction; }
		}
39 40 41 42
		property Windows::Foundation::Collections::IVector<Platform::String^>^ VideoDevices
		{
			Windows::Foundation::Collections::IVector<Platform::String^>^ get();
		}
Ghislain MARY's avatar
Ghislain MARY committed
43 44 45 46 47 48 49
	private:
		MS2Tester();
		~MS2Tester();
		void init(bool verbose);

		static MS2Tester^ _instance;
		Windows::Foundation::IAsyncAction^ _asyncAction;
50
		VideoStream *_videoStream;
51
		int _deviceRotation;
Ghislain MARY's avatar
Ghislain MARY committed
52
	};
Ghislain MARY's avatar
Ghislain MARY committed
53
}