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

Issue 4229003: Add VideoReader and VideoWriter interfaces. (Closed)

Created:
10 years, 1 month ago by Sergey Ulanov
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Alpha Left Google, dmac, pam+watch_chromium.org, awong, garykac, Paweł Hajdan Jr., Sergey Ulanov
Visibility:
Public.

Description

Add VideoReader and VideoWriter interfaces. Implemented VideoReader and VideoWriter for RTP and Protobuf. BUG=53986 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64878

Patch Set 1 : - #

Patch Set 2 : - #

Total comments: 14

Patch Set 3 : VideoStub added #

Patch Set 4 : - #

Patch Set 5 : - #

Total comments: 20

Patch Set 6 : - #

Unified diffs Side-by-side diffs Delta from patch set Stats (+648 lines, -148 lines) Patch
M chrome/service/service_process.cc View 3 chunks +1 line, -5 lines 0 comments Download
M remoting/base/decoder_vp8.cc View 1 2 3 4 3 chunks +2 lines, -2 lines 0 comments Download
M remoting/base/encoder_vp8.cc View 1 chunk +1 line, -2 lines 0 comments Download
M remoting/client/chromoting_client.h View 1 2 3 4 5 4 chunks +23 lines, -9 lines 0 comments Download
M remoting/client/chromoting_client.cc View 1 2 5 chunks +43 lines, -47 lines 0 comments Download
M remoting/client/host_connection.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M remoting/client/jingle_host_connection.h View 1 2 4 chunks +11 lines, -4 lines 0 comments Download
M remoting/client/jingle_host_connection.cc View 1 2 5 chunks +12 lines, -7 lines 0 comments Download
M remoting/host/chromoting_host.h View 4 chunks +5 lines, -2 lines 0 comments Download
M remoting/host/chromoting_host.cc View 3 chunks +29 lines, -5 lines 0 comments Download
M remoting/host/client_connection.h View 2 chunks +3 lines, -1 line 0 comments Download
M remoting/host/client_connection.cc View 1 2 3 4 5 3 chunks +6 lines, -10 lines 0 comments Download
M remoting/host/mock_objects.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/simple_host_process.cc View 6 chunks +1 line, -24 lines 0 comments Download
M remoting/proto/video.proto View 1 chunk +4 lines, -2 lines 0 comments Download
M remoting/protocol/chromotocol_config.h View 1 chunk +2 lines, -1 line 0 comments Download
M remoting/protocol/message_decoder.h View 1 2 2 chunks +1 line, -1 line 0 comments Download
M remoting/protocol/message_reader.h View 1 chunk +1 line, -0 lines 0 comments Download
A remoting/protocol/protobuf_video_reader.h View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
A remoting/protocol/protobuf_video_reader.cc View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
A remoting/protocol/protobuf_video_writer.h View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
A remoting/protocol/protobuf_video_writer.cc View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
M remoting/protocol/rtp_reader.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/rtp_reader.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/rtp_utils.cc View 2 chunks +3 lines, -6 lines 0 comments Download
A remoting/protocol/rtp_video_reader.h View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
A remoting/protocol/rtp_video_reader.cc View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
A remoting/protocol/rtp_video_writer.h View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
A remoting/protocol/rtp_video_writer.cc View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
M remoting/protocol/rtp_writer.h View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M remoting/protocol/rtp_writer.cc View 1 2 3 4 5 4 chunks +11 lines, -7 lines 0 comments Download
M remoting/protocol/stream_writer.h View 2 chunks +7 lines, -3 lines 0 comments Download
M remoting/protocol/stream_writer.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download
A remoting/protocol/video_reader.h View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
A remoting/protocol/video_reader.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
A remoting/protocol/video_stub.h View 1 chunk +33 lines, -0 lines 0 comments Download
A remoting/protocol/video_writer.h View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
A remoting/protocol/video_writer.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M remoting/remoting.gyp View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Sergey Ulanov
10 years, 1 month ago (2010-11-01 22:51:46 UTC) #1
awong
overall looks solid. Couple of quesitons. Also, we want to move everything into the protocol ...
10 years, 1 month ago (2010-11-02 17:59:31 UTC) #2
Sergey Ulanov
http://codereview.chromium.org/4229003/diff/5001/6016 File remoting/protocol/chromotocol_config.h (right): http://codereview.chromium.org/4229003/diff/5001/6016#newcode29 remoting/protocol/chromotocol_config.h:29: CODEC_ZIP, On 2010/11/02 17:59:31, awong wrote: > alphabetical ordering. ...
10 years, 1 month ago (2010-11-02 21:01:23 UTC) #3
Sergey Ulanov
On 2010/11/02 17:59:31, awong wrote: > overall looks solid. Couple of quesitons. > > Also, ...
10 years, 1 month ago (2010-11-02 21:43:07 UTC) #4
awong
LGTM w/nits I'm assuming that the VideoWriter being exposed in ClientConnection is just a termporary ...
10 years, 1 month ago (2010-11-03 00:14:35 UTC) #5
Sergey Ulanov
http://codereview.chromium.org/4229003/diff/5001/6016 File remoting/protocol/chromotocol_config.h (right): http://codereview.chromium.org/4229003/diff/5001/6016#newcode29 remoting/protocol/chromotocol_config.h:29: CODEC_ZIP, On 2010/11/03 00:14:36, awong wrote: > On 2010/11/02 ...
10 years, 1 month ago (2010-11-03 00:50:56 UTC) #6
awong
10 years, 1 month ago (2010-11-03 00:54:35 UTC) #7
On Tue, Nov 2, 2010 at 5:50 PM, <sergeyu@chromium.org> wrote:

