summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--help/help_mp-en.h10
-rw-r--r--libmpdemux/muxer.c12
-rw-r--r--libmpdemux/muxer_avi.c3
-rw-r--r--libmpdemux/muxer_lavf.c5
-rw-r--r--libmpdemux/muxer_mpeg.c5
-rw-r--r--mencoder.c2
6 files changed, 22 insertions, 15 deletions
diff --git a/help/help_mp-en.h b/help/help_mp-en.h
index 2285ba101f..b966251ff6 100644
--- a/help/help_mp-en.h
+++ b/help/help_mp-en.h
@@ -241,7 +241,6 @@ static char help_text[]=
#define MSGTR_EncoderOpenFailed "Failed to open the encoder.\n"
#define MSGTR_ForcingOutputFourcc "Forcing output fourcc to %x [%.4s]\n"
#define MSGTR_ForcingOutputAudiofmtTag "Forcing output audio format tag to 0x%x\n"
-#define MSGTR_WritingAVIHeader "Writing AVI header...\n"
#define MSGTR_DuplicateFrames "\n%d duplicate frame(s)!\n"
#define MSGTR_SkipFrame "\nSkipping frame!\n"
#define MSGTR_ResolutionDoesntMatch "\nNew video file has different resolution or colorspace than the previous one.\n"
@@ -251,8 +250,6 @@ static char help_text[]=
#define MSGTR_NoSpeedWithFrameCopy "WARNING: -speed is not guaranteed to work correctly with -oac copy!\n"\
"Your encode might be broken!\n"
#define MSGTR_ErrorWritingFile "%s: Error writing file.\n"
-#define MSGTR_WritingAVIIndex "\nWriting AVI index...\n"
-#define MSGTR_FixupAVIHeader "Fixing AVI header...\n"
#define MSGTR_RecommendedVideoBitrate "Recommended video bitrate for %s CD: %d\n"
#define MSGTR_VideoStreamResult "\nVideo stream: %8.3f kbit/s (%d B/s) size: %d bytes %5.3f secs %d frames\n"
#define MSGTR_AudioStreamResult "\nAudio stream: %8.3f kbit/s (%d B/s) size: %d bytes %5.3f secs\n"
@@ -519,12 +516,17 @@ static char help_text[]=
#define MSGTR_DVDsubtitleChannel "Selected DVD subtitle channel: %d language: %c%c\n"
#define MSGTR_DVDopenOk "DVD successfully opened.\n"
-// muxer_*.c:
+// muxer.c, muxer_*.c:
#define MSGTR_TooManyStreams "Too many streams!"
#define MSGTR_RawMuxerOnlyOneStream "Rawaudio muxer supports only one audio stream!\n"
#define MSGTR_IgnoringVideoStream "Ignoring video stream!\n"
#define MSGTR_UnknownStreamType "Warning! unknown stream type: %d\n"
#define MSGTR_WarningLenIsntDivisible "Warning! len isn't divisible by samplesize!\n"
+#define MSGTR_MuxbufMallocErr "Muxer frame buffer cannot allocate memory!\n"
+#define MSGTR_MuxbufReallocErr "Muxer frame buffer cannot reallocate memory!\n"
+#define MSGTR_MuxbufSending "Muxer frame buffer sending %d frame(s) to muxer.\n"
+#define MSGTR_WritingHeader "Writing header...\n"
+#define MSGTR_WritingTrailer "Writing index...\n"
// demuxer.c, demux_*.c:
#define MSGTR_AudioStreamRedefined "WARNING: Audio stream header %d redefined.\n"
diff --git a/libmpdemux/muxer.c b/libmpdemux/muxer.c
index e367198df2..fa2574c50e 100644
--- a/libmpdemux/muxer.c
+++ b/libmpdemux/muxer.c
@@ -62,7 +62,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags) {
tmp = realloc(s->muxer->muxbuf, (num+1) * sizeof(muxbuf_t));
if(!tmp) {
- mp_msg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot reallocate memory!\n");
+ mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufReallocErr);
return;
}
s->muxer->muxbuf = tmp;
@@ -75,7 +75,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags) {
buf->flags = flags;
buf->buffer = malloc(len * sizeof (unsigned char));
if (!buf->buffer) {
- mp_msg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot allocate memory!\n");
+ mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr);
return;
}
memcpy(buf->buffer, s->buffer, buf->len);
@@ -91,11 +91,10 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags) {
if (s->muxer->muxbuf_skip_buffer) {
muxbuf_t *tmp_buf = malloc(sizeof(muxbuf_t));
if (!tmp_buf) {
- mp_msg(MSGT_MUXER, MSGL_FATAL, "Muxer frame buffer cannot allocate memory!\n");
+ mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufMallocErr);
return;
}
- mp_msg(MSGT_MUXER, MSGL_V, "Muxer frame buffer sending %d frame(s) to muxer.\n",
- s->muxer->muxbuf_num);
+ mp_msg(MSGT_MUXER, MSGL_V, MSGTR_MuxbufSending, s->muxer->muxbuf_num);
/* fix parameters for all streams */
for (num = 0; s->muxer->streams[num]; ++num) {
@@ -105,7 +104,6 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags) {
}
/* write header */
- mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingAVIHeader);
if (s->muxer->cont_write_header)
muxer_write_header(s->muxer);
@@ -139,7 +137,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags) {
if(s->h.dwSampleSize){
// CBR
s->h.dwLength+=len/s->h.dwSampleSize;
- if(len%s->h.dwSampleSize) mp_msg(MSGT_MUXER, MSGL_WARN, "Warning! len isn't divisable by samplesize!\n");
+ if(len%s->h.dwSampleSize) mp_msg(MSGT_MUXER, MSGL_WARN, MSGTR_WarningLenIsntDivisible);
} else {
// VBR
s->h.dwLength++;
diff --git a/libmpdemux/muxer_avi.c b/libmpdemux/muxer_avi.c
index b9a3ec9183..1a4b7319a4 100644
--- a/libmpdemux/muxer_avi.c
+++ b/libmpdemux/muxer_avi.c
@@ -18,6 +18,7 @@
#include "aviheader.h"
#include "ms_hdr.h"
#include "mp_msg.h"
+#include "help_mp.h"
extern char *info_name;
extern char *info_artist;
@@ -277,6 +278,7 @@ static void avifile_write_header(muxer_t *muxer){
struct avi_stream_info *vsi = muxer->def_v->priv;
int isodml = vsi->riffofspos > 0;
+ mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader);
if (aspect == 0) {
mp_msg(MSGT_MUXER, MSGL_INFO, "ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.\n");
} else {
@@ -642,6 +644,7 @@ static void avifile_write_standard_index(muxer_t *muxer){
static void avifile_write_index(muxer_t *muxer){
struct avi_stream_info *vsi = muxer->def_v->priv;
+ mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer);
if (vsi->riffofspos > 0){
avifile_odml_write_index(muxer);
} else {
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index a2e1b5888b..8177712cc0 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -6,6 +6,7 @@
#include "config.h"
#include "version.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "bswap.h"
#include "aviheader.h"
@@ -266,9 +267,9 @@ static void write_header(muxer_t *muxer)
{
muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
+ mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader);
av_write_header(priv->oc);
muxer->cont_write_header = NULL;
- mp_msg(MSGT_MUXER, MSGL_INFO, "WRITTEN HEADER\n");
}
@@ -277,8 +278,8 @@ static void write_trailer(muxer_t *muxer)
int i;
muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
+ mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer);
av_write_trailer(priv->oc);
- mp_msg(MSGT_MUXER, MSGL_INFO, "WRITTEN TRAILER\n");
for(i = 0; i < priv->oc->nb_streams; i++)
{
av_freep(&(priv->oc->streams[i]));
diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c
index 4086a1d9c7..ce3108932c 100644
--- a/libmpdemux/muxer_mpeg.c
+++ b/libmpdemux/muxer_mpeg.c
@@ -7,6 +7,7 @@
#include "config.h"
#include "version.h"
#include "mp_msg.h"
+#include "help_mp.h"
#include "bswap.h"
@@ -2555,6 +2556,8 @@ static void mpegfile_write_index(muxer_t *muxer)
double fake_timer;
muxer_priv_t *priv = (muxer_priv_t *) muxer->priv;
+ mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingTrailer);
+
for(i = 0; i < muxer->avih.dwStreams; i++)
{
if(muxer->streams[i]->type == MUXER_TYPE_AUDIO)
@@ -2572,6 +2575,8 @@ static void mpegfile_write_header(muxer_t *muxer)
{
muxer_priv_t *priv = (muxer_priv_t*) muxer->priv;
+ mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_WritingHeader);
+
priv->headers_cnt++;
if((priv->is_genmpeg1 || priv->is_genmpeg2) && (priv->headers_cnt == muxer->avih.dwStreams))
diff --git a/mencoder.c b/mencoder.c
index 2a6dd432c9..ac575e1ec1 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1508,10 +1508,8 @@ if(aencoder)
if(aencoder->fixup)
aencoder->fixup(aencoder);
-mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_WritingAVIIndex);
if (muxer->cont_write_index) muxer_write_index(muxer);
muxer_f_size=ftello(muxer_f);
-mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_FixupAVIHeader);
fseek(muxer_f,0,SEEK_SET);
if (muxer->cont_write_header) muxer_write_header(muxer); // update header
if(ferror(muxer_f) || fclose(muxer_f) != 0) {