clock: publicly expose clock's typedefs

This is needed to expose a clock subset to stream outputs. It also
reduce the amount of redundant typedefs to the clock in the core
codebase.
This commit is contained in:
Alaric Senat 2023-01-30 18:15:41 +01:00 committed by Steve Lhomme
parent a1bfd37cb9
commit d9b23d6a12
4 changed files with 44 additions and 4 deletions

40
include/vlc_clock.h Normal file
View File

@ -0,0 +1,40 @@
/*****************************************************************************
* vlc_clock.h: clock API
*****************************************************************************
* Copyright (C) 2023 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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_CLOCK_H
#define VLC_CLOCK_H 1
/**
* The VLC clock API.
*
* The publicly exposed clock API is for now very restraint. For now, only a
* subset of the clock is exposed and simplified for stream output modules.
*
* The actual clock implementation is mostly private for now as no other use
* case is found.
*/
/**
* Opaques VLC Clock types.
*/
typedef struct vlc_clock_main_t vlc_clock_main_t;
typedef struct vlc_clock_t vlc_clock_t;
#endif

View File

@ -43,6 +43,7 @@ pluginsinclude_HEADERS = \
../include/vlc_configuration.h \
../include/vlc_cpu.h \
../include/vlc_cxx_helpers.hpp \
../include/vlc_clock.h \
../include/vlc_decoder.h \
../include/vlc_demux.h \
../include/vlc_dialog.h \

View File

@ -20,6 +20,8 @@
#ifndef CLOCK_H
#define CLOCK_H
#include <vlc_clock.h>
enum vlc_clock_master_source
{
VLC_CLOCK_MASTER_AUTO= 0,
@ -28,9 +30,6 @@ enum vlc_clock_master_source
VLC_CLOCK_MASTER_MONOTONIC,
};
typedef struct vlc_clock_main_t vlc_clock_main_t;
typedef struct vlc_clock_t vlc_clock_t;
/**
* Callbacks for the owner of the main clock
*/

View File

@ -25,9 +25,9 @@
#define LIBVLC_VOUT_INTERNAL_H 1
#include <vlc_vout_display.h>
#include <vlc_clock.h>
typedef struct input_thread_t input_thread_t;
typedef struct vlc_clock_t vlc_clock_t;
/* It should be high enough to absorbe jitter due to difficult picture(s)
* to decode but not too high as memory is not that cheap.