>
> http://codereview.chromium.org/4229003/diff/5001/6016
> File remoting/protocol/chromotocol_config.h (right):
>
> http://codereview.chromium.org/4229003/diff/5001/6016#newcode29
> remoting/protocol/chromotocol_config.h:29: CODEC_ZIP,
> On 2010/11/03 00:14:36, awong wrote:
>
>> On 2010/11/02 21:01:23, sergeyu wrote:
>> > On 2010/11/02 17:59:31, awong wrote:
>> > > alphabetical ordering.
>> >
>> > Is there requirement to put enum values in alphabetical order? Even
>>
> the style
>
>> > guide shows the following as a valid order:
>> >    enum UrlTableErrors {
>> >      kOK = 0,
>> >      kErrorOutOfMemory,
>> >      kErrorMalformedInput,
>> >    };
>> > In this particular case I ordered from the simplest to more
>>
> complicated.
>
>
>  No there is no requirement.  I'm fine leaving as is.  Add a comment
>>
> about the
>
>> complexity ordering so no one tries to alphabetize it later.
>>
>
> I don't think this is necessary. I've never seen comments about a reason
> for particular order of enum values, don't think we need it here. And
> enum values are almost never ordered alphabetically.
> In this particular case there are no requirements for any particular
> order, I just shuffled them here to match the order in video.proto.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48005
> File remoting/client/chromoting_client.h (right):
>
> http://codereview.chromium.org/4229003/diff/28002/48005#newcode29
> remoting/client/chromoting_client.h:29: public VideoStub {
> On 2010/11/03 00:14:36, awong wrote:
>
>> VideoStub should be implemented by another class. Add a TODO?
>>
>
> Done.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48012
> File remoting/host/client_connection.h (right):
>
> http://codereview.chromium.org/4229003/diff/28002/48012#newcode106
> remoting/host/client_connection.h:106: scoped_ptr<VideoWriter>
> video_writer_;
> On 2010/11/03 00:14:36, awong wrote:
>
>> I was expecting that this would just be the VideoStub.
>>
>
>  Is this just a TODO?
>>
>
> We need VideoWriter here. There are some things that VideoWriter doesn't
> that are not part of VideoStub interface. For example when closing
> connection video_writer_->Close() must be called, but Close() is not in
> the VideoStub interface.


erp..I got confused about what ClientConnection was.   You're right.


>  http://codereview.chromium.org/4229003/diff/28002/48019
> File remoting/protocol/protobuf_video_reader.cc (right):
>
> http://codereview.chromium.org/4229003/diff/28002/48019#newcode28
> remoting/protocol/protobuf_video_reader.cc:28: packet,
> NewRunnableFunction(&ProtobufVideoReader::DeletePacket, packet));
> On 2010/11/03 00:14:36, awong wrote:
>
>> how about just newing a "DeleteTask" from base/task.h?
>>
>
> Done.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48031
> File remoting/protocol/rtp_writer.h (right):
>
> http://codereview.chromium.org/4229003/diff/28002/48031#newcode18
> remoting/protocol/rtp_writer.h:18: // Initializes the writer. Must be
> called on the thread the sockets belong
> On 2010/11/03 00:14:36, awong wrote:
>
>> sockets belong -> socket belongs
>>
> There are two sockets: one for rtp, another one for rtcp.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48031#newcode22
> remoting/protocol/rtp_writer.h:22: void SendPacket(const char* buffer,
> int packet_size, uint32 timestamp);
> On 2010/11/03 00:14:36, awong wrote:
>
>> Comment explaining what buffer should contain?
>>
>
> Renamed it to |payload|.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48031#newcode24
> remoting/protocol/rtp_writer.h:24: int GetPendingMessages();
> On 2010/11/03 00:14:36, awong wrote:
>
>> comment explaning what this returns?
>>
>
> Done.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48035
> File remoting/protocol/video_reader.h (right):
>
> http://codereview.chromium.org/4229003/diff/28002/48035#newcode24
> remoting/protocol/video_reader.h:24: virtual ~VideoReader() { }
> On 2010/11/03 00:14:36, awong wrote:
>
>> Since you already have a .cc file, might as well not inline the
>> consturctor/destructor...
>>
>
> Done.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48035#newcode26
> remoting/protocol/video_reader.h:26: // Initializies the reader. Doesn't
> take ownershipt of neither |connection|
> On 2010/11/03 00:14:36, awong wrote:
>
>> ownershipt -> ownership
>> neither -> either
>> nor -> or
>>
>
>  double-negatives are fun.
>>
>
> Done.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48035#newcode31
> remoting/protocol/video_reader.h:31: // Closes the reader. The stub is
> called after Close().
> On 2010/11/03 00:14:36, awong wrote:
>
>> The stub should not be called right?
>>
>
> Done.
>
>
> http://codereview.chromium.org/4229003/diff/28002/48038
> File remoting/protocol/video_writer.h (right):
>
> http://codereview.chromium.org/4229003/diff/28002/48038#newcode31
> remoting/protocol/video_writer.h:31: virtual void SendPacket(const
> VideoPacket& packet) = 0;
> On 2010/11/03 00:14:36, awong wrote:
>
>> Eventually this is going to be something other than packet, right?
>>
> Right. There is TODO about it in VideoStub and TODO to implement
> VideoStub in this class.
>
>
> http://codereview.chromium.org/4229003/show
>

Powered by Google App Engine
This is Rietveld 408576698