Added the DOWNLOAD_ENABLED file flag. Write an object version of 0 in the RMF header.

This commit is contained in:
Moritz Bunkus 2004-03-23 20:37:47 +00:00
parent d496feb1e4
commit 70ff758f33
2 changed files with 8 additions and 5 deletions

View File

@ -173,13 +173,16 @@ extern "C" {
/** \brief The stream may be saved to disc. Can be set in the /** \brief The stream may be saved to disc. Can be set in the
\link ::rmff_prop_t PROP header\endlink. */ \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 /** \brief Allows the client to use extra buffering. Can be set in the
\link ::rmff_prop_t PROP header\endlink. */ \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 /** \brief The stream is being generated by a live broadcast. Can be set in the
\link ::rmff_prop_t PROP header\endlink. */ \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. /** \brief The global PROP file header.

View File

@ -371,7 +371,7 @@ open_file_for_writing(const char *path,
/* save allowed & perfect play */ /* save allowed & perfect play */
rmff_put_uint16_be(&file->prop_header.flags, rmff_put_uint16_be(&file->prop_header.flags,
RMFF_FILE_FLAG_SAVE_ENABLED | RMFF_FILE_FLAG_SAVE_ENABLED |
RMFF_FILE_FLAG_PERFECT_PLAY); RMFF_FILE_FLAG_DOWNLOAD_ENABLED);
clear_error(); clear_error();
return file; return file;
@ -1065,7 +1065,7 @@ rmff_write_headers(rmff_file_t *file) {
/* Write the file header. */ /* Write the file header. */
bw = io->write(fh, signature, 4); bw = io->write(fh, signature, 4);
bw += write_uint32_be(0x12); /* header_size */ 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(0); /* file_version */
bw += write_uint32_be(num_headers); bw += write_uint32_be(num_headers);