Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
34d2bf30
Commit
34d2bf30
authored
13 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
pcmdec: use unique classes for all pcm demuxers.
parent
d906f49a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libavformat/pcmdec.c
+15
-1
15 additions, 1 deletion
libavformat/pcmdec.c
libavformat/rawdec.c
+0
-13
0 additions, 13 deletions
libavformat/rawdec.c
libavformat/rawdec.h
+0
-1
0 additions, 1 deletion
libavformat/rawdec.h
with
15 additions
and
15 deletions
libavformat/pcmdec.c
+
15
−
1
View file @
34d2bf30
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
#include
"avformat.h"
#include
"avformat.h"
#include
"rawdec.h"
#include
"rawdec.h"
#include
"pcm.h"
#include
"pcm.h"
#include
"libavutil/log.h"
#include
"libavutil/opt.h"
#define RAW_SAMPLES 1024
#define RAW_SAMPLES 1024
...
@@ -46,7 +48,19 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -46,7 +48,19 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ret
;
return
ret
;
}
}
static
const
AVOption
pcm_options
[]
=
{
{
"sample_rate"
,
""
,
offsetof
(
RawAudioDemuxerContext
,
sample_rate
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
INT_MAX
,
AV_OPT_FLAG_DECODING_PARAM
},
{
"channels"
,
""
,
offsetof
(
RawAudioDemuxerContext
,
channels
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
INT_MAX
,
AV_OPT_FLAG_DECODING_PARAM
},
{
NULL
},
};
#define PCMDEF(name, long_name, ext, codec) \
#define PCMDEF(name, long_name, ext, codec) \
static const AVClass name ## _demuxer_class = {\
.class_name = #name " demuxer",\
.item_name = av_default_item_name,\
.option = pcm_options,\
.version = LIBAVUTIL_VERSION_INT,\
};\
AVInputFormat ff_pcm_ ## name ## _demuxer = {\
AVInputFormat ff_pcm_ ## name ## _demuxer = {\
#name,\
#name,\
NULL_IF_CONFIG_SMALL(long_name),\
NULL_IF_CONFIG_SMALL(long_name),\
...
@@ -59,7 +73,7 @@ AVInputFormat ff_pcm_ ## name ## _demuxer = {\
...
@@ -59,7 +73,7 @@ AVInputFormat ff_pcm_ ## name ## _demuxer = {\
.flags= AVFMT_GENERIC_INDEX,\
.flags= AVFMT_GENERIC_INDEX,\
.extensions = ext,\
.extensions = ext,\
.value = codec,\
.value = codec,\
.priv_class = &
ff_rawaudio
_demuxer_class,\
.priv_class = &
name ##
_demuxer_class,\
};
};
PCMDEF
(
f64be
,
"PCM 64 bit floating-point big-endian format"
,
PCMDEF
(
f64be
,
"PCM 64 bit floating-point big-endian format"
,
...
...
This diff is collapsed.
Click to expand it.
libavformat/rawdec.c
+
0
−
13
View file @
34d2bf30
...
@@ -167,19 +167,6 @@ fail:
...
@@ -167,19 +167,6 @@ fail:
/* Note: Do not forget to add new entries to the Makefile as well. */
/* Note: Do not forget to add new entries to the Makefile as well. */
static
const
AVOption
audio_options
[]
=
{
{
"sample_rate"
,
""
,
offsetof
(
RawAudioDemuxerContext
,
sample_rate
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
INT_MAX
,
AV_OPT_FLAG_DECODING_PARAM
},
{
"channels"
,
""
,
offsetof
(
RawAudioDemuxerContext
,
channels
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
INT_MAX
,
AV_OPT_FLAG_DECODING_PARAM
},
{
NULL
},
};
const
AVClass
ff_rawaudio_demuxer_class
=
{
.
class_name
=
"rawaudio demuxer"
,
.
item_name
=
av_default_item_name
,
.
option
=
audio_options
,
.
version
=
LIBAVUTIL_VERSION_INT
,
};
#define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x)
#define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x)
#define DEC AV_OPT_FLAG_DECODING_PARAM
#define DEC AV_OPT_FLAG_DECODING_PARAM
static
const
AVOption
video_options
[]
=
{
static
const
AVOption
video_options
[]
=
{
...
...
This diff is collapsed.
Click to expand it.
libavformat/rawdec.h
+
0
−
1
View file @
34d2bf30
...
@@ -38,7 +38,6 @@ typedef struct FFRawVideoDemuxerContext {
...
@@ -38,7 +38,6 @@ typedef struct FFRawVideoDemuxerContext {
char
*
framerate
;
/**< String describing framerate, set by a private option. */
char
*
framerate
;
/**< String describing framerate, set by a private option. */
}
FFRawVideoDemuxerContext
;
}
FFRawVideoDemuxerContext
;
extern
const
AVClass
ff_rawaudio_demuxer_class
;
extern
const
AVClass
ff_rawvideo_demuxer_class
;
extern
const
AVClass
ff_rawvideo_demuxer_class
;
int
ff_raw_read_header
(
AVFormatContext
*
s
,
AVFormatParameters
*
ap
);
int
ff_raw_read_header
(
AVFormatContext
*
s
,
AVFormatParameters
*
ap
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment