Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f90b7fec
Commit
f90b7fec
authored
Aug 05, 2010
by
G Finch
Committed by
Ilkka Ollakka
Aug 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor-code-into-ogg.c-and-ogg.h
Signed-off-by:
Ilkka Ollakka
<
ileoo@videolan.org
>
parent
bf7633a5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
67 deletions
+115
-67
modules/demux/Modules.am
modules/demux/Modules.am
+1
-1
modules/demux/ogg.c
modules/demux/ogg.c
+1
-66
modules/demux/ogg.h
modules/demux/ogg.h
+113
-0
No files found.
modules/demux/Modules.am
View file @
f90b7fec
SUBDIRS = asf avformat avi mkv mp4 mpeg playlist
SOURCES_flacsys = flac.c
SOURCES_ogg = ogg.c vorbis.h kate_categories.c kate_categories.h xiph.h
SOURCES_ogg = ogg.c
ogg.h
vorbis.h kate_categories.c kate_categories.h xiph.h
SOURCES_demuxdump = demuxdump.c
SOURCES_rawdv = rawdv.c
SOURCES_rawvid = rawvid.c
...
...
modules/demux/ogg.c
View file @
f90b7fec
...
...
@@ -42,6 +42,7 @@
#include "xiph.h"
#include "vorbis.h"
#include "kate_categories.h"
#include "ogg.h"
/*****************************************************************************
* Module descriptor
...
...
@@ -63,72 +64,6 @@ vlc_module_end ()
/*****************************************************************************
* Definitions of structures and functions used by this plugins
*****************************************************************************/
typedef
struct
logical_stream_s
{
ogg_stream_state
os
;
/* logical stream of packets */
es_format_t
fmt
;
es_format_t
fmt_old
;
/* format of old ES is reused */
es_out_id_t
*
p_es
;
double
f_rate
;
int
i_serial_no
;
/* the header of some logical streams (eg vorbis) contain essential
* data for the decoder. We back them up here in case we need to re-feed
* them to the decoder. */
int
b_force_backup
;
int
i_packets_backup
;
void
*
p_headers
;
int
i_headers
;
/* program clock reference (in units of 90kHz) derived from the previous
* granulepos */
mtime_t
i_pcr
;
mtime_t
i_interpolated_pcr
;
mtime_t
i_previous_pcr
;
/* Misc */
bool
b_reinit
;
int
i_granule_shift
;
/* offset of first keyframe for theora; can be 0 or 1 depending on version number */
int64_t
i_keyframe_offset
;
/* kate streams have the number of headers in the ID header */
int
i_kate_num_headers
;
/* for Annodex logical bitstreams */
int
i_secondary_header_packets
;
}
logical_stream_t
;
struct
demux_sys_t
{
ogg_sync_state
oy
;
/* sync and verify incoming physical bitstream */
int
i_streams
;
/* number of logical bitstreams */
logical_stream_t
**
pp_stream
;
/* pointer to an array of logical streams */
logical_stream_t
*
p_old_stream
;
/* pointer to a old logical stream to avoid recreating it */
/* program clock reference (in units of 90kHz) derived from the pcr of
* the sub-streams */
mtime_t
i_pcr
;
/* stream state */
int
i_bos
;
int
i_eos
;
/* bitrate */
int
i_bitrate
;
/* after reading all headers, the first data page is stuffed into the relevant stream, ready to use */
bool
b_page_waiting
;
/* */
vlc_meta_t
*
p_meta
;
};
/* OggDS headers for the new header format (used in ogm files) */
typedef
struct
...
...
modules/demux/ogg.h
0 → 100644
View file @
f90b7fec
/*****************************************************************************
* ogg.h : ogg stream demux module for vlc
*****************************************************************************
* Copyright (C) 2001-2010 the VideoLAN team
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Andre Pang <Andre.Pang@csiro.au> (Annodex support)
* Gabriel Finch <salsaman@gmail.com> (moved from ogg.c to ogg.h)
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
/*****************************************************************************
* Definitions of structures and functions used by this plugins
*****************************************************************************/
typedef
struct
oggseek_index_entry
demux_index_entry_t
;
typedef
struct
logical_stream_s
{
ogg_stream_state
os
;
/* logical stream of packets */
es_format_t
fmt
;
es_format_t
fmt_old
;
/* format of old ES is reused */
es_out_id_t
*
p_es
;
double
f_rate
;
int
i_serial_no
;
/* the header of some logical streams (eg vorbis) contain essential
* data for the decoder. We back them up here in case we need to re-feed
* them to the decoder. */
int
b_force_backup
;
int
i_packets_backup
;
void
*
p_headers
;
int
i_headers
;
/* program clock reference (in units of 90kHz) derived from the previous
* granulepos */
mtime_t
i_pcr
;
mtime_t
i_interpolated_pcr
;
mtime_t
i_previous_pcr
;
/* Misc */
bool
b_reinit
;
int
i_granule_shift
;
/* offset of first keyframe for theora; can be 0 or 1 depending on version number */
int64_t
i_keyframe_offset
;
/* kate streams have the number of headers in the ID header */
int
i_kate_num_headers
;
/* for Annodex logical bitstreams */
int
i_secondary_header_packets
;
}
logical_stream_t
;
struct
demux_sys_t
{
ogg_sync_state
oy
;
/* sync and verify incoming physical bitstream */
int
i_streams
;
/* number of logical bitstreams */
logical_stream_t
**
pp_stream
;
/* pointer to an array of logical streams */
logical_stream_t
*
p_old_stream
;
/* pointer to a old logical stream to avoid recreating it */
/* program clock reference (in units of 90kHz) derived from the pcr of
* the sub-streams */
mtime_t
i_pcr
;
/* stream state */
int
i_bos
;
int
i_eos
;
/* bitrate */
int
i_bitrate
;
/* after reading all headers, the first data page is stuffed into the relevant stream, ready to use */
bool
b_page_waiting
;
mtime_t
i_st_pts
;
/* */
vlc_meta_t
*
p_meta
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment