mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 06:15:24 +00:00
timestamp_calculator_c: add_timestamp
overload with boost::optional<int64_t>
This commit is contained in:
parent
9afc43b209
commit
07ab76f377
@ -45,10 +45,17 @@ timestamp_calculator_c::add_timestamp(timestamp_c const ×tamp,
|
||||
void
|
||||
timestamp_calculator_c::add_timestamp(int64_t timestamp,
|
||||
boost::optional<uint64_t> stream_position) {
|
||||
if (-1 != timestamp)
|
||||
if (0 <= timestamp)
|
||||
add_timestamp(timestamp_c::ns(timestamp), stream_position);
|
||||
}
|
||||
|
||||
void
|
||||
timestamp_calculator_c::add_timestamp(boost::optional<int64_t> const ×tamp,
|
||||
boost::optional<uint64_t> stream_position) {
|
||||
if (timestamp && (0 <= *timestamp))
|
||||
add_timestamp(timestamp_c::ns(*timestamp), stream_position);
|
||||
}
|
||||
|
||||
void
|
||||
timestamp_calculator_c::add_timestamp(packet_cptr const &packet,
|
||||
boost::optional<uint64_t> stream_position) {
|
||||
|
@ -34,6 +34,7 @@ private:
|
||||
public:
|
||||
timestamp_calculator_c(int64_t samples_per_second);
|
||||
|
||||
void add_timestamp(boost::optional<int64_t> const ×tamp, boost::optional<uint64_t> stream_position = boost::none);
|
||||
void add_timestamp(timestamp_c const ×tamp, boost::optional<uint64_t> stream_position = boost::none);
|
||||
void add_timestamp(int64_t timestamp, boost::optional<uint64_t> stream_position = boost::none);
|
||||
void add_timestamp(packet_cptr const &packet, boost::optional<uint64_t> stream_position = boost::none);
|
||||
|
Loading…
Reference in New Issue
Block a user