chromium/media/base/stream_parser_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/base/stream_parser.h"

#include <stddef.h>
#include <stdint.h>

#include <map>
#include <sstream>

#include "base/ranges/algorithm.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/test_data_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

TrackId;
BufferQueue;

const int kEnd =;
const uint8_t kFakeData[] =;
const TrackId kAudioTrackId =;
const TrackId kVideoTrackId =;

static bool IsAudio(scoped_refptr<StreamParserBuffer> buffer) {}

static bool IsVideo(scoped_refptr<StreamParserBuffer> buffer) {}

// Creates and appends a sequence of StreamParserBuffers to the provided
// |queue|. |decode_timestamps| determines the number of appended buffers and
// their sequence of decode timestamps; a |kEnd| timestamp indicates the
// end of the sequence and no buffer is appended for it. Each new buffer's
// type will be |type| with track ID set to |track_id|.
static void GenerateBuffers(const int* decode_timestamps,
                            StreamParserBuffer::Type type,
                            TrackId track_id,
                            BufferQueue* queue) {}

class StreamParserTest : public testing::Test {};

TEST_F(StreamParserTest, MergeBufferQueues_AllEmpty) {}

TEST_F(StreamParserTest, MergeBufferQueues_SingleAudioBuffer) {}

TEST_F(StreamParserTest, MergeBufferQueues_SingleVideoBuffer) {}

TEST_F(StreamParserTest, MergeBufferQueues_OverlappingAudioVideo) {}

TEST_F(StreamParserTest, MergeBufferQueues_NonDecreasingNoCrossMediaDuplicate) {}

TEST_F(StreamParserTest, MergeBufferQueues_CrossStreamDuplicates) {}

TEST_F(StreamParserTest, MergeBufferQueues_InvalidDecreasingSingleStream) {}

TEST_F(StreamParserTest, MergeBufferQueues_InvalidDecreasingMultipleStreams) {}

TEST_F(StreamParserTest, MergeBufferQueues_ValidAppendToExistingMerge) {}

TEST_F(StreamParserTest, MergeBufferQueues_InvalidAppendToExistingMerge) {}

}  // namespace media