gecko-dev/dom/media/TrackID.h
Chris Pearce e4e1189f9a Bug 1395021 - Move TrackID definition from StreamTracks.h into TrackID.h. r=jwwang
This means that MediaInfo.h doesn't need to include StreamTracks.h, which pulls
in MediaSegment.h and the MSG and a bunch of DOM bindings stuff.

MozReview-Commit-ID: 6JSO1dxJq8k

--HG--
extra : rebase_source : c5ca38a6e0b297e4e05db3b23c7c2ead49e9f8bc
2017-08-30 15:24:54 +12:00

28 lines
876 B
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MOZILLA_TRACK_ID_H_
#define MOZILLA_TRACK_ID_H_
namespace mozilla {
/**
* Unique ID for track within a StreamTracks. Tracks from different
* StreamTrackss may have the same ID; this matters when appending StreamTrackss,
* since tracks with the same ID are matched. Only IDs greater than 0 are allowed.
*/
typedef int32_t TrackID;
const TrackID TRACK_NONE = 0;
const TrackID TRACK_INVALID = -1;
const TrackID TRACK_ANY = -2;
inline bool IsTrackIDExplicit(const TrackID& aId) {
return aId > TRACK_NONE;
}
} // namespace mozilla
#endif // MOZILLA_TRACK_ID_H_