Loading media/libstagefright/MPEG4Writer.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -567,6 +567,7 @@ void MPEG4Writer::initInternal(int fd, bool isFirstSession) { mDone = false; mThread = 0; mDriftTimeUs = 0; mHasDolbyVision = false; // Following variables only need to be set for the first recording session. // And they will stay the same for all the recording sessions. Loading Loading @@ -714,6 +715,7 @@ status_t MPEG4Writer::addSource(const sp<MediaSource> &source) { // So we let the creation of the new track now and // assign FourCC codes later using getDoviFourCC() ALOGV("Add source mime '%s'", mime); mHasDolbyVision = true; } else if (Track::getFourCCForMime(mime) == NULL) { ALOGE("Unsupported mime '%s'", mime); return ERROR_UNSUPPORTED; Loading Loading @@ -1576,6 +1578,13 @@ void MPEG4Writer::writeFtypBox(MetaData *param) { break; } } // The brand ‘dby1’ should be used in the compatible_brands field to indicate that the file // is compliant with all Dolby Extensions. For details, refer to // https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby_vision_bitstreams_within_the_iso_base_media_file_format_dec2017.pdf // Chapter 7, Dolby Vision Files. if (fileType == OUTPUT_FORMAT_MPEG_4 && mHasDolbyVision) { writeFourcc("dby1"); } } endBox(); Loading media/libstagefright/include/media/stagefright/MPEG4Writer.h +2 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,8 @@ private: std::map<uint32_t, ItemInfo> mItems; Vector<ItemProperty> mProperties; bool mHasDolbyVision; // Writer thread handling status_t startWriterThread(); status_t stopWriterThread(); Loading Loading
media/libstagefright/MPEG4Writer.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -567,6 +567,7 @@ void MPEG4Writer::initInternal(int fd, bool isFirstSession) { mDone = false; mThread = 0; mDriftTimeUs = 0; mHasDolbyVision = false; // Following variables only need to be set for the first recording session. // And they will stay the same for all the recording sessions. Loading Loading @@ -714,6 +715,7 @@ status_t MPEG4Writer::addSource(const sp<MediaSource> &source) { // So we let the creation of the new track now and // assign FourCC codes later using getDoviFourCC() ALOGV("Add source mime '%s'", mime); mHasDolbyVision = true; } else if (Track::getFourCCForMime(mime) == NULL) { ALOGE("Unsupported mime '%s'", mime); return ERROR_UNSUPPORTED; Loading Loading @@ -1576,6 +1578,13 @@ void MPEG4Writer::writeFtypBox(MetaData *param) { break; } } // The brand ‘dby1’ should be used in the compatible_brands field to indicate that the file // is compliant with all Dolby Extensions. For details, refer to // https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby_vision_bitstreams_within_the_iso_base_media_file_format_dec2017.pdf // Chapter 7, Dolby Vision Files. if (fileType == OUTPUT_FORMAT_MPEG_4 && mHasDolbyVision) { writeFourcc("dby1"); } } endBox(); Loading
media/libstagefright/include/media/stagefright/MPEG4Writer.h +2 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,8 @@ private: std::map<uint32_t, ItemInfo> mItems; Vector<ItemProperty> mProperties; bool mHasDolbyVision; // Writer thread handling status_t startWriterThread(); status_t stopWriterThread(); Loading