forked from videolan/vlc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmediacontrol_internal.h
83 lines (67 loc) · 3.14 KB
/
mediacontrol_internal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*****************************************************************************
* control.h: private header for mediacontrol
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* $Id$
*
* Authors: Olivier Aubert <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _VLC_MEDIACONTROL_INTERNAL_H
#define _VLC_MEDIACONTROL_INTERNAL_H 1
# ifdef __cplusplus
extern "C" {
# endif
#include <vlc/vlc.h>
#include <vlc/mediacontrol_structures.h>
#include <vlc/libvlc_structures.h>
#include <vlc/libvlc.h>
struct mediacontrol_Instance {
libvlc_instance_t * p_instance;
libvlc_media_player_t * p_media_player;
};
libvlc_time_t private_mediacontrol_unit_convert( libvlc_media_player_t *p_media_player,
mediacontrol_PositionKey from,
mediacontrol_PositionKey to,
int64_t value );
libvlc_time_t private_mediacontrol_position2microsecond( libvlc_media_player_t *p_media_player,
const mediacontrol_Position *pos );
/**
* Allocate a RGBPicture structure.
* \param datasize: the size of the data
*/
mediacontrol_RGBPicture *private_mediacontrol_RGBPicture__alloc( int datasize );
mediacontrol_RGBPicture *private_mediacontrol_createRGBPicture( int, int, long, int64_t l_date, char *, int);
#define RAISE( c, m ) if( exception ) { exception->code = c; \
exception->message = strdup(m); }
#define RAISE_NULL( c, m ) do{ RAISE( c, m ); return NULL; } while(0)
#define RAISE_VOID( c, m ) do{ RAISE( c, m ); return; } while(0)
#define HANDLE_LIBVLC_EXCEPTION_VOID( e ) if( libvlc_exception_raised( e ) ) { \
RAISE( mediacontrol_InternalException, libvlc_errmsg()); \
libvlc_exception_clear( e ); \
return; }
#define HANDLE_LIBVLC_EXCEPTION_NULL( e ) if( libvlc_exception_raised( e ) ) { \
RAISE( mediacontrol_InternalException, libvlc_errmsg()); \
libvlc_exception_clear( e ); \
return NULL; }
#define HANDLE_LIBVLC_EXCEPTION_ZERO( e ) if( libvlc_exception_raised( e ) ) { \
RAISE( mediacontrol_InternalException, libvlc_errmsg()); \
libvlc_exception_clear( e ); \
return 0; }
# ifdef __cplusplus
}
# endif
#endif