intf_dummy.c 3.4 KB
Newer Older
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
/*****************************************************************************
 * intf_dummy.c: dummy interface plugin
 *****************************************************************************
 * Copyright (C) 2000 VideoLAN
 *
 * Authors:
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 *****************************************************************************/

/*****************************************************************************
 * Preamble
 *****************************************************************************/
#include "defs.h"

#include <stdlib.h>                                      /* malloc(), free() */

#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "plugins.h"

36
37
38
#include "stream_control.h"
#include "input_ext-intf.h"

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "video.h"
#include "video_output.h"

#include "intf_msg.h"
#include "interface.h"

#include "main.h"

/*****************************************************************************
 * intf_sys_t: description and status of FB interface
 *****************************************************************************/
typedef struct intf_sys_s
{

} intf_sys_t;

/*****************************************************************************
Sam Hocevar's avatar
Sam Hocevar committed
56
 * intf_DummyCreate: initialize dummy interface
57
 *****************************************************************************/
Sam Hocevar's avatar
Sam Hocevar committed
58
int intf_DummyCreate( intf_thread_t *p_intf )
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
    /* Allocate instance and initialize some members */
    p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
    if( p_intf->p_sys == NULL )
    {
        return( 1 );
    };

    /* Spawn video output thread */
    if( p_main->b_video )
    {
        p_intf->p_vout = vout_CreateThread( NULL, 0, 0, 0, NULL, 0, NULL );
        if( p_intf->p_vout == NULL )                                /* error */
        {
            intf_ErrMsg("intf error: can't create output thread\n" );
            return( 1 );
        }
    }
    return( 0 );
}

/*****************************************************************************
Sam Hocevar's avatar
Sam Hocevar committed
81
 * intf_DummyDestroy: destroy dummy interface
82
 *****************************************************************************/
Sam Hocevar's avatar
Sam Hocevar committed
83
void intf_DummyDestroy( intf_thread_t *p_intf )
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
    /* Close input thread, if any (blocking) */
    if( p_intf->p_input )
    {
        input_DestroyThread( p_intf->p_input, NULL );
    }

    /* Close video output thread, if any (blocking) */
    if( p_intf->p_vout )
    {
        vout_DestroyThread( p_intf->p_vout, NULL );
    }

    /* Destroy structure */
    free( p_intf->p_sys );
}


/*****************************************************************************
Sam Hocevar's avatar
Sam Hocevar committed
103
 * intf_DummyManage: event loop
104
 *****************************************************************************/
Sam Hocevar's avatar
Sam Hocevar committed
105
void intf_DummyManage( intf_thread_t *p_intf )
106
107
108
109
{
    ;
}