Commit aefea4d0 authored by Martin Storsjö's avatar Martin Storsjö

Rename ff_put_string to avpriv_put_string

This allows using it from libavformat as well. This will be used
by the RTP/JPEG depacketizer.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent a0845bae
...@@ -46,7 +46,7 @@ void avpriv_align_put_bits(PutBitContext *s) ...@@ -46,7 +46,7 @@ void avpriv_align_put_bits(PutBitContext *s)
put_bits(s,s->bit_left & 7,0); put_bits(s,s->bit_left & 7,0);
} }
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string) void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string)
{ {
while(*string){ while(*string){
put_bits(pb, 8, *string); put_bits(pb, 8, *string);
......
...@@ -161,7 +161,7 @@ static void jpeg_put_comments(MpegEncContext *s) ...@@ -161,7 +161,7 @@ static void jpeg_put_comments(MpegEncContext *s)
/* JFIF header */ /* JFIF header */
put_marker(p, APP0); put_marker(p, APP0);
put_bits(p, 16, 16); put_bits(p, 16, 16);
ff_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */ avpriv_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
put_bits(p, 16, 0x0201); /* v 1.02 */ put_bits(p, 16, 0x0201); /* v 1.02 */
put_bits(p, 8, 0); /* units type: 0 - aspect ratio */ put_bits(p, 8, 0); /* units type: 0 - aspect ratio */
put_bits(p, 16, s->avctx->sample_aspect_ratio.num); put_bits(p, 16, s->avctx->sample_aspect_ratio.num);
...@@ -176,7 +176,7 @@ static void jpeg_put_comments(MpegEncContext *s) ...@@ -176,7 +176,7 @@ static void jpeg_put_comments(MpegEncContext *s)
flush_put_bits(p); flush_put_bits(p);
ptr = put_bits_ptr(p); ptr = put_bits_ptr(p);
put_bits(p, 16, 0); /* patched later */ put_bits(p, 16, 0); /* patched later */
ff_put_string(p, LIBAVCODEC_IDENT, 1); avpriv_put_string(p, LIBAVCODEC_IDENT, 1);
size = strlen(LIBAVCODEC_IDENT)+3; size = strlen(LIBAVCODEC_IDENT)+3;
AV_WB16(ptr, size); AV_WB16(ptr, size);
} }
...@@ -188,7 +188,7 @@ static void jpeg_put_comments(MpegEncContext *s) ...@@ -188,7 +188,7 @@ static void jpeg_put_comments(MpegEncContext *s)
flush_put_bits(p); flush_put_bits(p);
ptr = put_bits_ptr(p); ptr = put_bits_ptr(p);
put_bits(p, 16, 0); /* patched later */ put_bits(p, 16, 0); /* patched later */
ff_put_string(p, "CS=ITU601", 1); avpriv_put_string(p, "CS=ITU601", 1);
size = strlen("CS=ITU601")+3; size = strlen("CS=ITU601")+3;
AV_WB16(ptr, size); AV_WB16(ptr, size);
} }
......
...@@ -1022,7 +1022,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n ...@@ -1022,7 +1022,7 @@ static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_n
if(!(s->flags & CODEC_FLAG_BITEXACT)){ if(!(s->flags & CODEC_FLAG_BITEXACT)){
put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x1B2); /* user_data */ put_bits(&s->pb, 16, 0x1B2); /* user_data */
ff_put_string(&s->pb, LIBAVCODEC_IDENT, 0); avpriv_put_string(&s->pb, LIBAVCODEC_IDENT, 0);
} }
} }
......
...@@ -98,7 +98,7 @@ static inline void flush_put_bits(PutBitContext *s) ...@@ -98,7 +98,7 @@ static inline void flush_put_bits(PutBitContext *s)
#ifdef BITSTREAM_WRITER_LE #ifdef BITSTREAM_WRITER_LE
#define avpriv_align_put_bits align_put_bits_unsupported_here #define avpriv_align_put_bits align_put_bits_unsupported_here
#define ff_put_string ff_put_string_unsupported_here #define avpriv_put_string ff_put_string_unsupported_here
#define avpriv_copy_bits avpriv_copy_bits_unsupported_here #define avpriv_copy_bits avpriv_copy_bits_unsupported_here
#else #else
/** /**
...@@ -111,7 +111,7 @@ void avpriv_align_put_bits(PutBitContext *s); ...@@ -111,7 +111,7 @@ void avpriv_align_put_bits(PutBitContext *s);
* *
* @param terminate_string 0-terminates the written string if value is 1 * @param terminate_string 0-terminates the written string if value is 1
*/ */
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string); void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string);
/** /**
* Copy the content of src to the bitstream. * Copy the content of src to the bitstream.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment