From 70ff758f33a2f5d06bbaf443117ba484b763860e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 23 Mar 2004 20:37:47 +0000 Subject: [PATCH] Added the DOWNLOAD_ENABLED file flag. Write an object version of 0 in the RMF header. --- librmff/librmff.h | 9 ++++++--- librmff/rmff.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/librmff/librmff.h b/librmff/librmff.h index 0049c1fcb..844f88dab 100644 --- a/librmff/librmff.h +++ b/librmff/librmff.h @@ -173,13 +173,16 @@ extern "C" { /** \brief The stream may be saved to disc. Can be set in the \link ::rmff_prop_t PROP header\endlink. */ -#define RMFF_FILE_FLAG_SAVE_ENABLED 0x0001 +#define RMFF_FILE_FLAG_SAVE_ENABLED 0x0001 /** \brief Allows the client to use extra buffering. Can be set in the \link ::rmff_prop_t PROP header\endlink. */ -#define RMFF_FILE_FLAG_PERFECT_PLAY 0x0002 +#define RMFF_FILE_FLAG_PERFECT_PLAY 0x0002 /** \brief The stream is being generated by a live broadcast. Can be set in the \link ::rmff_prop_t PROP header\endlink. */ -#define RMFF_FILE_FLAG_LIVE_BROADCAST 0x0004 +#define RMFF_FILE_FLAG_LIVE_BROADCAST 0x0004 +/** \brief The stream may be downloaded. Can be set in the + \link ::rmff_prop_t PROP header\endlink. */ +#define RMFF_FILE_FLAG_DOWNLOAD_ENABLED 0x0008 /** \brief The global PROP file header. diff --git a/librmff/rmff.c b/librmff/rmff.c index f8fa3e656..3b140a02d 100644 --- a/librmff/rmff.c +++ b/librmff/rmff.c @@ -371,7 +371,7 @@ open_file_for_writing(const char *path, /* save allowed & perfect play */ rmff_put_uint16_be(&file->prop_header.flags, RMFF_FILE_FLAG_SAVE_ENABLED | - RMFF_FILE_FLAG_PERFECT_PLAY); + RMFF_FILE_FLAG_DOWNLOAD_ENABLED); clear_error(); return file; @@ -1065,7 +1065,7 @@ rmff_write_headers(rmff_file_t *file) { /* Write the file header. */ bw = io->write(fh, signature, 4); bw += write_uint32_be(0x12); /* header_size */ - bw += write_uint16_be(1); /* object_version */ + bw += write_uint16_be(0); /* object_version */ bw += write_uint32_be(0); /* file_version */ bw += write_uint32_be(num_headers);