Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
27e084bd
Commit
27e084bd
authored
Aug 15, 2001
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added raw mjpeg
Originally committed as revision 94 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
13a7d16e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
raw.c
libav/raw.c
+26
-6
utils.c
libav/utils.c
+2
-0
No files found.
libav/raw.c
View file @
27e084bd
...
...
@@ -76,11 +76,10 @@ static int raw_read_header(AVFormatContext *s,
st
->
codec
.
height
=
ap
->
height
;
break
;
default:
abort
();
break
;
return
-
1
;
}
}
else
{
abort
()
;
return
-
1
;
}
return
0
;
}
...
...
@@ -130,9 +129,7 @@ static int mp3_read_header(AVFormatContext *s,
st
->
codec
.
codec_type
=
CODEC_TYPE_AUDIO
;
st
->
codec
.
codec_id
=
CODEC_ID_MP2
;
/* XXX: read the first frame and extract rate and channels */
st
->
codec
.
sample_rate
=
44100
;
st
->
codec
.
channels
=
2
;
/* the parameters will be extracted from the compressed bitstream */
return
0
;
}
...
...
@@ -150,6 +147,14 @@ static int video_read_header(AVFormatContext *s,
st
->
codec
.
codec_type
=
CODEC_TYPE_VIDEO
;
st
->
codec
.
codec_id
=
s
->
format
->
video_codec
;
/* for mjpeg, specify frame rate */
if
(
st
->
codec
.
codec_id
==
CODEC_ID_MJPEG
)
{
if
(
ap
)
{
st
->
codec
.
frame_rate
=
ap
->
frame_rate
;
}
else
{
st
->
codec
.
frame_rate
=
25
*
FRAME_RATE_BASE
;
}
}
return
0
;
}
...
...
@@ -211,6 +216,21 @@ AVFormat mpeg1video_format = {
raw_read_close
,
};
AVFormat
mjpeg_format
=
{
"mjpeg"
,
"MJPEG video"
,
"video/x-mjpeg"
,
"mjpg,mjpeg"
,
0
,
CODEC_ID_MJPEG
,
raw_write_header
,
raw_write_packet
,
raw_write_trailer
,
video_read_header
,
raw_read_packet
,
raw_read_close
,
};
AVFormat
pcm_format
=
{
"pcm"
,
"pcm raw format"
,
...
...
libav/utils.c
View file @
27e084bd
...
...
@@ -132,12 +132,14 @@ void register_all(void)
register_avformat
(
&
ac3_format
);
register_avformat
(
&
mpeg_mux_format
);
register_avformat
(
&
mpeg1video_format
);
register_avformat
(
&
mjpeg_format
);
register_avformat
(
&
h263_format
);
register_avformat
(
&
rm_format
);
register_avformat
(
&
asf_format
);
register_avformat
(
&
avi_format
);
register_avformat
(
&
mpjpeg_format
);
register_avformat
(
&
jpeg_format
);
register_avformat
(
&
single_jpeg_format
);
register_avformat
(
&
swf_format
);
register_avformat
(
&
wav_format
);
register_avformat
(
&
pcm_format
);
...
...
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