| 1 | /* |
|---|
| 2 | mediastreamer2 library - modular sound and video processing and streaming |
|---|
| 3 | Copyright (C) 2010 Simon MORLAT (simon.morlat@linphone.org) |
|---|
| 4 | |
|---|
| 5 | This program is free software; you can redistribute it and/or |
|---|
| 6 | modify it under the terms of the GNU General Public License |
|---|
| 7 | as published by the Free Software Foundation; either version 2 |
|---|
| 8 | of the License, or (at your option) any later version. |
|---|
| 9 | |
|---|
| 10 | This program is distributed in the hope that it will be useful, |
|---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | GNU General Public License for more details. |
|---|
| 14 | |
|---|
| 15 | You should have received a copy of the GNU General Public License |
|---|
| 16 | along with this program; if not, write to the Free Software |
|---|
| 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef msinterfaces_h |
|---|
| 21 | #define msinterfaces_h |
|---|
| 22 | |
|---|
| 23 | /** |
|---|
| 24 | * Interface definition for video display filters. |
|---|
| 25 | **/ |
|---|
| 26 | |
|---|
| 27 | /** whether the video window should be resized to the stream's resolution*/ |
|---|
| 28 | #define MS_VIDEO_DISPLAY_ENABLE_AUTOFIT \ |
|---|
| 29 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,0,int) |
|---|
| 30 | |
|---|
| 31 | /**position of the local view */ |
|---|
| 32 | #define MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_MODE \ |
|---|
| 33 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,1,int) |
|---|
| 34 | |
|---|
| 35 | /**whether the video should be reversed as in mirror */ |
|---|
| 36 | #define MS_VIDEO_DISPLAY_ENABLE_MIRRORING \ |
|---|
| 37 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,2,int) |
|---|
| 38 | |
|---|
| 39 | /**returns a platform dependant window id where the video is drawn */ |
|---|
| 40 | #define MS_VIDEO_DISPLAY_GET_NATIVE_WINDOW_ID \ |
|---|
| 41 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,3,long) |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | /**Sets an external native window id where the video is to be drawn */ |
|---|
| 45 | #define MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID \ |
|---|
| 46 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,4,long) |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | /**scale factor of the local view */ |
|---|
| 50 | #define MS_VIDEO_DISPLAY_SET_LOCAL_VIEW_SCALEFACTOR \ |
|---|
| 51 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,5,float) |
|---|
| 52 | |
|---|
| 53 | /**Set the background colour for video window */ |
|---|
| 54 | #define MS_VIDEO_DISPLAY_SET_BACKGROUND_COLOR \ |
|---|
| 55 | MS_FILTER_METHOD(MSFilterVideoDisplayInterface,8,int[3]) |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | /** |
|---|
| 59 | * Interface definitions for players |
|---|
| 60 | **/ |
|---|
| 61 | |
|---|
| 62 | enum _MSPlayerState{ |
|---|
| 63 | MSPlayerClosed, |
|---|
| 64 | MSPlayerPaused, |
|---|
| 65 | MSPlayerPlaying |
|---|
| 66 | }; |
|---|
| 67 | |
|---|
| 68 | typedef enum _MSPlayerState MSPlayerState; |
|---|
| 69 | |
|---|
| 70 | /**open a media file*/ |
|---|
| 71 | #define MS_PLAYER_OPEN \ |
|---|
| 72 | MS_FILTER_METHOD(MSFilterPlayerInterface,0,const char *) |
|---|
| 73 | |
|---|
| 74 | #define MS_PLAYER_START \ |
|---|
| 75 | MS_FILTER_METHOD_NO_ARG(MSFilterPlayerInterface,1) |
|---|
| 76 | |
|---|
| 77 | #define MS_PLAYER_PAUSE \ |
|---|
| 78 | MS_FILTER_METHOD_NO_ARG(MSFilterPlayerInterface,2) |
|---|
| 79 | |
|---|
| 80 | #define MS_PLAYER_CLOSE \ |
|---|
| 81 | MS_FILTER_METHOD_NO_ARG(MSFilterPlayerInterface,3) |
|---|
| 82 | |
|---|
| 83 | #define MS_PLAYER_SEEK_MS \ |
|---|
| 84 | MS_FILTER_METHOD(MSFilterPlayerInterface,4,int) |
|---|
| 85 | |
|---|
| 86 | #define MS_PLAYER_GET_STATE \ |
|---|
| 87 | MS_FILTER_METHOD(MSFilterPlayerInterface,5,int) |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | /** Interface definitions for echo cancellers */ |
|---|
| 91 | |
|---|
| 92 | /** sets the echo delay in milliseconds*/ |
|---|
| 93 | #define MS_ECHO_CANCELLER_SET_DELAY \ |
|---|
| 94 | MS_FILTER_METHOD(MSFilterEchoCancellerInterface,0,int) |
|---|
| 95 | |
|---|
| 96 | #define MS_ECHO_CANCELLER_SET_FRAMESIZE \ |
|---|
| 97 | MS_FILTER_METHOD(MSFilterEchoCancellerInterface,1,int) |
|---|
| 98 | |
|---|
| 99 | /** sets tail length in milliseconds */ |
|---|
| 100 | #define MS_ECHO_CANCELLER_SET_TAIL_LENGTH \ |
|---|
| 101 | MS_FILTER_METHOD(MSFilterEchoCancellerInterface,2,int) |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | /** Interface definitions for video decoders */ |
|---|
| 105 | #define MS_VIDEO_DECODER_DECODING_ERRORS \ |
|---|
| 106 | MS_FILTER_EVENT_NO_ARG(MSFilterVideoDecoderInterface,0) |
|---|
| 107 | |
|---|
| 108 | /** put filter in bypass mode */ |
|---|
| 109 | #define MS_ECHO_CANCELLER_SET_BYPASS_MODE \ |
|---|
| 110 | MS_FILTER_METHOD(MSFilterEchoCancellerInterface,3,bool_t) |
|---|
| 111 | /** get filter bypass mode */ |
|---|
| 112 | #define MS_ECHO_CANCELLER_GET_BYPASS_MODE \ |
|---|
| 113 | MS_FILTER_METHOD(MSFilterEchoCancellerInterface,4,bool_t) |
|---|
| 114 | #endif |
|---|
| 115 | |
|---|