Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Vorbis tools
Commits
5c6a19d1
Commit
5c6a19d1
authored
Dec 18, 2020
by
Philipp Schafft
🦁
Browse files
Update: Moved code for handling unknown codecs out of main file
parent
aecbc539
Changes
4
Hide whitespace changes
Inline
Side-by-side
ogginfo/Makefile.am
View file @
5c6a19d1
## Process this file with automake to produce Makefile.in
mans
=
ogginfo.1
ogginfosources
=
ogginfo2.c theora.c
ogginfosources
=
ogginfo2.c theora.c
codec_other.c
noinst_HEADERS
=
\
private.h
\
theora.h
datadir
=
@datadir@
...
...
ogginfo/codec_other.c
0 → 100644
View file @
5c6a19d1
/* Ogginfo
*
* A tool to describe ogg file contents and metadata.
*
* This file handles codecs we have no specific handling for.
*
* Copyright 2002-2005 Michael Smith <msmith@xiph.org>
* Copyright 2020 Philipp Schafft <lion@lion.leolix.org>
* Licensed under the GNU GPL, distributed with this program.
*/
#ifdef HAVE_CONFIG_H
#include
<config.h>
#endif
#include
<ogg/ogg.h>
#include
"private.h"
static
void
process_other
(
stream_processor
*
stream
,
ogg_page
*
page
)
{
ogg_packet
packet
;
ogg_stream_pagein
(
&
stream
->
os
,
page
);
while
(
ogg_stream_packetout
(
&
stream
->
os
,
&
packet
)
>
0
)
{
/* Should we do anything here? Currently, we don't */
}
}
void
other_start
(
stream_processor
*
stream
,
char
*
type
)
{
if
(
type
)
{
stream
->
type
=
type
;
}
else
{
stream
->
type
=
"unknown"
;
}
stream
->
process_page
=
process_other
;
stream
->
process_end
=
NULL
;
}
ogginfo/ogginfo2.c
View file @
5c6a19d1
...
...
@@ -33,6 +33,8 @@
#include
"theora.h"
#include
"private.h"
#define CHUNK 4500
static
const
struct
vorbis_release
{
...
...
@@ -64,27 +66,6 @@ static const struct vorbis_release {
* serial-number gaps)
*/
typedef
struct
_stream_processor
{
void
(
*
process_page
)(
struct
_stream_processor
*
,
ogg_page
*
);
void
(
*
process_end
)(
struct
_stream_processor
*
);
int
isillegal
;
int
constraint_violated
;
int
shownillegal
;
int
isnew
;
long
seqno
;
int
lostseq
;
int
start
;
int
end
;
int
num
;
char
*
type
;
ogg_uint32_t
serial
;
/* must be 32 bit unsigned */
ogg_stream_state
os
;
void
*
data
;
}
stream_processor
;
typedef
struct
{
stream_processor
*
streams
;
int
allocated
;
...
...
@@ -875,18 +856,6 @@ static void process_null(stream_processor *stream, ogg_page *page)
/* This is for invalid streams. */
}
static
void
process_other
(
stream_processor
*
stream
,
ogg_page
*
page
)
{
ogg_packet
packet
;
ogg_stream_pagein
(
&
stream
->
os
,
page
);
while
(
ogg_stream_packetout
(
&
stream
->
os
,
&
packet
)
>
0
)
{
/* Should we do anything here? Currently, we don't */
}
}
static
void
free_stream_set
(
stream_set
*
set
)
{
int
i
;
...
...
@@ -923,17 +892,6 @@ static void null_start(stream_processor *stream)
stream
->
process_page
=
process_null
;
}
static
void
other_start
(
stream_processor
*
stream
,
char
*
type
)
{
if
(
type
)
{
stream
->
type
=
type
;
}
else
{
stream
->
type
=
"unknown"
;
}
stream
->
process_page
=
process_other
;
stream
->
process_end
=
NULL
;
}
static
void
theora_start
(
stream_processor
*
stream
)
{
misc_theora_info
*
info
;
...
...
ogginfo/private.h
0 → 100644
View file @
5c6a19d1
/* Ogginfo
*
* A tool to describe ogg file contents and metadata.
*
* This file is a common header for the code files.
*
* Copyright 2002-2005 Michael Smith <msmith@xiph.org>
* Copyright 2020 Philipp Schafft <lion@lion.leolix.org>
* Licensed under the GNU GPL, distributed with this program.
*/
#ifndef __VORBIS_TOOLS__PRIVATE_H__
#define __VORBIS_TOOLS__PRIVATE_H__
typedef
struct
_stream_processor
{
void
(
*
process_page
)(
struct
_stream_processor
*
,
ogg_page
*
);
void
(
*
process_end
)(
struct
_stream_processor
*
);
int
isillegal
;
int
constraint_violated
;
int
shownillegal
;
int
isnew
;
long
seqno
;
int
lostseq
;
int
start
;
int
end
;
int
num
;
char
*
type
;
ogg_uint32_t
serial
;
/* must be 32 bit unsigned */
ogg_stream_state
os
;
void
*
data
;
}
stream_processor
;
void
other_start
(
stream_processor
*
stream
,
char
*
type
);
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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