Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: chrome/renderer/media/cast_rtp_stream.cc

Issue 668633002: Duplicate VideoEncodeAccelerator::SupportedProfile in gpu_info.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/media/cast_rtp_stream.h" 5 #include "chrome/renderer/media/cast_rtp_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 payload.channels = 1; 95 payload.channels = 1;
96 payload.max_frame_rate = media::cast::kDefaultMaxFrameRate; 96 payload.max_frame_rate = media::cast::kDefaultMaxFrameRate;
97 payload.width = 1280; 97 payload.width = 1280;
98 payload.height = 720; 98 payload.height = 720;
99 payload.codec_name = kCodecNameH264; 99 payload.codec_name = kCodecNameH264;
100 return payload; 100 return payload;
101 } 101 }
102 102
103 bool IsHardwareVP8EncodingSupported() { 103 bool IsHardwareVP8EncodingSupported() {
104 // Query for hardware VP8 encoder support. 104 // Query for hardware VP8 encoder support.
105 std::vector<media::VideoEncodeAccelerator::SupportedProfile> vea_profiles = 105 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> vea_profiles =
106 content::GetSupportedVideoEncodeAcceleratorProfiles(); 106 content::GetSupportedVideoEncodeAcceleratorProfiles();
107 for (size_t i = 0; i < vea_profiles.size(); ++i) { 107 for (size_t i = 0; i < vea_profiles.size(); ++i) {
108 if (vea_profiles[i].profile >= media::VP8PROFILE_MIN && 108 if (vea_profiles[i].profile >= media::VP8PROFILE_MIN &&
109 vea_profiles[i].profile <= media::VP8PROFILE_MAX) { 109 vea_profiles[i].profile <= media::VP8PROFILE_MAX) {
110 return true; 110 return true;
111 } 111 }
112 } 112 }
113 return false; 113 return false;
114 } 114 }
115 115
116 bool IsHardwareH264EncodingSupported() { 116 bool IsHardwareH264EncodingSupported() {
117 // Query for hardware H.264 encoder support. 117 // Query for hardware H.264 encoder support.
118 std::vector<media::VideoEncodeAccelerator::SupportedProfile> vea_profiles = 118 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> vea_profiles =
119 content::GetSupportedVideoEncodeAcceleratorProfiles(); 119 content::GetSupportedVideoEncodeAcceleratorProfiles();
120 for (size_t i = 0; i < vea_profiles.size(); ++i) { 120 for (size_t i = 0; i < vea_profiles.size(); ++i) {
121 if (vea_profiles[i].profile >= media::H264PROFILE_MIN && 121 if (vea_profiles[i].profile >= media::H264PROFILE_MIN &&
122 vea_profiles[i].profile <= media::H264PROFILE_MAX) { 122 vea_profiles[i].profile <= media::H264PROFILE_MAX) {
123 return true; 123 return true;
124 } 124 }
125 } 125 }
126 return false; 126 return false;
127 } 127 }
128 128
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 void CastRtpStream::DidEncounterError(const std::string& message) { 596 void CastRtpStream::DidEncounterError(const std::string& message) {
597 VLOG(1) << "CastRtpStream::DidEncounterError(" << message << ") = " 597 VLOG(1) << "CastRtpStream::DidEncounterError(" << message << ") = "
598 << (IsAudio() ? "audio" : "video"); 598 << (IsAudio() ? "audio" : "video");
599 // Save the WeakPtr first because the error callback might delete this object. 599 // Save the WeakPtr first because the error callback might delete this object.
600 base::WeakPtr<CastRtpStream> ptr = weak_factory_.GetWeakPtr(); 600 base::WeakPtr<CastRtpStream> ptr = weak_factory_.GetWeakPtr();
601 error_callback_.Run(message); 601 error_callback_.Run(message);
602 content::RenderThread::Get()->GetMessageLoop()->PostTask( 602 content::RenderThread::Get()->GetMessageLoop()->PostTask(
603 FROM_HERE, 603 FROM_HERE,
604 base::Bind(&CastRtpStream::Stop, ptr)); 604 base::Bind(&CastRtpStream::Stop, ptr));
605 } 605 }
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/gpu_video_encode_accelerator_host.h » ('j') | gpu/config/gpu_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698