Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e926b5ce
Commit
e926b5ce
authored
Apr 20, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: Drop unnecessary ff_ name prefixes from static functions
parent
7f75f2f2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
30 deletions
+34
-30
asfdec.c
libavformat/asfdec.c
+4
-4
audiointerleave.c
libavformat/audiointerleave.c
+3
-3
id3v2.c
libavformat/id3v2.c
+3
-2
mux.c
libavformat/mux.c
+3
-2
mxfenc.c
libavformat/mxfenc.c
+3
-2
rdt.c
libavformat/rdt.c
+5
-5
rtmppkt.c
libavformat/rtmppkt.c
+4
-3
rtsp.c
libavformat/rtsp.c
+9
-9
No files found.
libavformat/asfdec.c
View file @
e926b5ce
...
@@ -861,7 +861,7 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -861,7 +861,7 @@ static int asf_read_header(AVFormatContext *s)
* @param pb context to read data from
* @param pb context to read data from
* @return 0 on success, <0 on error
* @return 0 on success, <0 on error
*/
*/
static
int
ff_
asf_get_packet
(
AVFormatContext
*
s
,
AVIOContext
*
pb
)
static
int
asf_get_packet
(
AVFormatContext
*
s
,
AVIOContext
*
pb
)
{
{
ASFContext
*
asf
=
s
->
priv_data
;
ASFContext
*
asf
=
s
->
priv_data
;
uint32_t
packet_length
,
padsize
;
uint32_t
packet_length
,
padsize
;
...
@@ -1053,7 +1053,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb)
...
@@ -1053,7 +1053,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb)
* @return 0 if data was stored in pkt, <0 on error or 1 if more ASF
* @return 0 if data was stored in pkt, <0 on error or 1 if more ASF
* packets need to be loaded (through asf_get_packet())
* packets need to be loaded (through asf_get_packet())
*/
*/
static
int
ff_
asf_parse_packet
(
AVFormatContext
*
s
,
AVIOContext
*
pb
,
AVPacket
*
pkt
)
static
int
asf_parse_packet
(
AVFormatContext
*
s
,
AVIOContext
*
pb
,
AVPacket
*
pkt
)
{
{
ASFContext
*
asf
=
s
->
priv_data
;
ASFContext
*
asf
=
s
->
priv_data
;
ASFStream
*
asf_st
=
0
;
ASFStream
*
asf_st
=
0
;
...
@@ -1275,9 +1275,9 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -1275,9 +1275,9 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
int
ret
;
int
ret
;
/* parse cached packets, if any */
/* parse cached packets, if any */
if
((
ret
=
ff_
asf_parse_packet
(
s
,
s
->
pb
,
pkt
))
<=
0
)
if
((
ret
=
asf_parse_packet
(
s
,
s
->
pb
,
pkt
))
<=
0
)
return
ret
;
return
ret
;
if
((
ret
=
ff_
asf_get_packet
(
s
,
s
->
pb
))
<
0
)
if
((
ret
=
asf_get_packet
(
s
,
s
->
pb
))
<
0
)
assert
(
asf
->
packet_size_left
<
FRAME_HEADER_SIZE
||
assert
(
asf
->
packet_size_left
<
FRAME_HEADER_SIZE
||
asf
->
packet_segments
<
1
);
asf
->
packet_segments
<
1
);
asf
->
packet_time_start
=
0
;
asf
->
packet_time_start
=
0
;
...
...
libavformat/audiointerleave.c
View file @
e926b5ce
...
@@ -70,8 +70,8 @@ int ff_audio_interleave_init(AVFormatContext *s,
...
@@ -70,8 +70,8 @@ int ff_audio_interleave_init(AVFormatContext *s,
return
0
;
return
0
;
}
}
static
int
ff_
interleave_new_audio_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
,
static
int
interleave_new_audio_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
,
int
stream_index
,
int
flush
)
int
stream_index
,
int
flush
)
{
{
AVStream
*
st
=
s
->
streams
[
stream_index
];
AVStream
*
st
=
s
->
streams
[
stream_index
];
AudioInterleaveContext
*
aic
=
st
->
priv_data
;
AudioInterleaveContext
*
aic
=
st
->
priv_data
;
...
@@ -125,7 +125,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
...
@@ -125,7 +125,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
AVStream
*
st
=
s
->
streams
[
i
];
AVStream
*
st
=
s
->
streams
[
i
];
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
AVPacket
new_pkt
;
AVPacket
new_pkt
;
while
(
ff_
interleave_new_audio_packet
(
s
,
&
new_pkt
,
i
,
flush
))
while
(
interleave_new_audio_packet
(
s
,
&
new_pkt
,
i
,
flush
))
ff_interleave_add_packet
(
s
,
&
new_pkt
,
compare_ts
);
ff_interleave_add_packet
(
s
,
&
new_pkt
,
compare_ts
);
}
}
}
}
...
...
libavformat/id3v2.c
View file @
e926b5ce
...
@@ -527,7 +527,8 @@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34)
...
@@ -527,7 +527,8 @@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34)
return
NULL
;
return
NULL
;
}
}
static
void
ff_id3v2_parse
(
AVFormatContext
*
s
,
int
len
,
uint8_t
version
,
uint8_t
flags
,
ID3v2ExtraMeta
**
extra_meta
)
static
void
id3v2_parse
(
AVFormatContext
*
s
,
int
len
,
uint8_t
version
,
uint8_t
flags
,
ID3v2ExtraMeta
**
extra_meta
)
{
{
int
isv34
,
tlen
,
unsync
;
int
isv34
,
tlen
,
unsync
;
char
tag
[
5
];
char
tag
[
5
];
...
@@ -687,7 +688,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra
...
@@ -687,7 +688,7 @@ void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra
((
buf
[
7
]
&
0x7f
)
<<
14
)
|
((
buf
[
7
]
&
0x7f
)
<<
14
)
|
((
buf
[
8
]
&
0x7f
)
<<
7
)
|
((
buf
[
8
]
&
0x7f
)
<<
7
)
|
(
buf
[
9
]
&
0x7f
);
(
buf
[
9
]
&
0x7f
);
ff_
id3v2_parse
(
s
,
len
,
buf
[
3
],
buf
[
5
],
extra_meta
);
id3v2_parse
(
s
,
len
,
buf
[
3
],
buf
[
5
],
extra_meta
);
}
else
{
}
else
{
avio_seek
(
s
->
pb
,
off
,
SEEK_SET
);
avio_seek
(
s
->
pb
,
off
,
SEEK_SET
);
}
}
...
...
libavformat/mux.c
View file @
e926b5ce
...
@@ -479,7 +479,8 @@ next_non_null:
...
@@ -479,7 +479,8 @@ next_non_null:
*
next_point
=
this_pktl
;
*
next_point
=
this_pktl
;
}
}
static
int
ff_interleave_compare_dts
(
AVFormatContext
*
s
,
AVPacket
*
next
,
AVPacket
*
pkt
)
static
int
interleave_compare_dts
(
AVFormatContext
*
s
,
AVPacket
*
next
,
AVPacket
*
pkt
)
{
{
AVStream
*
st
=
s
->
streams
[
pkt
->
stream_index
];
AVStream
*
st
=
s
->
streams
[
pkt
->
stream_index
];
AVStream
*
st2
=
s
->
streams
[
next
->
stream_index
];
AVStream
*
st2
=
s
->
streams
[
next
->
stream_index
];
...
@@ -499,7 +500,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
...
@@ -499,7 +500,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
int
i
;
int
i
;
if
(
pkt
)
{
if
(
pkt
)
{
ff_interleave_add_packet
(
s
,
pkt
,
ff_
interleave_compare_dts
);
ff_interleave_add_packet
(
s
,
pkt
,
interleave_compare_dts
);
}
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
...
...
libavformat/mxfenc.c
View file @
e926b5ce
...
@@ -1546,7 +1546,7 @@ static int mxf_write_header(AVFormatContext *s)
...
@@ -1546,7 +1546,7 @@ static int mxf_write_header(AVFormatContext *s)
static
const
uint8_t
system_metadata_pack_key
[]
=
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x02
,
0x05
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x04
,
0x01
,
0x01
,
0x00
};
static
const
uint8_t
system_metadata_pack_key
[]
=
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x02
,
0x05
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x04
,
0x01
,
0x01
,
0x00
};
static
const
uint8_t
system_metadata_package_set_key
[]
=
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x02
,
0x43
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x04
,
0x01
,
0x02
,
0x01
};
static
const
uint8_t
system_metadata_package_set_key
[]
=
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x02
,
0x43
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x04
,
0x01
,
0x02
,
0x01
};
static
uint32_t
f
f_f
ramenum_to_12m_time_code
(
unsigned
frame
,
int
drop
,
int
fps
)
static
uint32_t
framenum_to_12m_time_code
(
unsigned
frame
,
int
drop
,
int
fps
)
{
{
return
(
0
<<
31
)
|
// color frame flag
return
(
0
<<
31
)
|
// color frame flag
(
drop
<<
30
)
|
// drop frame flag
(
drop
<<
30
)
|
// drop frame flag
...
@@ -1592,7 +1592,8 @@ static void mxf_write_system_item(AVFormatContext *s)
...
@@ -1592,7 +1592,8 @@ static void mxf_write_system_item(AVFormatContext *s)
avio_wb64
(
pb
,
0
);
// creation date/time stamp
avio_wb64
(
pb
,
0
);
// creation date/time stamp
avio_w8
(
pb
,
0x81
);
// SMPTE 12M time code
avio_w8
(
pb
,
0x81
);
// SMPTE 12M time code
time_code
=
ff_framenum_to_12m_time_code
(
frame
,
mxf
->
timecode_drop_frame
,
mxf
->
timecode_base
);
time_code
=
framenum_to_12m_time_code
(
frame
,
mxf
->
timecode_drop_frame
,
mxf
->
timecode_base
);
avio_wb32
(
pb
,
time_code
);
avio_wb32
(
pb
,
time_code
);
avio_wb32
(
pb
,
0
);
// binary group data
avio_wb32
(
pb
,
0
);
// binary group data
avio_wb64
(
pb
,
0
);
avio_wb64
(
pb
,
0
);
...
...
libavformat/rdt.c
View file @
e926b5ce
...
@@ -548,7 +548,7 @@ rdt_free_context (PayloadContext *rdt)
...
@@ -548,7 +548,7 @@ rdt_free_context (PayloadContext *rdt)
}
}
#define RDT_HANDLER(n, s, t) \
#define RDT_HANDLER(n, s, t) \
static RTPDynamicProtocolHandler
ff_
rdt_ ## n ## _handler = { \
static RTPDynamicProtocolHandler rdt_ ## n ## _handler = { \
.enc_name = s, \
.enc_name = s, \
.codec_type = t, \
.codec_type = t, \
.codec_id = AV_CODEC_ID_NONE, \
.codec_id = AV_CODEC_ID_NONE, \
...
@@ -565,8 +565,8 @@ RDT_HANDLER(audio, "x-pn-realaudio", AVMEDIA_TYPE_AUDIO);
...
@@ -565,8 +565,8 @@ RDT_HANDLER(audio, "x-pn-realaudio", AVMEDIA_TYPE_AUDIO);
void
av_register_rdt_dynamic_payload_handlers
(
void
)
void
av_register_rdt_dynamic_payload_handlers
(
void
)
{
{
ff_register_dynamic_payload_handler
(
&
ff_
rdt_video_handler
);
ff_register_dynamic_payload_handler
(
&
rdt_video_handler
);
ff_register_dynamic_payload_handler
(
&
ff_
rdt_audio_handler
);
ff_register_dynamic_payload_handler
(
&
rdt_audio_handler
);
ff_register_dynamic_payload_handler
(
&
ff_
rdt_live_video_handler
);
ff_register_dynamic_payload_handler
(
&
rdt_live_video_handler
);
ff_register_dynamic_payload_handler
(
&
ff_
rdt_live_audio_handler
);
ff_register_dynamic_payload_handler
(
&
rdt_live_audio_handler
);
}
}
libavformat/rtmppkt.c
View file @
e926b5ce
...
@@ -438,7 +438,8 @@ static const char* rtmp_packet_type(int type)
...
@@ -438,7 +438,8 @@ static const char* rtmp_packet_type(int type)
}
}
}
}
static
void
ff_amf_tag_contents
(
void
*
ctx
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
)
static
void
amf_tag_contents
(
void
*
ctx
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
)
{
{
unsigned
int
size
;
unsigned
int
size
;
char
buf
[
1024
];
char
buf
[
1024
];
...
@@ -484,7 +485,7 @@ static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *d
...
@@ -484,7 +485,7 @@ static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *d
return
;
return
;
data
+=
size
;
data
+=
size
;
av_log
(
ctx
,
AV_LOG_DEBUG
,
" %s: "
,
buf
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
" %s: "
,
buf
);
ff_
amf_tag_contents
(
ctx
,
data
,
data_end
);
amf_tag_contents
(
ctx
,
data
,
data_end
);
t
=
ff_amf_tag_size
(
data
,
data_end
);
t
=
ff_amf_tag_size
(
data
,
data_end
);
if
(
t
<
0
||
t
>=
data_end
-
data
)
if
(
t
<
0
||
t
>=
data_end
-
data
)
return
;
return
;
...
@@ -507,7 +508,7 @@ void ff_rtmp_packet_dump(void *ctx, RTMPPacket *p)
...
@@ -507,7 +508,7 @@ void ff_rtmp_packet_dump(void *ctx, RTMPPacket *p)
uint8_t
*
src
=
p
->
data
,
*
src_end
=
p
->
data
+
p
->
data_size
;
uint8_t
*
src
=
p
->
data
,
*
src_end
=
p
->
data
+
p
->
data_size
;
while
(
src
<
src_end
)
{
while
(
src
<
src_end
)
{
int
sz
;
int
sz
;
ff_
amf_tag_contents
(
ctx
,
src
,
src_end
);
amf_tag_contents
(
ctx
,
src
,
src_end
);
sz
=
ff_amf_tag_size
(
src
,
src_end
);
sz
=
ff_amf_tag_size
(
src
,
src_end
);
if
(
sz
<
0
)
if
(
sz
<
0
)
break
;
break
;
...
...
libavformat/rtsp.c
View file @
e926b5ce
...
@@ -1118,11 +1118,11 @@ start:
...
@@ -1118,11 +1118,11 @@ start:
*
*
* @return zero if success, nonzero otherwise
* @return zero if success, nonzero otherwise
*/
*/
static
int
ff_
rtsp_send_cmd_with_content_async
(
AVFormatContext
*
s
,
static
int
rtsp_send_cmd_with_content_async
(
AVFormatContext
*
s
,
const
char
*
method
,
const
char
*
url
,
const
char
*
method
,
const
char
*
url
,
const
char
*
headers
,
const
char
*
headers
,
const
unsigned
char
*
send_content
,
const
unsigned
char
*
send_content
,
int
send_content_length
)
int
send_content_length
)
{
{
RTSPState
*
rt
=
s
->
priv_data
;
RTSPState
*
rt
=
s
->
priv_data
;
char
buf
[
4096
],
*
out_buf
;
char
buf
[
4096
],
*
out_buf
;
...
@@ -1175,7 +1175,7 @@ static int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
...
@@ -1175,7 +1175,7 @@ static int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
int
ff_rtsp_send_cmd_async
(
AVFormatContext
*
s
,
const
char
*
method
,
int
ff_rtsp_send_cmd_async
(
AVFormatContext
*
s
,
const
char
*
method
,
const
char
*
url
,
const
char
*
headers
)
const
char
*
url
,
const
char
*
headers
)
{
{
return
ff_
rtsp_send_cmd_with_content_async
(
s
,
method
,
url
,
headers
,
NULL
,
0
);
return
rtsp_send_cmd_with_content_async
(
s
,
method
,
url
,
headers
,
NULL
,
0
);
}
}
int
ff_rtsp_send_cmd
(
AVFormatContext
*
s
,
const
char
*
method
,
const
char
*
url
,
int
ff_rtsp_send_cmd
(
AVFormatContext
*
s
,
const
char
*
method
,
const
char
*
url
,
...
@@ -1200,9 +1200,9 @@ int ff_rtsp_send_cmd_with_content(AVFormatContext *s,
...
@@ -1200,9 +1200,9 @@ int ff_rtsp_send_cmd_with_content(AVFormatContext *s,
retry:
retry:
cur_auth_type
=
rt
->
auth_state
.
auth_type
;
cur_auth_type
=
rt
->
auth_state
.
auth_type
;
if
((
ret
=
ff_
rtsp_send_cmd_with_content_async
(
s
,
method
,
url
,
header
,
if
((
ret
=
rtsp_send_cmd_with_content_async
(
s
,
method
,
url
,
header
,
send_content
,
send_content
,
send_content_length
)))
send_content_length
)))
return
ret
;
return
ret
;
if
((
ret
=
ff_rtsp_read_reply
(
s
,
reply
,
content_ptr
,
0
,
method
)
)
<
0
)
if
((
ret
=
ff_rtsp_read_reply
(
s
,
reply
,
content_ptr
,
0
,
method
)
)
<
0
)
...
...
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