Miscellaneous cleanups.
stream_generator.h doesn't use anything from <string.h>. Replace <string.h> with <stdint.h> for the intXXX_t typedefs. Rename packet_buffer to packet_buffer_ to conform to the naming convention of data members. R=marpan@google.com, marpan@webrtc.org, phoglund@webrtc.org BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/51949004 Cr-Commit-Position: refs/heads/master@{#9387}
This commit is contained in:
parent
349c2bb223
commit
55b6acbdc5
@ -29,7 +29,7 @@ void StreamGenerator::Init(uint16_t start_seq_num, int64_t current_time) {
|
|||||||
packets_.clear();
|
packets_.clear();
|
||||||
sequence_number_ = start_seq_num;
|
sequence_number_ = start_seq_num;
|
||||||
start_time_ = current_time;
|
start_time_ = current_time;
|
||||||
memset(&packet_buffer, 0, sizeof(packet_buffer));
|
memset(packet_buffer_, 0, sizeof(packet_buffer_));
|
||||||
}
|
}
|
||||||
|
|
||||||
void StreamGenerator::GenerateFrame(FrameType type,
|
void StreamGenerator::GenerateFrame(FrameType type,
|
||||||
@ -66,7 +66,7 @@ VCMPacket StreamGenerator::GeneratePacket(uint16_t sequence_number,
|
|||||||
packet.isFirstPacket = first_packet;
|
packet.isFirstPacket = first_packet;
|
||||||
packet.markerBit = marker_bit;
|
packet.markerBit = marker_bit;
|
||||||
packet.sizeBytes = size;
|
packet.sizeBytes = size;
|
||||||
packet.dataPtr = packet_buffer;
|
packet.dataPtr = packet_buffer_;
|
||||||
if (packet.isFirstPacket)
|
if (packet.isFirstPacket)
|
||||||
packet.completeNALU = kNaluStart;
|
packet.completeNALU = kNaluStart;
|
||||||
else if (packet.markerBit)
|
else if (packet.markerBit)
|
||||||
|
@ -10,12 +10,11 @@
|
|||||||
#ifndef WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TEST_STREAM_GENERATOR_H_
|
#ifndef WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TEST_STREAM_GENERATOR_H_
|
||||||
#define WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TEST_STREAM_GENERATOR_H_
|
#define WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_TEST_STREAM_GENERATOR_H_
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "webrtc/modules/video_coding/main/source/packet.h"
|
#include "webrtc/modules/video_coding/main/source/packet.h"
|
||||||
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
#include "webrtc/modules/video_coding/main/test/test_util.h"
|
||||||
|
#include "webrtc/typedefs.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ class StreamGenerator {
|
|||||||
std::list<VCMPacket> packets_;
|
std::list<VCMPacket> packets_;
|
||||||
uint16_t sequence_number_;
|
uint16_t sequence_number_;
|
||||||
int64_t start_time_;
|
int64_t start_time_;
|
||||||
uint8_t packet_buffer[kMaxPacketSize];
|
uint8_t packet_buffer_[kMaxPacketSize];
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(StreamGenerator);
|
DISALLOW_COPY_AND_ASSIGN(StreamGenerator);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user