Revision 4568325a

View differences:

ffmpeg.c
166 166

  
167 167
static int64_t recording_time = 0;
168 168
static int64_t start_time = 0;
169
static int64_t rec_timestamp = 0;
169 170
static int file_overwrite = 0;
170 171
static char *str_title = NULL;
171 172
static char *str_author = NULL;
......
2213 2214
    start_time = parse_date(arg, 1);
2214 2215
}
2215 2216

  
2217
static void opt_rec_timestamp(const char *arg)
2218
{
2219
    rec_timestamp = parse_date(arg, 0) / 1000000;
2220
}
2221

  
2216 2222
static void opt_input_file(const char *filename)
2217 2223
{
2218 2224
    AVFormatContext *ic;
......
2658 2664
            exit(1);
2659 2665
        }
2660 2666

  
2661
        if (str_title)
2667
        oc->timestamp = rec_timestamp;
2668
	    
2669
	if (str_title)
2662 2670
            pstrcpy(oc->title, sizeof(oc->title), str_title);
2663 2671
        if (str_author)
2664 2672
            pstrcpy(oc->author, sizeof(oc->author), str_author);
......
3127 3135
    { "t", HAS_ARG, {(void*)opt_recording_time}, "set the recording time", "duration" },
3128 3136
    { "ss", HAS_ARG, {(void*)opt_start_time}, "set the start time offset", "time_off" },
3129 3137
    { "title", HAS_ARG | OPT_STRING, {(void*)&str_title}, "set the title", "string" },
3138
    { "timestamp", HAS_ARG, {(void*)&opt_rec_timestamp}, "set the timestamp", "time" },
3130 3139
    { "author", HAS_ARG | OPT_STRING, {(void*)&str_author}, "set the author", "string" },
3131 3140
    { "copyright", HAS_ARG | OPT_STRING, {(void*)&str_copyright}, "set the copyright", "string" },
3132 3141
    { "comment", HAS_ARG | OPT_STRING, {(void*)&str_comment}, "set the comment", "string" },
ffserver.c
26 26
#include <sys/poll.h>
27 27
#include <errno.h>
28 28
#include <sys/time.h>
29
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
29 30
#include <time.h>
30 31
#include <sys/types.h>
31 32
#include <sys/socket.h>
libavformat/avformat.h
251 251
    AVStream *streams[MAX_STREAMS];
252 252
    char filename[1024]; /* input or output filename */
253 253
    /* stream info */
254
    int64_t timestamp;
254 255
    char title[512];
255 256
    char author[512];
256 257
    char copyright[512];
libavformat/dv.c
685 685
    /* Ok, everything seems to be in working order */
686 686
    c->frames = 0;
687 687
    c->has_audio = c->has_video = 0;
688
    c->start_time = 0;
688
    c->start_time = (time_t)s->timestamp;
689 689
    c->aspect = 0; /* 4:3 is the default */
690 690
    if ((int)(av_q2d(vst->codec.sample_aspect_ratio) * vst->codec.width / vst->codec.height * 10) == 17) /* 16:9 */ 
691 691
        c->aspect = 0x07;

Also available in: Unified diff